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

[General] Distructibles and Pathing Blockers

Status
Not open for further replies.
Level 12
Joined
Sep 11, 2013
Messages
385
Hi guys!

I made this spell who can destroy every distructible, but i want to put this "Ice Rock Gate" as an excetion who can't be destroyed. The problem is, even when i change his category in phathing blockers, this trigger still destroy it..

upload_2020-2-26_12-4-34.png


How can i make an exception or how can i set this "Ice Rock Gate" to invulnerable/indestructible?

The help will be appreciated!
 
That's because you're picking all destructibles in the 700 radius, pathing blockers are also destructibles.

Add condition to exclude pathing blockers, or specifically the ice gates.

"Pick all destructibles in 700 radius matching 'Destructible type of matching unit is not equal to ice Rock Gate' and do 'Kill Picked Destructible'
 
Last edited:
Level 12
Joined
Sep 11, 2013
Messages
385
I don't know how to set this trigger, i'm a begginer in triggers..

"Pick all destructibles in 700 radius matching 'Destructible type of matching unit is not equal to ice Rock Gate' and do 'Kill Picked Destructible'

Can you help me a little more, please?
 
Level 42
Joined
Feb 27, 2007
Messages
5,328
While the essence of what Strydhaizer suggested is correct, there is no "pick destructibles matching..." function. Instead, you must pick them all and then use an if-then-else to decide whether or not to kill the destructible:
  • Destructible - Pick every destructible in <range condition> and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Destructible-type of (Picked destructible)) Not equal to Ice Rock Gate
          • (Destructible-type of (Picked destructible)) Not equal to Line of Sight Blocker
          • -------- etc. for all destructible types you want to exclude --------
        • Then - Actions
          • Destructible - Kill (Picked destructible)
        • Else - Actions
You are also leaking locations in your trigger. I suggest you read this thread to learn how to avoid/fix those leaks: Things That Leak
 
Level 12
Joined
Sep 11, 2013
Messages
385
You are also leaking locations in your trigger. I suggest you read this thread to learn how to avoid/fix those leaks: Things That Leak

Can you tell me, please, how to avoid the leaks?

I don't understand.. I spam my spell (Thunder Clap) near Ice rock Gate and nothing wrong happen. 64/65 fps all the time.

Everything seems to work just fine, so i don't understand what i need to fix..
 
Last edited:
Do it like this, add Temp Loc at the very top of the Actions, then put the Custom Script at the very bottom.

  • Actions
    • Set TempLoc = (Position of (Triggering unit))
    • Special Effect - Create a special effect at TempLoc using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
    • Custom script: call RemoveLocation(udg_TempLoc)
 
Level 12
Joined
Sep 11, 2013
Messages
385
Do it like this, add Temp Loc at the very top of the Actions, then put the Custom Script at the very bottom.

  • Actions
    • Set TempLoc = (Position of (Triggering unit))
    • Special Effect - Create a special effect at TempLoc using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
    • Custom script: call RemoveLocation(udg_TempLoc)

upload_2020-2-27_18-12-48.png


Like this?

TempLoc is a "point" type variable?

I really don't know what i'm doing right now..
 
Yep, that's all good.

By the way you can actually make that trigger look much more simpler

Like this

  • Events
  • Conditions
  • Actions
    • Set TempReal = 0.00
    • Set TempLoc = (Position of (Triggering unit))
    • For each (Integer A) from 1 to 8, do (Actions)
      • Loop - Actions
        • Special Effect - Create a special effect at (udg_TempLoc offset by 150.00 towards TempReal degrees) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
        • Special Effect - Destroy (Last Created Special Effect)
        • Set TempReal = (TempReal + 45.00)
    • Custom script: call RemoveLocation(udg_TempLoc)
You also don't have to screenshot the triggers when you're posting triggers here, just 'Copy as text' your triggers, and paste it between
Code:
[TRIGGER] [/TRIGGER]

upload_2020-2-28_3-41-1.png
 
Last edited:
Level 42
Joined
Feb 27, 2007
Messages
5,328
It’s a reference thread that says “here’s what a leak is, and here are all the ways to avoid them for every type of object.” It links to a structured tutorial if you have the inclination delve deeper.

Reading the thread, knowing how to apply the concept (singular, not plural), and then rote copying the ‘fixes’ into your map where appropriate is absolutely beneficial and worth your time. It’s an essential mapmaking skill (automatic Lua garbage collectors aside) that will save you a massive amount of time you would otherwise spend asking questions (those like your last posts here) and waiting for responses before you can continue.
 
Status
Not open for further replies.
Top