• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Make mouse can't move unit.

Status
Not open for further replies.
you can't disable the ability to move by right click but there is ways around it. I will show the most easy way.

order unit to stop every time its ordered to move.
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • Unit - Order (Triggering unit) to Stop

it's fail. that keyboard movement using ordering the unit.
 
I have came up with a better understandable Jass (non-JGNP) version of the same file in my last post. The vJass version is because i directly ripped the system out of my map.
Anyway, before copy and pasting the two triggers into your map, be sure that "Automatically create unknown variables when pasting triggers" is checked.

To check it, in the main window of your world editor, go to File > Preferences... , select the General tab and check the box "Automatically create unknown variables when pasting triggers". You can then copy both triggers into your map.

Delete the trigger "Variable Creator" after you paste it into your map.
 

Attachments

This should do, BUT it will require JassNewGenPack.
If you already have it, then it's fine.

But units will STILL auto-acquire (auto-attack) enemies if they have attack enabled. I have no solution for that except for adding unit classification worker or setting Attack - Targets allowed to Self.

don't need worry my game have no any unit can attck
 
You mean to say the unit still moves when targeting a location?

could you tell me what you did to put the system into your map?
Because the test map works for me.

Erm.. you're misunderstanding my broken english...

your JASS is work perfectly but it's also disabled the keyboard movement system i used, because it's also moving the unit with ordering the unit.

Any ideas?
 
ohh i see!
I have now implemented a variable that controls the unit moving.
it is called "StopMovement_Enabled" (in Jass, it is called udg_StopMovement_Enabled)
You must re-implement the system again.

When it is set to true by default. Whenever your movement system issues the
  • Unit - Issue Order Targeting a Point
action, just set StopMovement_Enabled to false and then to True after that.

Example:
  • Set StopMovement_Enabled = False
  • Unit - Order (Your unit) to Move To (Your point)
  • Set StopMovement_Enabled = True
EDIT: forgot to attach the map, lol.
 

Attachments

Last edited:
ohh i see!
I have now implemented a variable that controls the unit moving.
it is called "StopMovement_Enabled" (in Jass, it is called udg_StopMovement_Enabled)
You must re-implement the system again.

When it is set to true by default. Whenever your movement system issues the
  • Unit - Issue Order Targeting a Point
action, just set StopMovement_Enabled to false and then to True after that.

Example:
  • Set StopMovement_Enabled = False
  • Unit - Order (Your unit) to Move To (Your point)
  • Set StopMovement_Enabled = True
EDIT: forgot to attach the map, lol.

ok , thanks.... (getting and ready do it to MUI -.-)
 
ohh i see!
I have now implemented a variable that controls the unit moving.
it is called "StopMovement_Enabled" (in Jass, it is called udg_StopMovement_Enabled)
You must re-implement the system again.

When it is set to true by default. Whenever your movement system issues the
  • Unit - Issue Order Targeting a Point
action, just set StopMovement_Enabled to false and then to True after that.

Example:
  • Set StopMovement_Enabled = False
  • Unit - Order (Your unit) to Move To (Your point)
  • Set StopMovement_Enabled = True
EDIT: forgot to attach the map, lol.

oh no , is't vJASS?
 
oh no , is't vJASS?

No, no. This is just the GUI part you can do by yourself. The system will just do the rest.
Let me explain: The example i gave you is in GUI. By setting StopMovement_Enabled to [highlight]true/false[/code], it will [highlight]enable/disable[/code] my system, allowing your movement system to move your unit.

If you still don't understand I'll gladly make it simpler.
 
No, no. This is just the GUI part you can do by yourself. The system will just do the rest.
Let me explain: The example i gave you is in GUI. By setting StopMovement_Enabled to [highlight]true/false[/code], it will [highlight]enable/disable[/code] my system, allowing your movement system to move your unit.

If you still don't understand I'll gladly make it simpler.

nope , it's perfect , and it's not vJASS.

i getting eror because i forget to remove the old 1 (your trigger) and just paste the newest and save. caused eror. this problem is solved now , just a thanks
 
Status
Not open for further replies.
Back
Top