A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE Technical / Map Design »how do i get this code to work?

Author Topic: how do i get this code to work? (3 messages, Page 1 of 1)
Moderators: Dennis

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


hexthat
Joined: Nov 2, 2013


Posted: Nov 4, 2013 01:28 PM    Msg. 3 of 3       
yeah i did player 0 and 1 so that if anyone converts it to xbox and plays co-op all the scripts and stuff will still work correctly with out any modifications

i still neeed some help with http://forum.halomaps.org/index.cfm%3Fpage=topic&topicID=44411

im having trouble using the custom name function on controls in sapian

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 1:15 AM 125 ms.
A Halo Maps Website