2 Questions

Prometheus

Everything is mutable; nothing is sacred
Reaction score
590
1. I have a spell thats triggered and I got my hero to sop casting the spell but I need to know if there is a way to just stop a trigger. If I turn it off and then back on it finishes.

2. I have a unit with the preist model and I want him to use his stand 4 animation and stay like that untill the spell is done. I'm guessing I would use the stand animation name and then channel but I don't know the name. I tried what it said when I placed it on the map and cycled through it's animations which is stand - 4 but that didn't work.
 
T

ThePixelator

Guest
#2: there is no way to make your unit do the stand-4 animation. I've asked this myself. Don't know why Its like that. :nuts:
 

SFilip

Gone but not forgotten
Reaction score
634
1. there is always General - Skip remaining actions i guess.
2. afaik there is no way to change to stand 4. the thing is that you can only specify an animation tag such as stand, walk etc.
the game then chooses manually and there's nothing you can do to change it. the only way is renaming the animation.
 

wonderpriest

New Member
Reaction score
18
1. If you turn off a trigger, it will run until the end of it's actions, so you need to use it along with "Skip Remaining Actions".

2. You need to use JASS natives to play any animation that is "special". To do this, you would need to use custom script and write in
Code:
Custom Script: call SetUnitAnimationByIndex(udg_YourUnitVar, integer)
For udg_YourUnitVar, set the unit you want to change the animation of in a variable, then replace that with your variable, with a "udg_" in front. Replace "integer" with an integer, and that will define which animation to play. Each unit's animation indexes are different, so you will need to try several times before getting the right one. Start with zero.

Edit: Dang, it took me five minutes to type that?
 
T

ThePixelator

Guest
#1: clarify. If I get what youre saying, you tell the hero to stop channeling. but the trigger doesnt stop?

If I am correct with my interpretation, then make a seperate trigger like this:

Code:
events-
a unit stops casting an ability

conditions-
ability being stopped = (your ability)

actions-
set stop=true

then, in your trigger for the main spell, put this action in when you should stop it:

Code:
if stop = true then do skip remaining actions

hope this helped :D
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
590
wonderpriest said:
Code:
Custom Script: call SetUnitAnimationByIndex(udg_YourUnitVar, integer)

If I wanted it to stay in the position I would do...
Code:
Custom Script: call SetUnitAnimationByIndex(udg_Enegizer, channel, integer)
 

SFilip

Gone but not forgotten
Reaction score
634
no, if i understood correctly you'd have to test
call SetUnitAnimationByIndex(udg_Enegizer, 0)
call SetUnitAnimationByIndex(udg_Enegizer, 1)
call SetUnitAnimationByIndex(udg_Enegizer, 2)
etc.
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
590
okay, thanks

Edit: Doesn't work, it gives me the error "Expected A Name".
 

SFilip

Gone but not forgotten
Reaction score
634
are you sure udg_Enegizer exists? expected a name usually means wrong function/variable name.
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
590
I fixed it by setting the Enegizer to a local and useing that, odd.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top