No announcement yet.


  • Filter
  • Time
  • Show
Clear All
new posts

  • Triggers

    Can anyone explain the trigger properties below:



    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.
    Alien Swarm Map List

  • #2
    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.

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


    • #3
      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.
      Alien Swarm Map List


      • #4
        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?'s safer here.


        • #5
          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.
          Alien Swarm Map List