• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[General] Distructibles and Pathing Blockers

Status
Not open for further replies.
Level 11
Joined
Sep 11, 2013
Messages
327
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 11
Joined
Sep 11, 2013
Messages
327
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 39
Joined
Feb 27, 2007
Messages
5,034
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 11
Joined
Sep 11, 2013
Messages
327
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:
Level 39
Joined
Feb 27, 2007
Messages
5,034
Read the thread and the other tutorial it links to at the start. It explains what leaking is, why it is ultimately bad, and how to fix it. I’m not about to type it all out for you here when that thread is a great resource.
 
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 11
Joined
Sep 11, 2013
Messages
327
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 39
Joined
Feb 27, 2007
Messages
5,034
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