How do I make death timers work? and something else inside.

Just started using Construct 2? Post your questions here

Post » Tue Jun 09, 2015 2:51 am

so the thing is this:

Im making a fighting game. I have everything set up from Main Menu, the game itself, and the End part. Problem is I cant seem to make the death timers work.

to give you an idea of how i did (the death timer) it is like this:
Image
i set my animation to loop only once, got the timer behavior on my sprite, but the program still isnt going through the
Code: Select all
[player1][start] timer lose "[i]loser[/i]" for 1.0 sec
->[player1]on timer lose "[i]loser[/i]" [system] goto <layout>end screen


the animation is looping despite being set only to loop once and gets stuck there.

Another one is how do I "stop the opponents when the foe is defeated"?
B
4
Posts: 4
Reputation: 210

Post » Tue Jun 09, 2015 3:01 am

I didn't completely understood your question but i'll try, "how do I stop the opponents when the foe is defeated"? I assume you make your opponents in sprites, you can add an instance variable to your enemy sprite lets say HP. Make an event that check the enemy sprite's HP is below 1. ^^. You can check the shooter game examples.
sleep is only for the weak!
B
91
S
30
G
12
Posts: 139
Reputation: 12,013

Post » Tue Jun 09, 2015 7:39 am

your event is triggered every tick, so the timer is started every tick..

Add a condition trigger once while true to the top event and put the on timer as a seperate event instead of a sub-event.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Jun 09, 2015 7:34 pm

LittleStain wrote:your event is triggered every tick, so the timer is started every tick..

Add a condition trigger once while true to the top event and put the on timer as a seperate event instead of a sub-event.


how do i do this?

add a condition (right click> add condition)
then?
B
4
Posts: 4
Reputation: 210

Post » Tue Jun 09, 2015 7:38 pm

system trigger once while true..?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Jun 09, 2015 8:26 pm

LittleStain wrote:system trigger once while true..?

IT WORKED. THANKS.

another inquiry.

I still have to disable the keyboard when there is a winner...
B
4
Posts: 4
Reputation: 210


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests