Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
daimyo21

Is there a !isNotPlayer?

Recommended Posts

Basically just how theres a !isPlayer, is there a !isnotplayer workaround?

No scripts please.

Real basic, just want to enable/disable AI when a player joins/leaves

So far I got

cond: !isplayer

act: v1 enablesimulation = true;

v1 being the units name

Now how do I do:

cond !isnotplayer

act v1 enablesimulation = false;

Thanks!

Share this post


Link to post
Share on other sites

You say you want the inverse of !isPlayer somePerson. Just add another 'not':

!(!isPlayer somePerson)

Which can be simplified to:

isPlayer somePerson

Don't see why you are making this so much more complicated. Unless i'm missing something.

Edited by Muzzleflash

Share this post


Link to post
Share on other sites

You do realize that ! just checks if a value is false and in such a case returns true? isPlayer unitname returns true if the unit is a player and !isPlayer unitname returns false, and vice versa if the unit isn't a player.

Share this post


Link to post
Share on other sites

Thanks alot guys! i get really confused sometimes when reading through the Arma II scripting references.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×