
hexthat
Joined: Nov 2, 2013
|
Posted: Nov 4, 2013 10:07 AM
Msg. 1 of 3
i dont use OS but here is a script im having a hard time with along with any other that has <unit> ive tried ;players,player0,player1,player2 but they are not me so idk what player i am nor does the "players" show any output so WTF... (player_add_equipment <unit> <starting_profile> <boolean>) edit add~
I got it to work by looking threw a10 ce script. you have to add some static scripts for this code to work they way i wanted and they are
(script static "unit" player0 (unit (list_get (players )0 )))
(script static "unit" player1 (unit (list_get (players )1 ))) Edited by hexthat on Nov 4, 2013 at 11:17 AM
|

A Juicy Frank
Joined: Oct 28, 2013
|
Posted: Nov 4, 2013 11:26 AM
Msg. 2 of 3
To reference a single player when called for as a unit, use:
(unit (list_get (players) 0))
0-15 is the player's index number you are referencing. For singleplayer maps, the local player is the only player, at index 0.
(players) returns as an object_list of players. (list_get <object_list> <short>) returns a single object from the specified list at the numerical index provided, and (unit <object>) converts the called object into a unit.
~Saw the edit. Good to know you've got it working now. Edited by A Juicy Frank on Nov 4, 2013 at 11:27 AM
|