Hello, everyone. I've been playing with the editor a lot lately. I don't have any actual background in modding, and I haven't used other map editors (SC: BW, WC3, etc.). I'm essentially learning by doing and reading as many tutorials and watching as many videos as I can. So far, I have been doing rather well muddling my way through the triggers and actors and models.
I am setting up a new trigger now, allowing an MMO-style heal. I've got everything working. The player hits Control + H and if he is not healing already, the unit plays an animation, pauses, waits about 8 second, and begins healing. When Control + H is pressed and he is healing, the unit becomes unpaused, another animation plays, and control is regained.
Unfortunately, though, all I can do in terms of making the unit sit still during the animation (rather than playing it all the way through) is make the animation play really, really slowly (set to 0.01) rather than pause the unit completely. Is there a way to completely freeze the animation?
The other problem I'm having is that, while it's quite a simple matter to play an animation such as "Death," I can't seem to figure out what I need to be doing (I assume it's something in Actors/Events +) to allow the unit to play a different animation (say, "Wounded," or something else) that the unit is not able to play initially. How do I apply the characteristics of an animation to a unit who does not have access to that animation initially? Is it even possible?
Anyway, is your ability being handled through triggers or through the data editor? It sounds like you are using the former.
One nice effect would be to make the caster constantly loop the animation during the duration. It would probably look better than him being absolutely still for 8 seconds.
This would be a lot easier (in my opinion) through the data editor (though not as intuitive perhaps). You can make a channeled ability that creates an 8 second persistent effect which applies another effect when it expires (the heal). Then, you can use the unit's actor and add event responses for the ability starting and stopping, which apply certain animations to the unit. You can look at the SCV, for example, whose actor starts a timer when he begins using his Harvest or Repair abilities. Every time the timer runs out, the worker plays the "Work" animation. When he stops using the ability, the timer is killed (so it won't cause him to keep playing the animation). You could do the same with your unit and just have it loop it's casting animation, or whatever.
The best way to freeze a unit completely would be to use an actor message:
Actor - Send message "AnimSetTimeScaleGlobal 0.001000" to actor (Actor for Marine [16.11, 15.82])
That won't make it freeze completely, but reduce it down to 0.1% of the original animation speed instead of 1%.
You have to look reeeeally closely to see a change.
I am really enjoying just figuring everything out (mainly by just reading everything and messing with stuff) and this has really helped, particularly in that regard. I just played around for something like 20 minutes with the Send Message command, and I can't wait until I have time to explore the possibilities some more.
I was trying to do it through triggers, simply by making CTRL+H run through a series of conditions and playing animations. I can't believe I never thought of making it an ability and just not putting it on the command card. Both of your advice will, I'm sure, prove to be invaluable.
Thanks! :D
The best way to freeze a unit completely would be to use an actor message:
Actor - Send message "AnimSetTimeScaleGlobal 0.001000" to actor (Actor for Marine [16.11, 15.82])
That won't make it freeze completely, but reduce it down to 0.1% of the original animation speed instead of 1%.
You have to look reeeeally closely to see a change.
Create dummy behavior Flag Hidden
Go to your unit actor
(Or For MUI create a new actor set target to _Unit for all targets in events/term)
Go to Events
Make new event
Event Behavior.your dummy behavior.On
Term Animation Pause - Enabled (BSD)
Make new event
Event Behavior.your dummy behavior.Off
Term Animation Pause - Disabled (BSD)
Use your trigger to add or remove your dummy behavior
Create dummy behavior Flag Hidden
Go to your unit actor
(Or For MUI create a new actor set target to _Unit for all targets in events/term)
Go to Events
Make new event
Event Behavior.your dummy behavior.On
Term Animation Pause - Enabled (BSD)
Make new event
Event Behavior.your dummy behavior.Off
Term Animation Pause - Disabled (BSD)
Use your trigger to add or remove your dummy behavior
Oh. Man.
This solves a huge issue I was having.
I am still having trouble applying an animation to a unit, though.
It would probably help if I made myself more clear (since, upon reading my first post, I realize that I was rather vague). As I'm making a heal command, the animation should play until the character appears to be resting, then pause (or loop as Dinadan suggested, if the loop looks right). If the player, for instance, gets up and leaves the computer for a number of minutes (coffee break, maybe?), when he returns, the character should have continued resting without change. This latter problem is completely solved by Zifoon's suggestion (thank you, sir!), but I still don't know how to apply a new animation to the unit actor/model. I'm trying to play around with making an ability with a hot key of CTRL+ H (rather than doing it through triggers).
I don't mean to keep berating everyone with questions; it must make me seem unappreciative, and I am certainly not. Unfortunately, I am still kind of a noob when it comes to the editor.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello, everyone. I've been playing with the editor a lot lately. I don't have any actual background in modding, and I haven't used other map editors (SC: BW, WC3, etc.). I'm essentially learning by doing and reading as many tutorials and watching as many videos as I can. So far, I have been doing rather well muddling my way through the triggers and actors and models.
I am setting up a new trigger now, allowing an MMO-style heal. I've got everything working. The player hits Control + H and if he is not healing already, the unit plays an animation, pauses, waits about 8 second, and begins healing. When Control + H is pressed and he is healing, the unit becomes unpaused, another animation plays, and control is regained.
Unfortunately, though, all I can do in terms of making the unit sit still during the animation (rather than playing it all the way through) is make the animation play really, really slowly (set to 0.01) rather than pause the unit completely. Is there a way to completely freeze the animation?
The other problem I'm having is that, while it's quite a simple matter to play an animation such as "Death," I can't seem to figure out what I need to be doing (I assume it's something in Actors/Events +) to allow the unit to play a different animation (say, "Wounded," or something else) that the unit is not able to play initially. How do I apply the characteristics of an animation to a unit who does not have access to that animation initially? Is it even possible?
Any and all help is greatly appreciated!
That's a long cast time!
Anyway, is your ability being handled through triggers or through the data editor? It sounds like you are using the former.
One nice effect would be to make the caster constantly loop the animation during the duration. It would probably look better than him being absolutely still for 8 seconds.
This would be a lot easier (in my opinion) through the data editor (though not as intuitive perhaps). You can make a channeled ability that creates an 8 second persistent effect which applies another effect when it expires (the heal). Then, you can use the unit's actor and add event responses for the ability starting and stopping, which apply certain animations to the unit. You can look at the SCV, for example, whose actor starts a timer when he begins using his Harvest or Repair abilities. Every time the timer runs out, the worker plays the "Work" animation. When he stops using the ability, the timer is killed (so it won't cause him to keep playing the animation). You could do the same with your unit and just have it loop it's casting animation, or whatever.
The best way to freeze a unit completely would be to use an actor message:
Actor - Send message "AnimSetTimeScaleGlobal 0.001000" to actor (Actor for Marine [16.11, 15.82])
That won't make it freeze completely, but reduce it down to 0.1% of the original animation speed instead of 1%.
You have to look reeeeally closely to see a change.
Oh, wow.
I am really enjoying just figuring everything out (mainly by just reading everything and messing with stuff) and this has really helped, particularly in that regard. I just played around for something like 20 minutes with the Send Message command, and I can't wait until I have time to explore the possibilities some more.
I was trying to do it through triggers, simply by making CTRL+H run through a series of conditions and playing animations. I can't believe I never thought of making it an ability and just not putting it on the command card. Both of your advice will, I'm sure, prove to be invaluable. Thanks! :D
But there is a way to pause and play unit animation; let's just not post workarounds
http://forums.sc2mapster.com/development/map-development/3145-persistent-hardened-shield-effect/#p11
Create dummy behavior Flag Hidden
Go to your unit actor
(Or For MUI create a new actor set target to _Unit for all targets in events/term)
Go to Events
Make new event
Event Behavior.your dummy behavior.On
Term Animation Pause - Enabled (BSD)
Make new event
Event Behavior.your dummy behavior.Off
Term Animation Pause - Disabled (BSD)
Use your trigger to add or remove your dummy behavior
Oh. Man.
This solves a huge issue I was having.
I am still having trouble applying an animation to a unit, though.
It would probably help if I made myself more clear (since, upon reading my first post, I realize that I was rather vague). As I'm making a heal command, the animation should play until the character appears to be resting, then pause (or loop as Dinadan suggested, if the loop looks right). If the player, for instance, gets up and leaves the computer for a number of minutes (coffee break, maybe?), when he returns, the character should have continued resting without change. This latter problem is completely solved by Zifoon's suggestion (thank you, sir!), but I still don't know how to apply a new animation to the unit actor/model. I'm trying to play around with making an ability with a hot key of CTRL+ H (rather than doing it through triggers).
I don't mean to keep berating everyone with questions; it must make me seem unappreciative, and I am certainly not. Unfortunately, I am still kind of a noob when it comes to the editor.