problem on direction of bullet behaviour

Get help using Construct 2

Post » Sun Dec 22, 2013 2:44 am

Hi Guys!

Im trying to move an NPC (a Pokmon 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:

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

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:

Any idea? Thanks in advance.

Posts: 3
Reputation: 231

Post » Sun Dec 22, 2013 4:01 am

Because you set him to Flipped in the 180 call ?
Posts: 2,289
Reputation: 49,957

Post » Sun Dec 22, 2013 4:50 am


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.
Posts: 3
Reputation: 231

Post » Sun Dec 22, 2013 6:11 am

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.

New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Posts: 7,342
Reputation: 71,460

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 29 guests