In my example there's a boolean so you're able to add the "Is crouching" condition.
Here you go, changed some things:
StampedoGame.capx (r95)
It'll be fine with a few more events. You'll probably need to loop through the enemies with a "For each" loop to check them individually.
Here's another example I did a while back with a few more enemies:
EnemyBridgePatrol.capx
If you're looking for something really simple you could just create a basic waypoint system with sprites:
BasicWaypoints.capx (r99)
This is a great solution in my opinion. If you're worried about performance, it wouldn't be faster if you only had one object. There's no logic applied here, and as far as I know the time to draw the sprites would be the same. Unless there's some other reason I missed?
Develop games in your browser. Powerful, performant & highly capable.
—:
I see what you mean now, but I still don't think it would do what he wants. If he uses "fade-out", the sprite would go from 100 to 0 opacity, but with "fade-in" it goes from 0 to 100 opacity.
Hmm, I tested and it should work if you set it up like in the example. Make sure the animation speed isn't set to 0.
No problem <img src="smileys/smiley20.gif" border="0" align="middle">
You can right click and choose "add comment", or use the hotkey "Q". You can find all you need to know about the event sheet features in the manual.
You should check your animation's collision polygon in the image and animations editor and see that it's correcly set up. (Edit: But I guess you found out before I answered) <img src="smileys/smiley1.gif" border="0" align="middle">
I did crouching as well. Updated file in previous post to work with r95. (might crash, just let me know)
Well, the problem is there's no "on fade-in finished" condition, only "on fade-out finished" so the condition doesn't meet it's requirements when the fade-in is done.
I'm bored, so I made a .capx for you <img src="smileys/smiley17.gif" border="0" align="middle">
BasicPlatformAnim.capx (r99)
Use both conditons in the same event.
+Is not moving +Is not jumping -> Standing animation +Is moving +Is not jumping (might not need this) -> Running animation +Is jumping -> Jumping animation
If you're still having troubles, could you upload a .capx to a filehost like dropbox so I could have a look?
Edit: By the way, after the platform object reaches the top of it's jump, it's no longer jumping, but falling.
Where I write (not), I mean an inverted event. I didn't say "not inverted events", but I see how easy it is to misunderstand that, sorry for the confusion.
I meant to say:
"(not)" meaning inverted events.
Member since 30 Dec, 2011