Hi, I'm doing a script and in one of the "if" statements I need to check if certain player is alive. Some information you need to know first.
I've attached all party members to the script prior the IF statement using "addrid(2,0,getcharid(1))"; and I only need to check if the party leader is alive.
I Will leave an example.
I need the Loop to stop once the Party leader is dead.
I have tried
if (getpartyleader(getcharid(1),2) && HP<2)
But it only stopped for the Leader, and not for everyone.
I need the loop to stop for everyone attached on the script.
I would try using Global Integers ($@) however, this would be true for the whole server.
And since the script is intended to be used by others aswell, it might interfere. So this option is not good for me.
Question
BigBurrito
Hi, I'm doing a script and in one of the "if" statements I need to check if certain player is alive. Some information you need to know first.
I've attached all party members to the script prior the IF statement using "addrid(2,0,getcharid(1))"; and I only need to check if the party leader is alive.
I Will leave an example.
- script partyleader -1,{ getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; addrid(2,0,getcharid(1)) for ( .@i = 0; .@i < $@partymembercount; .@i++) { if( PartyLeaderisdead) { dispbottom "Leader is dead"; set .@i,$@partymembercount; continue; } } end; }
I need the Loop to stop once the Party leader is dead.
I have tried
if (getpartyleader(getcharid(1),2) && HP<2)
But it only stopped for the Leader, and not for everyone.
I need the loop to stop for everyone attached on the script.
I would try using Global Integers ($@) however, this would be true for the whole server.
And since the script is intended to be used by others aswell, it might interfere. So this option is not good for me.
Thank you in advance.
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.