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 »Global boolean

Author Topic: Global boolean (7 messages, Page 1 of 1)
Moderators: Dennis

Kustrin 117
Joined: Aug 6, 2009

\


Posted: Mar 29, 2010 05:24 AM    Msg. 1 of 7       
What does global boolean (#) does??? I can't see the script in the console...


chrisk123999
Joined: Aug 10, 2008

=CE= Chris [Captain] [=]


Posted: Mar 29, 2010 05:15 PM    Msg. 2 of 7       
It's for scripting. If your just using dev mode there is no purpose for it.


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Mar 29, 2010 06:39 PM    Msg. 3 of 7       
Global booleans are essentially variables that hold a true or false value. Unless you're at least half experienced with scripting, don't mess with them.


Kustrin 117
Joined: Aug 6, 2009

\


Posted: Mar 30, 2010 12:15 AM    Msg. 4 of 7       
What's the usage?? Can someone give me a example??


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Mar 30, 2010 12:21 AM    Msg. 5 of 7       

(global boolean x true)

(script startup checker
(if
(= x true)
(begin
(unit_kill (unit (list_get (players) 0)))
)
(begin
(unit_set_desired_flashlight_state (unit (list_get (players) 0)) true)
)
)
)

Since x is initialized as true, it will kill the first player, due to the unit_kill command. Otherwise, if x were set to false through the (set x false) command, it would activate the flashlight of the first player.


Kustrin 117
Joined: Aug 6, 2009

\


Posted: Mar 31, 2010 03:27 AM    Msg. 6 of 7       
So it's refernece for later scripts??


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Mar 31, 2010 10:46 AM    Msg. 7 of 7       
If you wish to put it that way, yes.

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 10:59 PM 157 ms.
A Halo Maps Website