HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Question about Amov or stopping a unit

08-14-2003, 08:57 PM#1
Kakumei
I was wondering if any of you might know how (through triggers or the ability editor?) to make a unit stop and have you not be able to move it again. here's whats goin on:

This particular unit in my map "runs" on mana similar to how a car runs on gas. it has 100 mana and every second of the game it loses 1 mana point (by the way i was wondering if there was a different way to drain the mana other than through triggers like an opposite of brilliance aura). When the unit's mana reaches zero i want it to stop and not be able to be moved again but still be able the use it's abilities and items in it's inventory (like if it has a mana potion) and allowing it to use it's drain mana skills and allowing it to move again. The way i was thinking of doing it is through the Remove Ability trigger, but i can't seem to find the Amov unknown ability. can anyone help me out? thanks!
08-14-2003, 09:05 PM#2
Zoi
Yeah, you can do it, but it's a pain. Basically, you gotta set it up so if it does ANYTHING other than what you want it to do, order it to STOP. Even then, you're going to have problems with abilities, because if a unit is outside of the range of the spell, your unit will move to meet it....

I just had another idea... does the "Unit - Set Movement Speed" work if you set it to 0? That could be a solution, but I've never had any luck with that function.

OR, you could replace the unit with an identical unit when it runs out of mana, that has no movement.
08-14-2003, 09:07 PM#3
ComputerDemon
First, the reverse brill aura, you just set the value for mana regen in brill aura to a negative value (if u don't know how, just look for the negative value posts in the forum). Secondly, there are several ways to make the unit stop. You can create a trigger witht the timed event to order target unit to stop every .2 seconds. The other way (not sure if it would work) is to set the movement speed of the unit to 0. I believe it is in the animation section of action triggers.
08-14-2003, 09:34 PM#4
element_5
There's a much easier way than what Zoi suggested. Do what you intended to do, use the Remove Ability action to remove "Amov". You have to specify a different ability in the GUI, then convert the trigger to custom text and change the ability code to "Amov"
08-15-2003, 12:42 AM#5
Kakumei
alright. it seems like im gonna either replace the unit with one with no move ability or just do the stop ever .1 seconds. as for what you suggested element_5, it seems very complicated and if you could elaborate on it maybe or explain it better that would help. i've never worked with gui or other advanced editing like that. thanks guys for the help
08-15-2003, 12:43 AM#6
Kakumei
oh, and by the way, the setting movement speed to 0 doesnt work. it makes it move slow (like speed of ballistas, catapaults etc. which isnt very slow at all) but doesnt stop it.
08-15-2003, 01:34 AM#7
element_5
Step 1: Use the action "Unit - Remove Ability" and choose any ability to remove.
Step 2: Convert the trigger to Custom Text (JASS)
Step 3: Find the section with the ability code you are going to change
Step 4: Change the ability code to "Amov"

Presto :D
08-15-2003, 02:21 AM#8
Kakumei
thx element :-)
08-15-2003, 02:42 AM#9
Kakumei
alright... now that i have the move ability removed when mana is at 0. any ideas on how i can give it back when the mana goes back above zero? the keyword is back above zero
08-15-2003, 03:47 AM#10
Kakumei
at the moment, im trying to make the move reactivation work like this. one triggers goes as follows:

Events: Runner 0031's mana becomes equal to 0

Conditions: none

Actions: Order Runner 0031 to stop
----------- Remove move ability (works fine)
----------- Set Runner1Frozen (integer variable) to 1

the reactivate move trigger goes as follows:

Events: Runner 0031's mana becomes greater than 0

Conditions: Runner1Frozen equal to 1

Actions: Add move ability to Runner 0031
----------- Set Runner1Frozen to 0

So far, only the first trigger (remove move ability trigger) is working. anyone know how i can fix the 2nd one or anyone have a different suggestion as to how i could do it? thanks for your help!
08-15-2003, 04:59 AM#11
element_5
Hmm, I thought doing the same thing with "Unit - Add Ability" would work, but I tested it and it doesn't. Sorry, I don't know how to get it back :( Maybe if you did a "Unit - Replace" and replaced it with a new one.
08-15-2003, 07:06 AM#12
Kakumei
the only problem with that is that all the rest of the trigger parts refer to the unit at Runner 0031. the problem is that there are 3 players with a Runner. so... replacing it would make the other triggers useless. is there a way you think i could use Triggering Unit, or Matching Unit, or unit functions like that to make it work?
08-15-2003, 07:38 AM#13
element_5
If you stored each Runner unit in a variable, it would still work. When you replace the unit, just set the variable to "Last Replaced Unit"

EDIT: And instead of using integer variables to test if the unit is frozen or not, use a Boolean (True/False variable)
08-15-2003, 08:00 AM#14
Kakumei
if i use a boolean value, what would i use as the true false. like, "___???___ Equal To True/False" ?
08-15-2003, 08:07 AM#15
Newhydra
Kakumei, try setting the min speed in game constants to 0, then see if setting the movement speed to 0 stops the unit