problem on direction of bullet behaviour

  • Hi Guys!

    Im trying to move an NPC (a Pok?mon NPC :D) using the bullet behaviour in different ways according to a random angle (0? or 180?).

    If I call the function separately there is no problem.

    But when I set a random time for call the function, the bullet behaviour that handles the 180? direction mess up and doesnt work.

    Here is some pics:

    • Here is the function working well on a first call:

    <img src="http://i.imgur.com/8VaupOe.jpg" border="0" />

    • And here is the pokemanz on his head after and going in the opposite direction. This is using a random-timed call:

    <img src="http://i.imgur.com/ijpIX1O.jpg" border="0" />

    I know that the problem is on the random time, because I try the same code using only the Fade Out Trigger and works well.

    Finally here is my event sheet:

    <img src="http://i.imgur.com/IkwaKnv.jpg" border="0" />

    Any idea? Thanks in advance.

  • Because you set him to Flipped in the 180 call ?

  • plinkie

    Originally I had done that for the sprite looked incorrectly (rotated).

    Right now, I solve the problem (partially) by removing the "Set Angle" property in the properties of behavior.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You might need to put a "System:Trigger only once while true" in the event 5, to make sure it only triggers once.

    You have to make sure the Rattata object has a moving speed before setting its moving angle.

    You might want to make event 2 and 3 as subevents of event 1 to make sure they'll only trigger once. (or add a "trigger while once" as well).

    If those changes don't help, consider posting a simple version of your capx so we can investigate more in depth what could be the issue.

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