change weapon

0 favourites
  • 8 posts
From the Asset Store
JBoB Sound Studio AAA Quality Sound Effect "Weapon Master" Pack contain royalty-free stock sound effects.
  • hey i just got started with this today and iv been trying to figure out how i would set up the events for a weapon change in a top down shooter i gave the player a variable called gun but i cant figure out how to set up the events so if some one could tell me what that would look like id greatly appreciate it   <img src="smileys/smiley9.gif" border="0" align="middle" />

  • There are a number of ways to do this depending on how the game mechanics work in your game.

    You could set a sprite that represents gun1 and another for gun2. Depending on what they fire will come from those gun's custom imagepoint you can set with their separate events for how they fire. Create a Boolean for Equipped.

    When gun 1 is selected set Boolean to true for Gun1 and false for the other. And vise versa.

    When Equipped is true, create and pin the gun to your character sprite.

    There are other methods available too, some may be even better than this. Try working through it and post what you have. Until you try to implement it you may find yourself coming back to the board again and again rather than learning how to set this events up yourself.

  • im sorry if i wasn't clear my problem is that i cant figure out how set it up so it looks for the variable value then checks if the left mouse is clicked then completes the action im not asking for u to set up my game im asking for some understanding of how the event system works i cant find any real documentation

  • "i cant find any real documentation"

    Pretty sure if you read through the manual, you'll find your answer.

    I gave you a example of how you could set it up. If you are trying to set up a game without going through any of the basic tutorials then you are in for a long haul.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Try something like this

  • or create global variable and when global variable is 1 and mouse is clicked shot arrow, when global variable is 2 and mouse is clicked shoot bullet

  • thanks emoaeden thats just what i needed but i just cant seem to get it to work just right the global value does change but it wont shoot the bullet object when either value is activated could u maybe take a look? thanks its hella weird trying to use this event system im used to blender GE

  • Well, have a look at this, lemme know if it works :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)