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

how can i make a unit garrison inside a neutral building and change its owner

Status
Not open for further replies.
Give the building devour (natural hostle), Devour cargo - (set devour cargo damage to 0) and unload. If your unit is close to a building and casts a 'enter' ability, order the building to devour the casting unit and make the building yours via triggers. to exit the building - unload.

Targets allowed:
devour (natural hostle) - enemy, friend, invulnerable, organic, vulnerable
Devour cargo - enemy, friend, ground, invulnerable, natural, vulnerable
unload - defult

note: you can only have one unit inside at a time. Maby you can have more than one but I didn't find a way yet.
 
Last edited:
there are many ways:
-make a custom roar ability and modifi it to do nothing. if a unit is close enough to the building, use triggers to add the enter abilty, else remove the ability.
a unit starts the effect of an ability
ability being cast equal to roar
order 'your building' to natural devour casting unit
(no need to check range because nothing will happen when the casting unit is further than the casting range of devour)

-OR-

-give the building the abilty to buy a free unit (like travens on melee maps where you can buy heroes or hire units). Lets name the free unit 'enter' and go to triggers.
If a unit comes within 100 range of your building.
Entering unit equals to 'enter'
Remove entering unit from the game.
Pick every unit within 100 range of your building and do actions
order 'your building' to natural devour picked unit.

-OR-

Use a target ability. Lets take a modified Acid bomb and call it 'enter'; your acid bomb or enter has 100 cast range
A unit starts the effect of an ability
Ability being cast equal to 'enter'
order (target of ability being cast) to natural devour (casting unit)
 
Last edited:
Level 9
Joined
Nov 19, 2011
Messages
516
There is Loading Unit pointer and unit custom value.

Custom value should be equal to loaded units count.

+1 per each loaded unit
-1 per each unloaded unit

And no need custom ability for this. Just script. Try in vJass section how to refer to easiest refer to loaded unit.
 
Status
Not open for further replies.
Top