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

stoping a unit

Status
Not open for further replies.
Level 2
Joined
Nov 4, 2007
Messages
6
Stoping a unit when spell is activated.

How would i go about make a unit unable to move when a spell is activate.

desired effect:

unit activates searing arrow.

unit is unable to move when it is activated.

thank you for any help you can give:thumbs_up:
 
Last edited:
Level 2
Joined
Nov 4, 2007
Messages
6
I tried that and all it did was make the unit stop but with one click could continue on its way.

what i am looking for is when a ability is activated such as searing arrow, the unit will be unable to move until the spell is deactivated.

it is possible that i did not use the trigger correctly so if it can be done with 'set movement speed' please give me an example of the trigger.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
  • Custom Script: call UnitRemoveAbility(GetTriggerUnit(),'Amov')
this will remove units move-patrol ability
  • Custom Script: call UnitAddAbility(GetTriggerUnit(),'Amov')
dont forget to add it later
 
Level 2
Joined
Nov 4, 2007
Messages
6
  • Untitled Trigger 001
    • Events
      • Unit - A unit owned by Player 1 (Red) Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Aim Shot_test
    • Actions
      • Custom script: call UnitRemoveAbility(GetTriggerUnit(),'Amov')
this is what i tried with no effect.

I trust you know what you taking about but could you please explain it a bit more in detail.

thank you for your help need_02
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
'Amov' ability is units moving ability
if you remove it unit will act like a building
It wont be able to move and its move-patrol actions will be removed
re-add the ability after you finish the spell

AND ITS "O" not 0 !!!!!!!!!!!!!!!!
 
Level 11
Joined
Aug 25, 2006
Messages
971
From what I've tried, adding back the 'move' doesn't seem to work for me. Removing it works fine, but adding it back doesn't always work.
 
Level 3
Joined
Sep 20, 2007
Messages
37
i tried this out and i'm having a problem re-adding the skill Amov once it's been taken, i think the problem is i'm not using a triggering unit. i've tried
call UnitAddAbilityBJ('Amov',udg_unit[1]), and
call UnitAddAbility(udg_unit[1],'Amov') but i'm guessing the unitaddability wants a function for the destination or somethin because it's not working right now
 
Level 11
Joined
Aug 25, 2006
Messages
971
As far as I know, its straight out impossible to give back the move ability once its been taken, find a different way. Perhaps you could wait for a unit to do any kind of move order, then order the unit to stop
 
Level 2
Joined
Nov 4, 2007
Messages
6
Ok guys first off, thanks for all the suggestions.

I have been out all night drinking so i won't be able to try them right now but will do tomorrow and lets you know what works.

what i am looking for is whats done in the drakonia rpg so i can make a hunter class hero have aim shot and not be able to move when activated but have bonus damage.

i thought about using defend but that just slows the units movement and not stop it.

once again thank you all for your help.:thumbs_up:


I am also looking for help with making an rpg. if intrested pm me and maybe we can get on vent and get some ideas going.
 
Status
Not open for further replies.
Top