Results 1 to 8 of 8

Thread: Triggers place...

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 451 Times in 305 Posts
    Quote Originally Posted by Moczulak
    Hey i have problem ,i write this script and if several items that trigger works only one.
    I use this table:
    (see below)

    Work only one table... Please help me.
    Your script keeps waiting until it gets triggered and it also loops the first trigger. You need to add a thread after you spawn the trigger.

    PHP Code:
    placeTriggers()
    {
        for(
    0level.burntriggers.sizei++)
        {
            
    trig =  spawn("trigger_radius"level.burntriggers[i].origin0level.burntriggers[i].radiuslevel.burntriggers[i].height);
            
            while(
    1)
            {
                
    trig waittill("trigger"player);
                
                if(
    player istouching(trig))
                {
                    
    player iprintlnbold("1");
                }
            }

            
    // the script never comes here
            // so can never spawn the second trigger
        
    }

    Last edited by Mitch; 12th January 2013 at 18:43.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •