• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Question: How to revert the "dying" graphic of units

Status
Not open for further replies.
Level 4
Joined
Aug 24, 2005
Messages
50
hi all,
as the title might suggest i got a little problem.

in a map i made i would like one of the heroes (who has a flesh golem skin) to "rebuild" itself whe using a reincarnation-based spell.
therefore a death-graphic (the golem falling into its different parts) in reverted form (all the parts building itself back together to form the golem) would look just awesome.

now the question is: is there any command for the animation of the spell or is this only possible with triggers, and if so, what would such a trigger look like?
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
You can. I'm not entirely sure if it's the exact animation, but it can be done.

  • Actions
    • Unit - Play UNIT's death animation
    • Animation - Change UNIT's animation speed to (0.00 - 20.00)% of its original speed
-20% is about the same as 100% reversed. At 100% you play animations at normal speed, and at -20% you have about the same speed, but played reversed. -100% shows it way too fast.

I've already tried this before with a Life ability, which you can download right here. This file is an exported trigger file. Just open a map and choose 'File --> Import Triggers...'. Remember that this will replace all current made triggers, so I suggest you import it in a new map and Cope/Paste it into whatever you want.

This trigger used to be in my Final Fantasy IX campaign before I changed to statistic triggering. Therefore it's applied to certain info like custom abilities. You can just apply this trigger to the info you need or use this as a base for your own ability trigger.
 
Level 4
Joined
Aug 24, 2005
Messages
50
seems i cant import a w3a file as triggerfile :/
wanted to see how to attach the code to an ability.

could you explain how to add it to the reincarnation at the moment it "activates"?

oh and thanks for the quick answers ^^
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Reincarnation
PS: Everybody can import a .w3a file unless you don't have The Frozen Throne expansion. If you got the expansion, go to the Trigger Editor and choose 'File --> Import Triggers...'
 
Level 4
Joined
Aug 24, 2005
Messages
50
k i tested it, and it didnt work :/

i have the expansion, but i can only import .wtg files with the trigger editor ...
the trigger looks exactly like the 2 posts of u combined (ofc with my ability & stuff)

btw i couldnt add -20 as a value for the animation speed (it said 0.00 is minimum) so i just used 0 + (-20) as a value.
yes, the usage of negative values is allowed .. normally :(
maybe the "starts the effect" doesnt work or because the value doesnt work like that ... i will try "finished" abilitiy
oh and i used "death" as animation name. maybe wrong?
 
Last edited:
Level 18
Joined
Aug 23, 2008
Messages
2,319
(0 - 20)% is exactly what I said, because I knew negative values can't be directly entered in that screen.

And about the file I send you: That was my mistake. I accidentally send you a different file. The right file can be downloaded here. The trigger has been tested at the time and works. All you have to do is add new variables/info to the trigger where needed and you'll have to adjust it to Reincarnation. This trigger is for units that are invulnerable, since I wanted it to be target-specific. You'll have to apply it for a passive automatic activating trigger.

'death' is the correct name for teh animation. Just check the trigger I send you.
 
Last edited:
Level 4
Joined
Aug 24, 2005
Messages
50
hmm this is just the same file, with exactly the same name and link xD
the trigger-files got the ending .wtg when exported

i tried the trigger with queuing the animation but still no effect
if i force him to import the file anyways there are no triggers anymore.

are you using any modified version of the worldeditor maybe? so that its not compatible anymore?

EDIT: i just created a testmap and tested all 5 unit-cast-events to test which one "detects" the usage of the reincarnation.
problem is: none of them worked ... the game just doesnt seem to be able to check for the usage of this ability because it is a passive one or whatever .. -.-
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
There are no problems with the file, the servers are just down for a moment I think. Try again in a moment. Just check that file and I know it will work.

Nothing but the original World Editor is used. no imports are made either, only variables and an ability to start the trigger.
 
Level 4
Joined
Aug 24, 2005
Messages
50
yep the download is working fine, i can download the file life.w3a, and i cant import it because its not shown when i try to import a triggerfile.

besides, the main problem is that i (or better: the game) can not check when the hero dies/uses reincarnation.
all checks for spells dont work, neither does the death-check(because actually the unit isnt dead) nor the reviving check(because this only checks the reviving of heroes at an altar)

there just seems to be no useful way to detect it properly

EDIT: ok now i could download the correct file
quite a cool ability idea u designed.
but unfortunately it does not solve my problem to detect the "usage" of reincarnation in the event-part of the trigger :/

EDIT2: i had the idea to check when his life falls below 1 (meaning he would die)
but this doesnt seem to be possible with a unit created after the map started. tried it with variable but it doesnt show up ..
 
Last edited:
Level 4
Joined
Aug 24, 2005
Messages
50
as stated above, a unit with reincarnation does not count as dying when it dies xD it even gains experience while lying around waiting for reincarnation.

thats why i cant detect it that way :/

so basically thanks to you i know HOW to get that animation done, i just dont know how to "tell" the game when to display it because of reincarnation not working as a common spell it seems ...
 
Level 4
Joined
Aug 24, 2005
Messages
50
maybe stupid tip... but tried unit hp == 0?

yep, tried.
this hp-check can only be run on units selected directly in the editor, directly on the map, and already placed -.-
i cant even define variables for it .. dunno why its made that way.
maybe there is any way to check it in pure jass, but im not really experienced with that.
if anyone knows how to script it this way, it would be nice if you could post it for me :)
 
Level 11
Joined
Dec 31, 2007
Messages
780
you can add a non-placed unit to specific unit events... vis the "add event" trigger... you can store some unit into a variable then use the "add to ( your trigger ) the event (some units hp lower than 1)" and then your trigger will run when that units hp goes below 1

--

or else you can periodically check for any unit who's hp is lower tahn 1 or = to 0 matching units has an ability of type blabla bla

get it?
 
Level 4
Joined
Aug 24, 2005
Messages
50
you can add a non-placed unit to specific unit events... vis the "add event" trigger... you can store some unit into a variable then use the "add to ( your trigger ) the event (some units hp lower than 1)" and then your trigger will run when that units hp goes below 1

--

or else you can periodically check for any unit who's hp is lower tahn 1 or = to 0 matching units has an ability of type blabla bla

get it?

i already stored the unit in a variable. the events added via trigger are events as well, meaning i cant use my stored variable when it comes to the lifepointcheck
oh and i tried to use different types of variables(unit, unitgrp & unit type) all of which didnt work as specified unit for the trigger

and for the second idea: periodical checks .. i think this would need to be checked every 0.01sec or such to really get the moment this occurs.
therefore it would cause massive lags i guess

so either i dont get what u meant or it doesnt work xD
 
Level 11
Joined
Dec 31, 2007
Messages
780
you didnt get what i said about trigger add event

create a new trigger

go to actions

go to triggers

and find "add to trigger the event" action.

with that action you can add a generic unit to an specific unit event ...

if you still dont get it ill make a trigger for you
 
Level 11
Joined
Dec 31, 2007
Messages
780
i dont know if this is gonna help you but

  • Unit casts an ability
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Thunder Clap
    • Actions
      • Set Caster = (Triggering unit)
      • Trigger - Add to Damage detection trigger <gen> the event (Unit - Caster's life becomes Equal to 0.00)
this will add caster (a unit variable) to an event that previously could only be for pre placed units
 
Status
Not open for further replies.
Top