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

[Trigger] Trigger Net Problem

Status
Not open for further replies.
Level 12
Joined
Jun 28, 2008
Messages
688
An ability I'm making is not working as it is intended to. The ability lays "net traps" on the ground, which are supposed to activate when an enemy comes close enough. Once activated, the trap ensares any nearby enemies for a duration.
The ability is based off of channel and has the orderID flamestrike.

Note: To make the traps activate, I have given them the "Mine - Exploding" ability.

  • Rope Trap
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Rope Trap
    • Actions
      • Set net_point = (Target point of ability being cast)
      • Unit - Create 1 Net for (Owner of (Triggering unit)) at net_point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_net_point)
This trigger is simply for placing the traps.

  • Rope Trap Actv
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Net
    • Actions
      • Set net_point = (Position of (Dying unit))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 350.00 of net_point matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Dying unit))) Equal to True))) and do (Actions)
        • Loop - Actions
          • Set net_target = (Position of (Picked unit))
          • Cinematic - Ping minimap for (Player group((Owner of (Dying unit)))) at net_target for 1.00 seconds
          • Unit - Create 1 dummeh for (Owner of (Dying unit)) at net_target facing Default building facing degrees
          • Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Net to (Last created unit)
          • Unit - Set level of Net for (Last created unit) to (Level of Rope Trap for Player[(Player number of (Owner of (Dying unit)))])
          • Unit - Order (Last created unit) to Orc Raider - Ensnare (Picked unit)
          • Unit - Grant shared vision of (Picked unit) to (Owner of (Dying unit))
          • Wait until (((Picked unit) has buff Ensared ) Equal to False), checking every 1.00 seconds
          • Unit - Deny shared vision of (Picked unit) to (Owner of (Dying unit))
      • Custom script: call RemoveLocation(udg_net_point)
This trigger activates after the traps are approached and "die" due to the mine ability.

The problem lies in the ensaring instance. The map is pinged, the dummy units are created, and vision is granted, but the enemies are not ensared. I would greatly appreciate if anyone could help to figure out why.
 
Level 12
Joined
Jun 28, 2008
Messages
688
I checked all that; the ability costs 0 mana, has appropriate targets, and maximum cast range, but thank you for your input.

Edit: Wow, I feel like a moron... I hadn't changed the Techtree Requirements, ha.
Well, I guess your comment helped, otherwise I probably wouldn't have checked the Object Editor as carefully, so thank you.

/Solved
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
I think i know what happens,,
First 2 questions:
1) Is only 1 unit ensnared or not even one?
2) Where did you base the dummy of? Footman or Sorcerres/Priest?

If only one unit is ensnared i got the solution i think,,
But first some explanation:
When you do: Pick every unit in (Group), it creates a loop, it picks a unit in the group, does the actions in the loop, pick next unit, does the actions again,, and so on,, SO, when you put a wait in it, it will also wait with the next unit to do the actions, it seems that the actions run together, but in fact they run a split second after each other,, so when you put a wait in a loop (Or pick every unit in,,) it will wait until the wait is over(duh)(In your case until unit hasnt got ensnared buff anymore) And then create the next net and ensnare the next unit,,

So, you should remove the wait, and do something else to check for the buff,,
 
Status
Not open for further replies.
Top