Hey Clickteam,
You know how in Ninja Gaiden on the NES, when Ryu would get hit by an enemy or eagle or whatever, he would fly back an inch or so? How can I recreate that in the event editor? Thanks Guys!



Hey Clickteam,
You know how in Ninja Gaiden on the NES, when Ryu would get hit by an enemy or eagle or whatever, he would fly back an inch or so? How can I recreate that in the event editor? Thanks Guys!













You can set a flag or alterable value that when the player collides with an enemy, activate the flag.
When flag is active add 1 to alt val, set player X + or - depending on direction. Then have the sprite y position - 5 + alt val that is being added. It gives it a small sense of gravity and gives you the lift before bringing the sprite back down.
Then when player collides back with the ground turn off the flag and set the alt val to 0.





you can also make a timer if you don't want the condition to be collisioning. after x time turn "pushback" flag off, or x value to 0 if you'renot using a flag. This way you can modify the lenght (or time) of the pushback depending on the attack.



Thanks guys for responding. Piscesdreams, can you clarify some of the events you are talking about please? I understand making an Alt Valve and setting players x position. But what do you mean "have the sprite y position - 5 + alt val that is being added?" Thanks.
Are you using a custom made movement setup/PMO/Built in platform movement? The way i have mine setup (can't pull it up right now, just going from memory) is having a pain group that is deactivated, and when the player collides with an enemy, it activates this group. In the pain group, i have some events set so that when facing the right direction when the group is activated, the PMO is set to jump + has an additional x velocity set at -100 i believe. The same event is used for the left facing direction, except the additional x velocity changes to 100. Also, to stop the event, i have the last bit of code saying that when the player lands on the ground, it deactivates the pain group.











If you are using the PMO, Warmachine's suggesting is probably the best way to handle it. Alternatively, instead of the x values, you could use the "user is holding input" commands to handle the direction. For instance, user collides with enemy while facing right, user jumps + user is holding left input key. Make sure the player's direction is facing right while still moving left (backwards) to maintain the appearance. Then just reverse and repeat for the other direction.



Warmachine, Shawn,
I'm not using the PMO but that sounds like the easiest way to go about this. I've been using Fusion for about a year. This will be my first Side Scrolling adventure. I'm not too familiar with PMO but I think I saw a tutorial on the website. Thanks!!!
Check out Chaos Advanced Platformer Tutorial, its a GREAT starting point for understanding how the PMO (Platform Movement Object) works. The only downside i have found to using it vs using the built in/fusion platform is that for moving objects such as things that move like pendulums or horizontal moving platforms it takes quite a bit of work to get it where it needs to be. Im still trying to figure out how to correctly make the PMO work with a pendulum platform lol. But other than that it is nothing but pros vs the built in platform movement IMO. You get soooo much more control over your objects with the PMO.











Warmachine, I hear ya about those moving platforms lol.
Once you understand what all the conditions of the PMO are and how they work, the PMO is a breeze. It's pretty flexible if you play around with the values and whatnot.
I wonder if there's a tutorial for the various types of moving platforms with the PMO? If not, somebody should make one.










here is a quick tutorial how to do something like that
http://community.clickteam.com/threads/90988-Ninja-Gaiden-Collision-Tutorial