Platform player crouch and shot problem

0 favourites
  • 5 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • OK, i have make a plattformgame. Player can shot and i have use nummeric instance variables. is the player push left arrow the instance variables set for one and the player shot at the left side (included set bullet angle 180). when i push right arrow the instance varible set to 0, player shoot right. It works wonderful! But now, i have a big problem. When i crouch down (same variable) the player is crouch down left or right (its run), but when i shot he is stand up and shot the bullet to the normal line and not the deeper downline.... What can i make to kill this problem? Is there an example in the net?

    Oh, when i have post this and another user have the same problem and have it post before.... give the link. I need an example for plattformer left right jump crouch and everytime player can shot the bullet at all the differnet positions....

    THX for help <img src="smileys/smiley1.gif" border="0" align="middle" />

  • If left arrow is down

        AND down arrow is down > shoot crouch anim left

        else > shoot standing anim left

    If right arrow is down

        AND down arrow is down > shoot crouch anim right

        else > shoot standing anim right

    If you're going to be doing a lot of this you can use other conditions such as when the character is doing a certain anim(standing, crouching etc) or when they are in a certain variable state. This is just because it gets messy when using logic with key presses when it gets more complex, I know from experience : P

  • Yeah thanks for the help.... but i have now an other question. is the "AND" two conditions or need it a an syntax-word? OK, its an amateur-Question... But i have for many years work with Multim.Fusion and the logical is often the same. What i mean is, i have some Tutorial not read and sometimes i have only a special-problem (for example: last post from me) ;)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No problem, I know what you mean. Other engines etc have other ways of doing the same things! If you have left arrow is down event you can add two sub-events (press S) within left arrow is down. For sub-event 1 add the condition for down arrow is down and put in the logic, for sub-event 2 add the same condition but right click on it and select invert to set it to when down arrow is NOT down and put the relevant logic in there. If you require any more info then post again, someone will respond. GL!

  • Wow, you have rescure my weekend :D Very Thanks. Have big X-mas and Happy new Year!!!!!


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