• 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 to disable move function?

Status
Not open for further replies.
First of all go to gameplay constants, and find the field called Minimum move speed and set it to 0. Then set the move speed of the unit you want to be immobile to 0.

you dont need to set the minimum move speed to 0.
It's enough to set the units move speed to 0 or remove the ability to move with jass:
JASS:
call UnitRemoveAbility( whichunit, 'Amov' )
 
  • Like
Reactions: Rui
Level 9
Joined
Jul 27, 2006
Messages
652
Setting movespeed to 0 will disable ANY type of movement, e.g blink, normal movement ect.

If you want to be able to turn and move via abilities set move speed to 1.
That way its hardly moving but can still turn/blink.
@Diablo - Interesting... So you can remove the actual movment ability ( is that what its doing? )
I think War3 does just that when setting movespeed to 0?
 
Level 9
Joined
Jul 27, 2006
Messages
652
To do that you can just set the units damage dice to 0 and 0.
Unless you only want to use stormbolt as your attack for a short time then this is perfect, the unit will have no damage or attack ability.
But i was also wondering what the ones for attack,defend,patrol,sight ect are?
 
Level 4
Joined
Apr 29, 2007
Messages
88
But i was also wondering what the ones for attack,defend,patrol,sight ect are?

Then don't post until DragoonZombie answer, why? Because I has been write the same question a half hours faster than you
 
Level 9
Joined
Jul 27, 2006
Messages
652
I know you posted before me believer, i just wanted to show that i also wanted to know what the abilities are.
 
Level 9
Joined
Jul 27, 2006
Messages
652
That wouldnt work tonks, what if you ordered your unit to cast a spell and he moved to get to the target?

@Norad - that little bit of script removes the "movement" ability from the unit, makeing him unable to move.
 
Level 3
Joined
Jan 4, 2006
Messages
30
I just want to retain the movement and movement speed of each units and I use triggers to move them around but I cannot move them to wherever I wish. When I use this trigger, it crashes the game when I tried to move a unit.
Events:
Unit - A unit owned by Player 1 is issued an order targeting a point
Unit - A unit owned by Player 1 is issued an order targeting an object
Actions:
Unit order (ordered unit) to move to (center of region 000)
Anyone can help?
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
Raw Data Orders
Attack - Aatk
ARal - Rally Point (Buildings)
Amov - Move
Adef - Footman's Defend
As for Stop and Hold Position, I don't think you can remove them by not removing Move. You can completly disable a unit by using the Pause function.

  • Unit - Pause (Unit)
 
Last edited:
when you remove the move ability ( [highlight]Amov[/code] ) you're also removing [highlight]Patrol[/code], [highlight]Hold Position[/code], [highlight]Stop[/code] and if the unit has no attack [highlight]Move[/code] too.
If you just want to hide the attack button, then go to object editor and turn "Combat - Attack x - Show UI" to false.

Heres a small list of abilities you cant find in the abilities category, but in the Add Ability list.
Name - Raw Code
Attack - Aatk
Move - Amov
Locust - Aloc
Hero - AHer
On Fire - Afir
Turret - Attu
Try to remove the Hero ability from a hero and move the cursor over the hero. What do you think will happen?
Fatal Error!
 
Level 3
Joined
Jan 4, 2006
Messages
30
How can I remove all the button icons (move,attack move,patrol) without interfering with other things? I just want to restrict the user from moving or stopping the unit at his own will.
Anyway, whats wrong with the trigger i show above? Why does the game crashes?
 
How can I remove all the button icons (move,attack move,patrol) without interfering with other things? I just want to restrict the user from moving or stopping the unit at his own will.
Anyway, whats wrong with the trigger i show above? Why does the game crashes?

You can give the unit the "Ward" classifications ( dont know if spelled right ), but that will hide the entire UI of the unit ( like spells ) and you can only order the unit with rightclick. And Vexorian made a super order stop for his Selection System, where you can do nothing with the hero, but select. No sure if i'm allowed to post the trigger here ( JASS ). Could be done in GUI too.

I dont see any troubles with the trigger. Maybe some other trigger crashes the game.
 
Level 3
Joined
Jan 4, 2006
Messages
30
You can give the unit the "Ward" classifications ( dont know if spelled right ), but that will hide the entire UI of the unit ( like spells ) and you can only order the unit with rightclick. And Vexorian made a super order stop for his Selection System, where you can do nothing with the hero, but select. No sure if i'm allowed to post the trigger here ( JASS ). Could be done in GUI too.

I dont see any troubles with the trigger. Maybe some other trigger crashes the game.

The unit I'm trying to limit is a normal unit, not a hero. The player owns the unit, but shouldn't be able to give it orders. I move the units with some triggers so I don't want the players to move them but the units should be able to move at their own speeds.

Something must be wrong with the trigger. The trigger crashes everytime you move your unit. Even though I made a new map with no triggers, it still crashes the game so it must be something to do with the trigger.
 
hmm.... The only solution left for me is making a periodic deselect trigger.
Since the select event takes 1 - 2 seconds you can make it check every 0.x seconds.

  • No Order
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units owned by Player 1 (Red) matching ((((Matching unit) is A Hero) Equal to False) and (((Matching unit) is alive) Equal to True))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Picked unit)) Equal to Player 1 (Red)
            • Then - Actions
              • Selection - Remove (Picked unit) from selection for Player 1 (Red)
            • Else - Actions
 
Level 3
Joined
Jan 4, 2006
Messages
30
Thanks for the trigger. I don't think I need the hero-false part cause my map have no heroes. How to do the loop part? I can't find it. Is there any way to make the units ignore the orders? Cause using this trigger I fear that it will make my map lag cause it keeps checking for the conditions.

And Purplepoot, isn't the trigger I posted before is reordering the unit when its ordered? What's wrong with it? Seems correct but crashes even when I use it in a new map with nothing else.
 
Last edited:
Level 3
Joined
Jan 4, 2006
Messages
30
I've managed to create another trigger that almost solve my problem.
Events
Unit - A unit owned by player 1 (red) is issued an order targeting a point
Actions
Unit Group - Order (Units currently selected by (Owner of (Ordered unit))) to move to (center of region 000 <gen>)
Using this trigger, it moves the units selected but when I move multiple units it becomes so laggy. Any help?
 
Level 11
Joined
Jul 12, 2005
Messages
764
I shouldn't lag, but it should crash...
Look at the event and the action. It's a deadly circle. Insert two lines, disable/enable trigger.
  • Events
  • Unit - A unit owned by player 1 (red) is issued an order targeting a point
  • Actions
  • Trigger - Disable (This trigger)
  • Unit Group - Order (Units currently selected by (Owner of (Ordered unit))) to move to (center of region 000 <gen>)
  • Trigger - Enable (This trigger)
+Remove the group leak!

And btw, how did this trigger solve your problem?
 
Level 3
Joined
Jan 4, 2006
Messages
30
Thank you Paskovich. The turn off and on trigger solves it. Just wondering what is the logic behind it. The trigger is turned off but you can still move the unit??? How is that possible?

This trigger solves the problem by making the unit go to the specified place even though the owner move, attack, attack move, stop, hold postion or patrol the unit. (added order targeting an object and order with no target to the events)
 
Status
Not open for further replies.
Top