Why didn't I think of that EncryptedCow ?
Oh, right, I did!
If you want to do it your way you could set up an action:
system compare two values - Globaltime%10 = 0 - (insert action)
Develop games in your browser. Powerful, performant & highly capable.
It would probably be a lot easier to give your "tamagochi" a timer-behaviour and call an action on timer end.
The only events in the capx are the ones in the screenshot.
Don't forget to put solid objects around the layout and set bounce of solids to true.
Why 2 topics?
you should just check if the player is between 320 and 322.. that will work..
Just spawn the text-object on enemy hit give it a fade out behaviour and an every tick set y to self.y-1. Spawning it at the tip of the player's sword would make for nice differences visually.
You floor the x-coordinate in the text-field, so probably it isn't exactly 320 even if the text says so..
By setting it to greater or equal to and stopping the player movement in the same event, you'll notice the player doesn't stop at 320, but at 321 (in my tries). Which means the player was never at 320.
It only triggers if the player is at exactly 320, so if the player-movent is fast and it skips x-coordinates it will never trigger.
If you need a trigger (of which I'm not sure) you could give the rocket an instance variable on touch and check for that?
Member since 26 Apr, 2011