Capture Trigger help.

Penguin-

Member
Reaction score
4
I have this trigger to capture a "point" in my map. It works fine for both teams except for one bug.

When a hero runs off and on the point the trigger fires multiple times before the 5 second wait is up. Therefore after the point has been captured the conditions for the xp give action are still fulfilled.

I.e.
By running on and off 3 times before the point changes, you will receive 3 lots of xp.

In short I am looking for something along the lines of a "this trigger is not already running" condition.


Centre Point
Events
Unit - A unit comes within 75.00 of Circle of Power (medium) 0008 <gen>
Conditions
((Triggering unit) is A Hero) Equal to True
(Circle of Power (medium) 0008 <gen> belongs to an enemy of (Owner of (Triggering unit))) Equal to True
(Number of units in (Units in Centre Point <gen> matching ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True)))) Equal to 0
Actions
Wait 5.00 seconds
If ((((Triggering unit) belongs to an ally of Player 1 (Red)) Equal to True) and ((Centre Point <gen> contains (Triggering unit)) Equal to True)) then do (Unit - Change ownership of Circle of Power (medium) 0008 <gen> to Player 1 (Red) and Change color) else do (Do nothing)
If ((((Triggering unit) belongs to an ally of Player 7 (Green)) Equal to True) and ((Centre Point <gen> contains (Triggering unit)) Equal to True)) then do (Unit - Change ownership of Circle of Power (medium) 0008 <gen> to Player 7 (Green) and Change color) else do (Do nothing)
If (((Hero level of (Triggering unit)) Less than 6) and ((Circle of Power (medium) 0008 <gen> belongs to an ally of (Owner of (Triggering unit))) Equal to True)) then do (Hero - Add 100 experience to (Triggering unit), Show level-up graphics) else do (Do nothing)
If ((Circle of Power (medium) 0008 <gen> belongs to an ally of (Owner of (Triggering unit))) Equal to True) then do (Sound - Play QuestNew <gen>) else do (Do nothing)
If ((Circle of Power (medium) 0008 <gen> belongs to an ally of (Owner of (Triggering unit))) Equal to True) then do (Game - Display to (All players) the text: (The |c000000FFMIDDLE POINT|r HAS BEEN CAPTURED BY + (Name of (Owner of (Triggering unit))))) else do (Do nothing)
 

SerraAvenger

Cuz I can
Reaction score
234
make a loop checking ten times in a 0.5 sec interval if the unit still is there.
you will need JASS to make that MUI^^
Greetings Serra
 

Penguin-

Member
Reaction score
4
I cant make a loop in my trigger cos im using RoC editor, and afaik there isnt a loop function.

I don't understand what you mean Slapshot.
 

Penguin-

Member
Reaction score
4
I'm pretty sure it's what serraAvenger reccommended but can anyone help me make a timed check that the unit is still there.

Something along the lines of every 0.5 seconds check the unit is still in the region, if not "stop running trigger"

cheers
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top