HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Disable ClickMovement?

08-19-2007, 05:27 PM#1
Histenchist
Hello, it's been a while since I needed help. And now I just wonder if you can Disable movement but only when you click!?
Sorry if this isn't the right forum.
Thx for reading.
08-19-2007, 05:30 PM#2
SkriK
So that you can steer the unit with the arrows or?
08-19-2007, 06:00 PM#3
Histenchist
Yep, right on.
08-19-2007, 06:13 PM#4
SkriK
Trigger:
Cinematic - Turn Cinematic Mode On
Should do it. But you wont be able to use the UI bottons then.
08-19-2007, 06:22 PM#5
Histenchist
That's pretty useless ;)
08-19-2007, 06:35 PM#6
SkriK
Soooo, you want to only use arrow keys to move the unit but still be able to click on spells and so on?
08-19-2007, 11:55 PM#7
NightBreeze
It's very possible, but only in Jass I think. I completely suck ass at triggers, but I could show (and explain to) you some code that would do that. I made something like that a while ago, it involved a spell in which a unit has to be stuck in a certain animation, but still be able to move. I negate every move and target order given and move the unit completely manually, with facing and everything. It's a hassle, but it works :)
08-20-2007, 12:51 AM#8
Earth-Fury
Collapse JASS:
native UnitRemoveAbility takes unit whichUnit, integer abilityId returns boolean

call UnitRemoveAbility(udg_MyGlobalUnitVariable, 'Amov')

coupled with SetUnitX/Y() for actually moving units.
08-20-2007, 03:28 AM#9
botanic
what about in GUI

event
unit issued order targeting a point
condition
point of issued order <> whatever the arrow keys would do
event
order ordered unit to stop


PS <> means not = to
08-20-2007, 04:34 AM#10
Pyrogasm
Quote:
Originally Posted by botanic
PS <> means not = to
!= or =/= is definitely more standard....
08-20-2007, 05:09 AM#11
Earth-Fury
Quote:
Originally Posted by Pyrogasm
!= or =/= is definitely more standard....
<> is perfectly valid.

.... if you're not describing a fucking GUI trigger... especially then explaining what <> actually means, using it only once.

Anyway, stoping orders like that is just as effective as removing the move ability, except it doesn't get rid of the icon.
08-20-2007, 11:02 AM#12
Histenchist
Earth-Fury: Remove the move wont work since I use arrow controls.
botanic: Same with you're way, then the unit wont be able to move.

Thanks for all the answers, I'll have to find out a way on my own.
08-20-2007, 06:03 PM#13
Pyrogasm
Removing the move ability should work.

Then you simply have to move the unit via timers and play its walk animation instead.

I think it's much better that way.
08-20-2007, 06:25 PM#14
botanic
No my way would work because unless they clicked at EXACTLY the point that teh arrow key would target to move the unit wont move but when the exact point is used it would allow it to move

PS: i used the <> just realized it later and didn't want to go back and delete it :P