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

Removing Locust Completely

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
Straight to the point, how to completely remove locust from a unit ?

I tried with this trigger it worked well

  • Locust Removal
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Custom script: local unit Caster = GetTriggerUnit()
      • Custom script: call UnitAddAbility(Caster, 'Aloc')
      • Custom script: call ShowUnit(Caster, false)
      • Custom script: call UnitRemoveAbility(Caster, 'Aloc')
      • Custom script: call ShowUnit(Caster, true)
      • Custom script: call UnitAddAbility(Caster, 'A001')
      • Unit - Order (Triggering unit) to Night Elf Druid Of The Claw - Bear Form
      • Custom script: call UnitRemoveAbility(Caster, 'A001')
      • Custom script: set Caster = null
The unit can still be selected and controlled, BUT...

1. You cannot click-select the unit, you can only drag-select the unit.
2. Other unit/self can't target the unit (Target-unit type spell)

How to completely remove these problems ?

Test map is below, try it.
 

Attachments

  • Locust Removal Test.w3x
    12.7 KB · Views: 68
Level 4
Joined
Aug 8, 2011
Messages
84
I haven't personally tried it, but supposedly chaos transforming a unit temporarily and instantly back works entirely.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Alternate and normal forms need to be different units. Normal unit type can be anything, alternate should be the type of the caster.
What if, for instance, I used a spell, that can render that unit to become Locust (temporary) and then removes the locust (completely) ?

Do I need to copy every single unit-type in that map to suit the ability "Data - Alternate Unit Type" ?
 
Level 26
Joined
Mar 19, 2008
Messages
3,140
^Unfortunately, you are forced to do so. You can skip that action using ReplaceUnitBJ() (yes bj - if your spell has no target restrictions, it's better to use this function instead of performing functions manually) although cooldowns and buffs that affected replaced unit will be removed from the 'new' replacing unit.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Just add/remove works, are you sure we don't need to order that unit to bearform ?

What I did (in the test map, provided on first post) was that I used the method of giving Bear Form to the unit -> Order it to cast Bear Form -> Remove it

It's done, BUT, the 2 problems occur (refer to the first post)

How can I avoid these problems ?
 
Level 26
Joined
Mar 19, 2008
Messages
3,140
I doubt that adding/removing twice works properly if we stick to Hero Passive Transformation tutorial. I've always used the add/order -> bear/remove - and this works for sure.

EDIT: Adding/Removing twice works if we use two differend abilities if I'm not mistaken (in second one we replace alternative/normal form values).
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
Kill/revive the unit works.
You can use an instant passive revive ability :

add the ability, kill the unit, remove the ability.

Of course you will have other drawbacks, like if the unit was channeled a spell.

Fairly useless but interesting to know drawbacks of 'Aloc' :

http://www.thehelper.net/forums/showthread.php/128138-SetUnitSelection

But if passive morph works, then it's probably the best solution, i suppose order shouldn't be stopped, nor unit selection, in fact it would be just unnoticeable for players.
 
Status
Not open for further replies.
Top