• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Add Event not working.

Status
Not open for further replies.
Level 12
Joined
Mar 10, 2008
Messages
869
I have a jumper that makes units "jump" when they go near the unit: jumper.
If I do
  • Actions
    • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to (==) Jumper)) and do (Actions)
      • Loop - Actions
        • Trigger - Add to Jumper <gen> the event (Unit - A unit comes within 65.00 of (Picked unit))
It's not working.
Any ideas:confused:
 
Try this:
  • Actions
  • Set Temp_Group = (Units in (Playable Map Area))
  • Unit Group - Pick up every unit in (Temp_Group) and do (Actions)
    • Loop - Actions
      • Set Temp_Unit = (Picked unit)
      • Trigger - Add to Jumper <gen> the event (Unit - A unit comes within 100.00 of (Temp_Unit)
  • Custom script: call DestroyGroup (udg_Temp_Group)
65.00 is a way too low value. Rememeber, normal attack range is 100.00 & 128.00 (considered as melee); then 65.00 would be really nothing. In order a unit gets that close to a unit, it has to have Pathing - Collision size = 0. :)
 
Level 12
Joined
Mar 10, 2008
Messages
869
I have it all under control. I just need it to add the god damn events!

  • Set Group = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to (==) Jumper))
  • Unit Group - Pick every unit in Group and do (Actions)
    • Loop - Actions
      • Set Unit = (Picked unit)
      • Trigger - Add to Jumper <gen> the event (Unit - A unit comes within 65.00 of Unit)
  • Custom script: call DestroyGroup (udg_Group)
What the hell :mad:
Not working either.
 
Level 12
Joined
Mar 10, 2008
Messages
869
What about: Matching unit type... that might be the problem.

EDIT: Hah, I added the Matching Unit type to your trigger and it didn't work then.

EDIT2: Holy shit! I did
  • Set Group = (Unit type of Jumper)
  • Unit Group - Pick every unit in Group and do (Actions)
    • Loop - Actions
      • Set Unit = (Picked unit)
      • Trigger - Add to Jumper <gen> the event (Unit - A unit comes within 65.00 of Unit)
  • Custom script: call DestroyGroup (udg_Group)
And it worked!
 
Level 3
Joined
Apr 9, 2008
Messages
45
What about: Matching unit type... that might be the problem.

EDIT: Hah, I added the Matching Unit type to your trigger and it didn't work then.

EDIT2: Holy shit! I did
  • Custom script: call DestroyGroup (udg_Group)
And it worked!
Thanks for the wonderfull trigger, but i am suffering a heavy memory leak issue over here.
And the part i quoted from your post makes my map unusable.
Any help is appreciated =)

This is my trigger:
  • test
    • Events
    • Conditions
    • Actions
      • Set Jumperunitgroup = (Units of type Jumper)
      • Unit Group - Pick every unit in Jumperunitgroup and do (Actions)
        • Loop - Actions
          • Set Jumper = (Picked unit)
          • Trigger - Add to Red jumper <gen> the event (Unit - A unit comes within 175.00 of (Picked unit))
Red jumper is the following trigger:
  • Red jumper
    • Events
    • Conditions
      • (Triggering unit) Equal to Escaper 0020 <gen>
    • Actions
      • Set Facing_Var = (Facing of (Triggering unit))
      • Set Escaper = (Triggering unit)
      • Unit - Add Crow Form to (Triggering unit)
      • Unit - Remove Crow Form from (Triggering unit)
      • Animation - Change (Triggering unit) flying height to 600.00 at 400.00
      • Trigger - Turn on Untitled Trigger 002 Copy <gen>
      • Wait 1.00 seconds
      • Animation - Change (Triggering unit) flying height to 0.00 at 400.00
      • Wait 1.00 seconds
      • Trigger - Turn off Untitled Trigger 002 Copy <gen>
Untitled Trigger 002 Copy is this trigger:
  • Untitled Trigger 002 Copy
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Location[1] = (Position of Escaper)
      • Set Temp_Location[2] = ((Position of Escaper) offset by (Slidingspeed x 2.00) towards Facing_Var degrees)
      • Unit - Move Escaper instantly to Temp_Location[2]
      • Custom script: call RemoveLocation(udg_Temp_Location[1])
      • Custom script: call RemoveLocation(udg_Temp_Location[2])
Hopefully i gave you people enough info about my triggers :)

Edit: NVM, i really need to learn to use my head for 3 seconds(read: 3 hours) from now on.
I forgot to change the group name, so i did that now and its working fine now.

Sorry for the inconvenience.

Edit #2: After some extensive testing (just came back from vacation so i didn't have the time earlier on) it still seems to "leak" i don't want to call it leak because i don't think its the trigger....
When i place like more then 50(just some number i made up, but defiantly below 100) it starts lagging like hell, but it doesn't memory leak.
Myself i think this is because it needs to add to many events to the other trigger.

This is the trigger that event's get added TO:
  • Red jumper
    • Events
    • Conditions
      • (Triggering unit) Equal to Escaper 0020 <gen>
    • Actions
      • Set Facing_Var = (Facing of (Triggering unit))
      • Set Escaper = (Triggering unit)
      • Unit - Add Crow Form to (Triggering unit)
      • Unit - Remove Crow Form from (Triggering unit)
      • Animation - Change (Triggering unit) flying height to 600.00 at 400.00
      • Trigger - Turn on Untitled Trigger 002 Copy <gen>
      • Wait 1.00 seconds
      • Animation - Change (Triggering unit) flying height to 0.00 at 400.00
      • Wait 1.00 seconds
      • Trigger - Turn off Untitled Trigger 002 Copy <gen>
This is the trigger that adds the events:

  • test
    • Events
    • Conditions
    • Actions
      • Set Jumperunitgroup = (Units of type Jumper)
      • Unit Group - Pick every unit in Jumperunitgroup and do (Actions)
        • Loop - Actions
          • Set Jumper = (Picked unit)
          • Trigger - Add to Red jumper <gen> the event (Unit - A unit comes within 175.00 of (Picked unit))
      • Custom script: call DestroyGroup( udg_Jumperunitgroup )
And that trigger gets run by this trigger:

  • Create stuff
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • -------- Jumper --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Acolyte 0000 <gen> is selected by (Owner of (Triggering unit))) Equal to True
        • Then - Actions
          • Unit - Create 1 Jumper for Player 1 (Red) at (Target point of issued order) facing Default building facing degrees
          • Trigger - Run test <gen> (checking conditions)
        • Else - Actions
Any help is welcome :grin:
 
Last edited:
Status
Not open for further replies.
Top