• 🏆 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!

[Trigger] Animation Problem +rep

Status
Not open for further replies.
Level 6
Joined
Feb 7, 2009
Messages
162
Nub question. I have need a tentacle to appear out of the ground but when I do something like this.

  • SandStormStart
    • Events
    • Conditions
    • Actions
      • Trigger - Turn on SandStorm <gen>
      • Wait 2.00 seconds
      • Unit - Create 1 Tentacle for Player 1 (Red) at (Center of Region 009 <gen>) facing (Center of (Playable map area))
      • Animation - Change (Last created unit)'s animation speed to 25.00% of its original speed
He just appears. It does not play the birth animation. I've tried doing a play animation right after its created but you can still see it appear and then it plays the animation.
 
Level 7
Joined
Oct 14, 2008
Messages
340
Okay I just tried a little something that worked out perfectly. I created a spell based off carrion swarm that had no damage or animation, a dummy spell to target a location. I then added the trigger below, which brought a tentacle out of the ground, playing it's birth animation nice and smoothly.

  • SummonTentacle
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Summon Tentacle
    • Actions
      • Set TempPoint = (Target point of ability being cast)
      • Unit - Create 1 Tentacle for Player 1 (Red) at TempPoint facing 270.0 Degrees
      • Animation - Change (Last created unit)'s animation speed to 25.00% of its original speed
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: set udg_TempPoint = null
Now of course you can add timed life to this summon or whatever you want.
Only problem i can think of is, if the unit is in range of an enemy when it spawns, it will attack, and this will cancel out the birth animation and just play the attack animation. To solve this you can either A: pause the unit while it's being "born" or B: use Set unit animation by index, I've found that this action will loop an animation over and over no matter what that unit is doing, until it's animation is reset.

Hope I helped.
 
Status
Not open for further replies.
Top