Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
I have attached a capx file for viewing.... something I'm battling right now in a game I'm creating is that when the player comes in contact with the enemy I have a nice little animation of him dying.... problem is and illustrated in this is capx is that if I keep pressing something after touching the enemy he simply goes into another animation and the game keeps going.. how can I have the dying animation play out then be done with the level restart the layout... I tried turning collision off after making contact but that in return drops the boss of the platform? if that makes sense thats what happen.... I tried setting up VAR's to track if he has been touched by the boss and if he has to enter him into a dying mode and if not he is in alive mode but that got messy... any ideas?
Change the condition "On collision" for "Is overlapping" and on this same event, add the platform action "Set Enabled " and set it to Disabled.
That will make the player unable to move while is touching the enemy.
Develop games in your browser. Powerful, performant & highly capable.
Ok so this did work to a certain point however it plays the death animation but still if I press left or right he jumps back up ( dont move) but gets into another animation position
ok well strange enough I was doing this on my actual project and the result was the above - however doing this on the sample I provided has the player not taking any input after he hits enemy... so what do I have in my project that is making him bounce back to life....
Try moving the event "player is overlapping with enemy" to the bottom of the event sheet. It needs to be below the events that control "key is down".
player is overlapping enemy is the last entry in the events... number#26 already?
Can you share the .capx?
ok so here how I finally got around this - all keyboard input is now tied to a boolean alive... when he makes contact with enemy boolean set to false and all input to animations is killed....