• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Abilities that DO NOT interrupt movement

Status
Not open for further replies.
Level 3
Joined
Dec 18, 2008
Messages
36
Can I please get a list (or just one) of "no target" type abilities that will not interrupt the current action of my hero?

i.e. - The ability Item Heal (least) can be cast while moving and allow my hero to continue without having to reissue the command. This ability, however, can not be used as a hero ability as it is not visible on the command panel.
 
Level 6
Joined
Mar 22, 2009
Messages
276
Item Ability Temporary Speed, it's a no target spell or instant cast spell. It doesn't interrupt other commands given to a unit.
 
Level 3
Joined
Dec 18, 2008
Messages
36
Another small problem.
I altered berserk to be my dummy ability and this works flawlessly when casted by the user. But when I use a trigger to order the unit to cast berserk, it DOES interrupt its movement. I want to allow the user to use an autocast feature that i implemented but in its current state the unit will stop moving when I call upon the autocast.

Action - Order (MyHero) to Orc Troll Berserker - Berserk

This line stops the unit. Is there a way to cast this ability using triggers and not interrupt the unit?
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
-if you know that unit is selected use
Game - force player to press <hot-key of ability>

-i think the only way to do it is to use dummy unit that will cast the spell but than you don't have cooldown...

-create dummy unit at position of unit for owner of unit
-set level of ability for dummy unit to level of ability of unit
-order dummy unit to cast ability

WE is dump sometimes -.-


i know a good way to save the last given order but.....

is your unit controlled by player? (best if not :)
if he is controlled by a player,how much players can have that unit?
does it have inventory? (if so,i cant save give/drop item order)
 
Level 3
Joined
Dec 18, 2008
Messages
36
Pharaoh,
Ive had little success with using the jass custom script using the issue order functions.

the function: call IssuePointOrder (orderUnit, orderType, orderPoint)

says I have an invalid number of arguments where orderUnit is of type Unit, orderType is of type Order (or string - tried both) and orderPoint is a location type variable. Am I missing a parameter nessessary to call this function? Same problem with custom scripting the IssueTargetOrder() function. However I did get the IssueImmediateOrder() function to work. Any thoughts?

Alien95,
Im already using dummy to cast the spells themselves, so using the force key (hotkey) would be a great alternative considering the unit is selected and 99% of the time the player will have this 1 unit selected unless hes looking in a shop or another players inventory.

The unit IS player controlled.
Each player (up to 10 players) can control 1 of these units.
Its a hero and it DOES have an inventory.

Thanks

Update: Alien95 the hotkey thing works nicely, I wish I thought of that myself. Only a couple minor restrictions :)

Still would like to know how to use the IssueTargetOrder() IssuePointOrder() functions. I will no doubt need them in the future.
 
Last edited:
Yes, you are doing it wrong.
  • Custom script: call IssuePointOrder (unit, order, x, y)
The script above requires the X and the Y of the location. To make it work with location-type variable, you need this:
  • Custom script: call IssuePointOrderLoc (unit, order, loc)
So, you can make either of the following:
  • Custom script: call IssuePointOrder (GetTriggerUnit(), udg_Order, GetLocationX(udg_loc), GetLocationY(udg_loc)
or
  • Custom script: call IssuePointOrderLoc (GetTriggerUnit(), udg_Order, udg_loc)
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
i have a question :p

how do you order a unit to do Berserk ,Move item,or other n target orders without interrupting him??

when i order a unit to do something trough triggers it will always make him not continue doing the previous order like Berserk does if ordered by player
 
Level 3
Joined
Dec 18, 2008
Messages
36
This is because as soon as you order him to move, attack, or drop item on a location, it erases the current order and replaces it with the ordered one. Ive figured out how to save the previous order string and tell the unit to do it after the previous operation, but i do not know how to save the LOCATION or the UNIT targeted from the previous order (which is really the point of saving it in the first place). So I unless you figure out that part of it, you cant accomplish what you're inquiring about.
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
This is because as soon as you order him to move, attack, or drop item on a location, it erases the current order and replaces it with the ordered one. Ive figured out how to save the previous order string and tell the unit to do it after the previous operation, but i do not know how to save the LOCATION or the UNIT targeted from the previous order (which is really the point of saving it in the first place). So I unless you figure out that part of it, you cant accomplish what you're inquiring about.
saving the previous order is easy the only problem with saving point is that you have to check if it was point/unit/item/destructible point and than save point as point/unit/item/destructible

Try using Windwalk instead of Berserk, as that does not interrupt movement orders.

both of abilities don't interrupt movement when ordered by a player but when you do it with triggers they do

now the only way to fix this will be with a Custom script i guess
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
Couldn't you just do somthing like this?

  • Events
  • Conditions
  • Actions
  • Set ug = Units currently selected by (Triggering player)
  • Selection - Select Unit to unitgroup(Unit) for (Triggering player)
  • Game - Force UI Key (Hotkey) For (Triggering player)
  • Selection - Select (ug) for (Triggering player)
  • Custom script - call DestroyGroup(udg_ug)

1.)
it takes some time for player to select and deselect a unit
2.)
you would have to know the hotkey for every ability you want to cast
3.)
not good...any what if player is passive/hostile/computer...

hotkey thing cant solve this :/

Edit:


4.)
no,it cant work on computers

...
even i if it would work it is bad because you need to know the hotkey of ability you want to cast
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
1. ) i don't think it takes any time at all for triggered selection
2. ) Just store it to a string array, or a hashtable
3. ) I still think it works if it's passive/hostile/computer.

1.)hotkeys are bad anyway,Negatve
2.)its not that easy,there is
object targer unit/item/dest
point target
no target
(yeah i think only way to do this is to store last order of unit,but re-ordering unit does make him stop too,its like ordering unit to move>stop>move
any btw,you cant store it in string array,it must be stored in integer as GetIssuedOrderId()
3.)Neagive

:D
 
Status
Not open for further replies.
Top