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

Permanent invisibility with collision disabled

Level 2
Joined
Jan 22, 2024
Messages
7
Good morning to everybody.

I want the Permanent Invisibility ability to also have collision with other units turned off.

Just like wind walk has it, but without using wind walk. Since my goal is for my unit to be invisible even when attacking and at the same time be able to pass through units like wind walk.

I have tried giving my hero 2 skills, ghost and wind walk with modified transition time. But when you activate the modified wind walk you lose your invisibility.

I want to know if it can be done just by modifying some ability without triggers. Or well, I would appreciate if someone can do it with a detonator because I don't know much about the subject, I'm still learning.

P.S. How do I get the "ghost" and "permanent invisibility" skills to appear in my hero's skill list, because it doesn't appear when I select it.

My world editor is 1.27 b
 
Level 20
Joined
Aug 29, 2012
Messages
826
I think this action already existed as of 1.27 didn't it?

  • Unit - Turn collision for (Triggering unit) Off.
Then you set an event depending on how it's supposed to be acquired, on map initialization, when the hero learns a skill, etc.

P.S. How do I get the "ghost" and "permanent invisibility" skills to appear in my hero's skill list, because it doesn't appear when I select it.

I suppose they don't show up because they are unit abilities, not hero ones. You'd need to create custom version of them and set this to true

1708770016179.png
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,546
I think some abilities are just coded to never show, the workaround is to use another ability to act as the icon. So for example, if it's a Hero ability based on Permanent Invisibility then you would instead use another Hero ability, let's say Storm Hammers which has no effect and simply acts as an Icon. Then add/adjust the level of the Invis ability with triggers.
  • Events
    • Unit - A unit Learns a skill
  • Conditions
    • (Learned skill) Equal to Permanent Invis (Hero - Icon)
  • Actions
    • Set Variable AbilityId = Permanent Invis (Unit - Ability)
    • Unit - Add AbilityId to (Triggering unit)
    • Unit - Set level of AbilityId for (Triggering unit) to (Learned skill level)
    • Custom script : call UnitMakeAbilityPermanent( GetTriggerUnit(), true, udg_AbilityId )
The custom script allows the ability to be retained after death (morphing as well I think?).
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,546
Thank you very much for the answers.

¿Is it possible to add collision disabled with other units in the same trigger?
If you're referring to my trigger then you just have to add the disable Action to it:
  • Events
    • Unit - A unit Learns a skill
  • Conditions
    • (Learned skill) Equal to Permanent Invis (Hero - Icon)
  • Actions
    • Set Variable AbilityId = Permanent Invis (Unit - Ability)
    • Unit - Add AbilityId to (Triggering unit)
    • Unit - Set level of AbilityId for (Triggering unit) to (Learned skill level)
    • Custom script : call UnitMakeAbilityPermanent( GetTriggerUnit(), true, udg_AbilityId )
    • Unit - Turn collision for (Triggering unit) Off.
 
Top