OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Rocko Bonaparte on 14 Dec 2004, 05:38:46
-
How could I determine if a unit is AI-controlled or human-controlled in a multiplayer setting?
-
get this one to the multiplayer board
-
?myUnit !=player
Is true if unit is AI-controlled.
?myUnit ==player
Is true if unit is under human controll.
-
get this one to the multiplayer board
Hrm... I guess I'll cross-post is now:
http://www.ofpec.com/yabbse/index.php?board=7;action=display;threadid=20909;start=%200#lastPost
?myUnit !=player won't work in a multiplayer environment. This is a multiplayer server script, and hence there is more than one player. This will only identify with the server's player, if there is one. Anyhow, it's been moved over to Multiplayer.
-
um, someone correct me if im wrong but im pretty sure that the value player is different for every CP on the server.
that mean you can check to see if a player is on the west side and then play a sound:
? (side player == west) : playmusic "RTrack10"
-
I've used "player" in MP-missions several times, to delete all units not under player control. Never encountered any problems with it. Player seems to be a unique term to every machine, not just the server.
-
?myUnit !=player won't work in a multiplayer environment. This is a multiplayer server script, and hence there is more than one player. This will only identify with the server's player, if there is one.
I put ?myUnit !=player in a trigger, not a script, btw