Boolean state not setting instantly for respawn

Get help using Construct 2

Post » Thu Apr 25, 2013 12:55 pm

Hi guys, been stalking for a little while, recently bought the engine and LOVE every bit of it

but I've encountered a bit of an issue
basically my project requires the player to be in one of several states
Default (running around with platform controller)
Ladder (climbing a ladder and jumping off it into default state)
Death (plays death animation then waits before running respawn state)
Respawn (after the player dies, reset position, reset states and take away life)

now, the issue I seem to have is between death state and respawn
first issue is that the animation loops despite it not looping (I suspect that has to do with other issues)
the major problem is that upon respawn, despite it setting the respawn state to false, resets position for a period of time making the character jitter in place

I'm using BOOL variables as flags to indicate what 'state' the player should be in and it appears it takes time for a bool state to change

and this is an issue I don't know how to fix
Thanks for your time and i hope you can help or explain a better method or why its doing this, I fear it maybe an issue with 'ticks' but the difference shouldn't be this obvious

Posts: 3
Reputation: 131

Post » Thu Apr 25, 2013 2:17 pm

From what I can see, you're not setting Died to false so that condition will be met for 2 seconds and will keep replaying the animation "Death".

It should be...

+ Is Died
- Set animation to Death (play from beginning)
- Set Died to False
- Wait 2 seconds
- Set Respawn to True

OR another way is to add a "Trigger Once While True" condition to Is Died..

+ Is Died
+ Trigger Once While True
- Set animation to "Death"
- Wait 2 seconds
- Set Respawn to True
Posts: 876
Reputation: 5,650

Post » Fri Apr 26, 2013 12:16 am

fixed the order of some commands, also, Trigger once is a God sent blessing, thank you
ps, I'm not religious
Posts: 3
Reputation: 131

Return to How do I....?

Who is online

Users browsing this forum: Drago_18, mr32D, Unconnected and 15 guests