• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Visible Goblin Land Mine

Status
Not open for further replies.
Level 8
Joined
Jul 18, 2010
Messages
332
Hello, i'm trying to make a visible GLM(Goblin Land Mine) using triggers here but I can't make it to work. Just like GLM, this spell summons a GLM(it's the evil shock in this trigger) but instead it's visible and whenever an enemy unit comes close to it it will explode and deals a certain amount of damage(the damage is triggered too). But the GLM can also explode after a certain amount of time depending on the expiration timer and will also deal damage. The problem is once the spell has been casted the GLM will explode immediately (don't know why) and if there's an enemy unit nearby, it wouldn't deal any damage. So, yeah, if anyone can make this spell work, please make it work.
  • evil shock
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Evil Shock
    • Actions
      • Sound - Play DIO2_Special_EvilShock2 <gen> at 100.00% volume, attached to (Triggering unit)
      • Set evilshockunit = (Triggering unit)
      • Set shockpoint = (Position of (Triggering unit))
      • Set shockpoint_Copy = (shockpoint offset by 150.00 towards (Facing of (Triggering unit)) degrees)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (evilshockunit has buff Asmodian Devil Path ) Equal to False
        • Then - Actions
          • Unit - Create 1 Evil Shock for (Owner of (Triggering unit)) at shockpoint_Copy facing Default building facing degrees
          • Unit - Add a 75.00 second Generic expiration timer to (Last created unit)
          • Hashtable - Save Handle Of(Last created unit) as 1 of (Key (Last created unit)) in aoehashtable
          • Unit Group - Add (Last created unit) to evilshocks
        • Else - Actions
          • Unit - Create 1 Evil Shock for (Owner of (Triggering unit)) at shockpoint_Copy facing Default building facing degrees
          • Unit - Add a 100.00 second Generic expiration timer to (Last created unit)
          • Hashtable - Save Handle Of(Last created unit) as 1 of (Key (Last created unit)) in aoehashtable
          • Unit Group - Add (Last created unit) to evilshocks
          • Set shockpoint_Copy_2 = (shockpoint offset by 150.00 towards ((Facing of (Triggering unit)) + 180.00) degrees)
          • Unit - Create 1 Evil Shock for (Owner of (Triggering unit)) at shockpoint_Copy_2 facing Default building facing degrees
          • Unit - Add a 100.00 second Generic expiration timer to (Last created unit)
          • Hashtable - Save Handle Of(Last created unit) as 1 of (Key (Last created unit)) in aoehashtable
          • Unit Group - Add (Last created unit) to evilshocks
      • Trigger - Turn on evil shock trigger <gen>
      • Custom script: call RemoveLocation(udg_shockpoint)
      • Custom script: call RemoveLocation(udg_shockpoint_Copy)
      • Custom script: call RemoveLocation(udg_shockpoint_Copy_2)
  • evil shock trigger
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in evilshocks and do (Actions)
        • Loop - Actions
          • Set evilshockpoint = (Position of (Picked unit))
          • Set evilshocks_Copy = (Units within 200.00 of evilshockpoint matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an ally of (Owner of (Picked unit))) Equal to False) and ((((Matching unit) is
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (evilshockunit has buff Asmodian Devil Path ) Equal to False
            • Then - Actions
              • Unit Group - Pick every unit in evilshocks and do (Actions)
                • Loop - Actions
                  • Unit - Cause evilshockunit to damage (Picked unit), dealing ((Real((Strength of evilshockunit (Include bonuses)))) x 20.00) damage of attack type Chaos and damage type Normal
            • Else - Actions
              • Unit Group - Pick every unit in evilshocks and do (Actions)
                • Loop - Actions
                  • Unit - Cause evilshockunit to damage (Picked unit), dealing ((Real((Strength of evilshockunit (Include bonuses)))) x 25.00) damage of attack type Chaos and damage type Normal
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in evilshocks_Copy) Greater than 0
            • Then - Actions
              • Unit - Kill (Load 1 of (Key (Picked unit)) in aoehashtable)
              • Unit Group - Remove (Picked unit) from evilshocks
            • Else - Actions
          • Custom script: call RemoveLocation(udg_evilshockpoint)
          • Custom script: call DestroyGroup(udg_evilshocks_Copy)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in evilshocks) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Do nothing
  • evil shock Copy
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Evil Shock
    • Actions
      • Wait 0.03 seconds
      • Set shockpoint = (Position of (Dying unit))
      • Unit - Create 1 Chaos Fusion 3 (Pet) for (Owner of (Dying unit)) at shockpoint facing Default building facing degrees
      • Unit - Kill (Last created unit)
      • Unit - Create 1 Chaos Fusion 3 (Pet) for (Owner of (Dying unit)) at shockpoint facing Default building facing degrees
      • Unit - Kill (Last created unit)
      • Set evilshocks_Copy = (Units within 200.00 of shockpoint matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an ally of (Owner of (Picked unit))) Equal to False) and ((((Matching unit) is dea
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (evilshockunit has buff Asmodian Devil Path ) Equal to False
        • Then - Actions
          • Unit Group - Pick every unit in evilshocks and do (Actions)
            • Loop - Actions
              • Unit - Cause evilshockunit to damage (Picked unit), dealing ((Real((Strength of evilshockunit (Include bonuses)))) x 20.00) damage of attack type Chaos and damage type Normal
        • Else - Actions
          • Unit Group - Pick every unit in evilshocks and do (Actions)
            • Loop - Actions
              • Unit - Cause evilshockunit to damage (Picked unit), dealing ((Real((Strength of evilshockunit (Include bonuses)))) x 25.00) damage of attack type Chaos and damage type Normal
      • Custom script: call DestroyGroup(udg_evilshocks_Copy)
      • Custom script: call RemoveLocation(udg_shockpoint)
 
Level 8
Joined
Jul 18, 2010
Messages
332
I'm not really sure on how to fix what you're saying. Can you tell me what should i change in the trigger? Oh, another problem that i found is when a unit comes close to one of the mines, all of the mines that are existing in the map will explode instead of just the mine where the unit was in.
 
Status
Not open for further replies.
Top