 |
Black Ops 3 Source Code Explorer
0.1
An script explorer for Black Ops 3 by ZeRoY
|
Go to the documentation of this file. 1 #using scripts\shared\trigger_shared;
2 #using scripts\shared\util_shared;
4 #insert scripts\shared\shared.gsh;
18 function init( str_flag, b_val =
false, b_is_trigger =
false )
24 if ( !isdefined( level.first_frame ) )
26 Assert( !isdefined(
self.flag[ str_flag ] ),
"Attempt to reinitialize existing flag '" + str_flag +
"' on entity." );
31 self.flag[ str_flag ] = b_val;
35 if ( !isdefined( level.trigger_flags ) )
38 level.trigger_flags[ str_flag ] = [];
40 else if ( !isdefined( level.trigger_flags[ str_flag ] ) )
42 level.trigger_flags[ str_flag ] = [];
59 return ( isdefined(
self.flag ) && isdefined(
self.flag[ str_flag ] ) );
74 Assert(
exists( str_flag ),
"Attempting to set a flag '" + str_flag +
"' that's not initialized." );
76 self.flag[ str_flag ] =
true;
77 self notify( str_flag );
96 self thread
_delay_set( n_delay, str_flag, str_cancel );
101 if ( isdefined( str_cancel ) )
103 self endon( str_cancel );
106 self endon(
"death" );
112 function set_val( str_flag, b_val )
125 Assert( isdefined( b_val ),
"value must be specified in flagsys::set_val" );
151 self notify(
"__flag::set_for_time__" + str_flag );
152 self endon(
"__flag::set_for_time__" + str_flag );
171 Assert(
exists( str_flag ),
"Attempting to clear a flag '" + str_flag +
"' that's not initialized." );
173 if (
self.flag[ str_flag ] )
175 self.flag[ str_flag ] =
false;
176 self notify( str_flag );
192 if (
get( str_flag ) )
214 Assert(
exists( str_flag ),
"Tried to get flag '" + str_flag +
"' that's not initialized." );
216 return self.flag[ str_flag ];
228 function get_any( &
array )
230 foreach ( str_flag
in array )
232 if (
get( str_flag ) )
253 self endon(
"death" );
255 while ( !
get( str_flag ) )
257 self waittill( str_flag );
269 self endon(
"death" );
271 for ( i = 0; i < a_flags.size; i++ )
273 str_flag = a_flags[i];
275 if ( !
get( str_flag ) )
277 self waittill( str_flag );
291 self endon(
"death" );
293 foreach ( flag
in a_flags )
312 self endon(
"death" );
314 while (
get( str_flag ) )
316 self waittill( str_flag );
328 self endon(
"death" );
330 for ( i = 0; i < a_flags.size; i++ )
332 str_flag = a_flags[i];
334 if (
get( str_flag ) )
336 self waittill( str_flag );
350 self endon(
"death" );
354 foreach ( flag
in a_flags )
382 function delete( str_flag )
384 if ( isdefined(
self.flag[ str_flag ] ) )
386 self.flag[ str_flag ] = undefined;
390 /# PrintLn(
"flag_delete() called on flag that does not exist: " + str_flag ); #/
function wait_till_clear_timeout(n_timeout, str_flag)
function wait_till_clear_any_timeout(n_timeout, a_flags)
function clear(str_flag)
function wait_till_clear(str_flag)
function wait_till_clear_all(a_flags)
function wait_till_any(a_flags)
function init(str_flag, b_val=false, b_is_trigger=false)
function waittill_any_array(a_notifies)
function wait_till_clear_any(a_flags)
function set_flag_permissions(msg)
function wait_till_clear_all_timeout(n_timeout, a_flags)
function delay_set(n_delay, str_flag, str_cancel)
function toggle(str_flag)
#define DEFAULT(__var, __default)
function wait_till(str_flag)
function script_flag_wait()
function set_for_time(n_time, str_flag)
function wait_till_all_timeout(n_timeout, a_flags)
function wait_till_any_timeout(n_timeout, a_flags)
function _delay_set(n_delay, str_flag, str_cancel)
function set_val(str_flag, b_val)
function exists(str_flag)
function wait_till_timeout(n_timeout, str_flag)
function wait_till_all(a_flags)