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

lock unit in place

Status
Not open for further replies.
Level 7
Joined
Jan 30, 2011
Messages
267
i want to make a unit with 2 forms:
1 form can move, the other one not
the form, that cant move, must still be able to turn, when it attacks, which is not possible, if i just reduce movement speed to 0 (then its kinda a building)
if i lock it in place with ensnare, then it cant use robogoblin ability anymore, which i am using to switch between the 2 forms
i thought of solving it by using "channel" as dummy and then changing forms with "chaos", but i heard, that chaos is buggy
 
Level 9
Joined
Jul 10, 2011
Messages
562
sure it still can turn if you set movementspeed to 0 and let the turn rate as it is Oo did that several times and never had a problem...
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
sure it still can turn if you set movementspeed to 0
Are you joking, or being sarcastic ?
Setting movement speed of a unit to 0 will make that unit unable to turn any longer.
But this case does not affect the unit's Attack/Cast spell.
It will still attack units (even the enemy unit is at behind), it will play attack animation and damage is normal, the only weird thing is that the unit does not turn while attack/cast spell.

@69stehend
Okay I provided a test map, take a look.
If you're ok with that approach, I will make it as you want it (the changing form bla bla)
 

Attachments

  • test16.w3x
    13.2 KB · Views: 47
Level 7
Joined
Jan 30, 2011
Messages
267
thx for your suggestion, but im looking for a more "perfect" solution (that the unit just gets moved back whenever it tries to moves doesnt look very good in game)

i'll try it with chaos for the first
 
Level 7
Joined
Jan 30, 2011
Messages
267
ah, a good function^^ thx :)
what real do i set when i want to make the unit moveable again?

EDIT: found out that i can use probably any real greater or equals 1

but what exactly does that function do?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Oh yeah, SetUnitPropWindow renders unit to be immobile (if set to 0) while allowing the unit to still turn around and face enemy unit.

While the movement-stop imitates like my trigger, but this one will give you the best and more efficient result.

ah, a good function^^ thx :)
what real do i set when i want to make the unit moveable again?
GetUnitDefaultPropWindow(whichUnit)
Use that function to restore the value for each unit.
 
Status
Not open for further replies.
Top