Jump to content
Sign in to follow this  
-FW- Shaanguy

if (!alive player) repeatly not working in .sqf

Recommended Posts

just wana know how to execute a script, when (!alive player), i know in a trigger [repeatly] with condition: !alive player will work, but i want to make !alive player in a sqf file. I wrote many scripts in different ways, still not working ._,

i want when I respawn, repeatly add a script, like adding a addaction or something

Share this post


Link to post
Share on other sites

Use a eventHandler "Killed" to exec a Script or call a function when the player is dead, or use this line at the beginning of Your script:

waitUntil{sleep 0.1; !alive player}; //Any code after this line is executed when the Player is dead

For more Info about the Command "waitUntil" see:

https://community.bistudio.com/wiki/waitUntil

For executing a Script or calling a function when the unit respawns, use a eventHandler "Respawn"

I think this is what you are looking for!

For more information about eventHandlers, read this guide:

http://forums.bistudio.com/showthread.php?100564-Beginners-Guide-to-Event-Handlers

Greez KiloSwiss

Edited by KiloSwiss
Added some links

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×