Results 1 to 5 of 5

Thread: Triggers

  1. #1
    Member Ki!ler-Mk1's Avatar
    Registered
    Apr 2005
    Location
    Boston, England
    Posts
    2,013

    Triggers

    Can anyone explain the trigger properties below:


    ReTriggerDelay

    RepeatTriggerTime


    I've done research and i still dont understand, what i want is so that this trigger triggers every X(10) seconds if there is a marine in its radius, this then drives a randomtrigger which sets of spawns to the left or right.

    Currently i've got a dispatcher running off the trigger with a 10 sec delay before the event for the randomtrigger, but i would prefer to do this the correct way.

  2. #2
    Member Baz's Avatar
    Registered
    Jan 2005
    Location
    0xbaadf00d
    Posts
    3,094
    RepeatTriggerTime; //if > 0, repeat trigger message at this interval is still touching other
    ReTriggerDelay; //minimum time before trigger can be triggered again

    Looking through the code, RepeatTriggerTime is only checked if ReTriggerDelay is 0, so check that 1st.
    What RepeatTriggerTime does is, when an actor is touching it, it sets the triggers timer event, when the timer is called it only touches touching actors. It doesn't appear to trigger the triggers own event. Looks like you need a custom timed trigger (although triggers were never my strong point, and I've not looked at unrealscript in so long, chances are I'm totally wrong ). trigger!

    In the event of hell freezing over, overriding the Timer function in your subclass with the below code may work.

    Code:
    function Timer()
    {
    	local bool bKeepTiming;
    	local Actor A;
    
    	bKeepTiming = false;
    
    	ForEach TouchingActors(class'Actor', A)
    		if ( IsRelevant(A) )
    		{
    			bKeepTiming = true;
    			Touch(A);
    		}
    
    	if ( bKeepTiming )
           {
    		SetTimer(RepeatTriggerTime, false);
                    
                    //this line of code was added!
                    TriggerEvent(Event, self, self);
           }
    }
    Maybe the dispatcher is the correct way.
    ..it's safer here.

  3. #3
    Member Ki!ler-Mk1's Avatar
    Registered
    Apr 2005
    Location
    Boston, England
    Posts
    2,013
    So theoretically:


    ReTriggerDelay = 10
    RepeatTriggerTime = 0

    Should do it? cus i mean it worked ok on single player but on a server the trigger fired, cus of its message but we never saw any aliens.

  4. #4
    Member Baz's Avatar
    Registered
    Jan 2005
    Location
    0xbaadf00d
    Posts
    3,094
    Rereading through the code there is no need for a subclass (I was totally wrong!), ReTriggerDelay = 10 and RepeatTriggerTime = 0 fires the trigger. Have you tried it without the random trigger?
    ..it's safer here.

  5. #5
    Member Ki!ler-Mk1's Avatar
    Registered
    Apr 2005
    Location
    Boston, England
    Posts
    2,013
    Im trying to set it up to fire every 10 seconds, as long as someone is in the radius, ignoring people leaving and reentering etc.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Odd volumes and alien triggers.
    By Ki!ler-Mk1 in forum Alien Swarm 2K4 Mapping
    Replies: 5
    Last Post: 6th Feb 2007, 08:13 AM
  2. triggers and alien spawners
    By RahRaider in forum Alien Swarm 2K4 Mapping
    Replies: 1
    Last Post: 21st Jan 2005, 12:37 AM
  3. TH / Triggers ...
    By DhaThief in forum Thievery Mapping
    Replies: 4
    Last Post: 5th Apr 2003, 01:45 AM

Posting Permissions

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