Home
Intel Depot
Editors Depot
Missions Depot
Addons Depot
Forum
Home
Help
Search
Login
Register
OFPEC Forum
»
Editors Depot - Mission Editing and Scripting
»
OFP - Editing/Scripting Multiplayer
(Moderators:
h-
,
savedbygrace
,
Gruntage
) »
Find out whether unit is human or AI
« previous
next »
Send this topic
Print
Pages: [
1
]
Go Down
Author
Topic: Find out whether unit is human or AI (Read 1615 times)
0 Members and 1 Guest are viewing this topic.
Kronzky
Members
Find out whether unit is human or AI
«
on:
07 Oct 2002, 23:28:14 »
Is there a way to determine within a script whether a particular unit is a human player or AI?
Logged
sussmori
Guest
Re:Find out whether unit is human or AI
«
Reply #1 on:
08 Oct 2002, 03:29:11 »
One way to do it is by creating an array with the names of all players. Each player's machine can add the name of its 'player' to a publicVariable array.
Then it's just a matter of seeing if a unit's name is in the array or not
Logged
Black_Feather
Former Staff
I'll never forget you Daisey.
Re:Find out whether unit is human or AI
«
Reply #2 on:
08 Oct 2002, 04:23:05 »
I think you can use this too
?unitname == player : dosomething
Logged
Kronzky
Members
Re:Find out whether unit is human or AI
«
Reply #3 on:
08 Oct 2002, 06:26:35 »
The
?unitname == player : dosomething
did the trick! And so elegantly...
Thanks a bunch!
Logged
Send this topic
Print
Pages: [
1
]
Go Up
« previous
next »
OFPEC Forum
»
Editors Depot - Mission Editing and Scripting
»
OFP - Editing/Scripting Multiplayer
(Moderators:
h-
,
savedbygrace
,
Gruntage
) »
Find out whether unit is human or AI
Top of page