ItsMods

Full Version: level waittill("event" or " this event");
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys there is a way to do this?

level waittill("event" or "that event");
level notify("event" or "that event");
(07-11-2011, 15:35)rotceh_dnih Wrote: [ -> ]level notify("event" or "that event");

??? is this the answer or you are kidding me?
mmm Perhaps we have not understood, I want to know the syntax to wait for this notification or that other
HE is being serious..

PHP Code:
randomcode()
{
    
self waittill("death")

    if(
self level.importantperson)
    {
        
level notify("important_person_dead")
    }
}

morerandom()
{
    
level waittill("important_person_dead")
    
    ...

Use this function
Code:
waittill_any( string1, string2, string3, string4, string5 )
{
    assert( IsDefined( string1 ) );
    
    if ( IsDefined( string2 ) )
        self endon( string2 );
    if ( IsDefined( string3 ) )
        self endon( string3 );
    if ( IsDefined( string4 ) )
        self endon( string4 );
    if ( IsDefined( string5 ) )
        self endon( string5 );
    
    self waittill( string1 );
}


Just put #include common_scripts\utility; on top of your script file and then use waittill_any("bla","blaa");
lol that will hurt his head i think
It even hurt pozzuh's head for some while xd
(07-11-2011, 16:19)Justin Wrote: [ -> ]It even hurt pozzuh's head for some while xd

EVEN ME, yes

self waittill_any("death", "disconnect", "3", "4", "5");

red = optional