Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
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
Maybe you guys can help me with this
So on bullet hit I want the npc to change to "Hit" Animation for about 3 seconds then back to its current animation. When i try it doesnt work.
my CapX looks like this
Heres the capX download
dropbox.com/s/trj0hgrbtapih46/shoottohittemplate.capx
Any ideas?
I have idea that you could have an instance variable that called "hitCooldown".
Then you check if the enemy is playing "Hit", you add dt to this until it >= 3, set it back to normal animation and =0.
Develop games in your browser. Powerful, performant & highly capable.
I have idea that you could have an instance variable that called "hitCooldown". Then you check if the enemy is playing "Hit", you add dt to this until it >= 3, set it back to normal animation and =0.
Thanks for your help. I'm not sure what you meant to be honest I tried this
didnt work though. :(
TitanGames
The problem is in your event 2 because this event is continuously true while the NPC is not moving so the sooner you set Animation = 2 on collision with the bullet, the Event 2 sets it back to 0 right away and you gonna have the same problem with Event 3 if the Npc is Moving so the best thing is to add a boolean then put event 2 & 3 under it
Then just Activate the Boolean on bullet hit and use a (Timer) 3 sec to deactivate it back again
see here on the picture I added a boolean "Hit"
https://www.dropbox.com/s/svzw0hzmbdj5lwd/Change%20Animation%20on%20Hit.png?dl=0
My instance variable is not boolean.
Here is what I fixed:
drive.google.com/open