• 🏆 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!

[Trigger] I need help with a trigger!!!!

Status
Not open for further replies.
Level 1
Joined
Jul 14, 2009
Messages
2
Hi guys and gals, I need some help with a trigger.

The trigger is supposed to spawn a certain unit at the position of a certain type of dying destructible and I've tried several times but failed, one of my tries was:

Event: Destructible - A destructible within (Entire Map) dies

Condition: (Destructible-type of (Dying destructible)) Equal to Summer Tree Wall

Action: Unit - Create 1 Footman for Neutral Hostile at (Position of (Dying destructible))

Doesent work :/

I need some serious help because I think this map can reach the top ;)

Please help me / Sissso

{EDIT}
Hi guys and gals, I need some help with a trigger.

The trigger is supposed to spawn a certain unit at the position of a certain type of dying destructible and I've tried several times but failed, one of my tries was:

Event: Destructible - A destructible within (Entire Map) dies

Condition: (Destructible-type of (Dying destructible)) Equal to Summer Tree Wall

Action: Unit - Create 1 Footman for Neutral Hostile at (Position of (Dying destructible))

Doesent work :/

I need some serious help because I think this map can reach the top ;)

Please help me / Sissso
 
Last edited by a moderator:
Level 8
Joined
Aug 1, 2008
Messages
420
  • destructible
    • Events
      • Destructible - A destructible within (Entire map) dies
    • Conditions
      • (Destructible-type of (Dying destructible)) Equal to Summer Tree Wall
    • Actions
      • Set TempPoint = (Position of (Dying destructible))
      • Unit - Create 1 Footman for Neutral Hostile at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempPoint)
See if that works.
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
Destructible - A destructible within (Entire map) dies

That event works only for 64 first placed destructibles. You will have to make it like this:

  • Destructible Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Destructible - Pick every destructible in (Entire map) and do (Actions)
        • Loop - Actions
          • Trigger - Add to Execute <gen> the event (Destructible - (Picked destructible) dies)
  • Execute
    • Events
    • Conditions
      • (Destructible-type of (Dying destructible)) Equal to Summer Tree Wall
    • Actions
      • Set TempPoint = (Position of (Dying destructible))
      • Unit - Create 1 Footman for Neutral Hostile at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempPoint)
Works fine for me.
 
Easy, use 2 triggers, or 1 and edit 1

Vars:

  • Initalization
    • Events
      • Map Initalization
    • Conditions
    • Actions
      • Destructible - Pick every destructible in (Playable map area) and do (Actions)
        • Loop - Actions
          • Trigger - Add to (Trigg2) the event (Destructible - (Picked destructible) dies)
  • Trigg2
    • Events:
    • Conditions:
    • Actions:
      • Create 1 Footman at Position of (Picked Destructable)
BTW, i'm not sure if this leaks, but i dont think so because there's no such thing as a destructable group

And there's a point leak, if you want to fix that too.
Answer your question?
 
Status
Not open for further replies.
Top