| 04-24-2014, 05:59 PM | #1 |
Playing around with custom hero editing, so bare with me. I am making an Ultimate ability. I started by customizing the Spell "Chemical Rage" from the Goblin Alchemist. Everything I want works fine, but I want to also have the animation of Grom turn into the chaos orc when I switch him to the chaos version. I am not sure how to do this using triggers. I know its something like: Trigger: I want it so everytime I click his Ult it does the animation when he transforms, and then converts back to the regular Grom when the Ult timer has ended. |
| 04-25-2014, 02:45 AM | #2 |
First, to allow for the duration of the animations, you'll need to change the "Duration - Normal" fields in the ability to at least 5 seconds. (This will result in him staying red for another 5 seconds at the end of the transformation but you'll just have to deal with that =/) Second, you will need a Unit variable to store the transforming unit in, I called mine GromTempUnit. This is only required because of the wait (which is required so we can queue the animations, they're weird like that in Spell Events). Here's a trigger Trigger: ConvertGromToChaosOr if you like Jass, you don't need the global unit variable because locals rock JASS:function Trig_ConvertGromToChaos_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'ANcr' //REPLACE THIS WITH YOUR ABILITY ID endfunction function Trig_ConvertGromToChaos_Actions takes nothing returns nothing local unit c = GetTriggerUnit() call TriggerSleepAction(0.) call SetUnitAnimation(c, "stand first") call QueueUnitAnimation(c, "stand second") call QueueUnitAnimation(c, "stand third") set c = null endfunction //=========================================================================== function InitTrig_ConvertGromToChaos takes nothing returns nothing set gg_trg_ConvertGromToChaos = CreateTrigger() call TriggerRegisterAnyUnitEventBJ(gg_trg_ConvertGromToChaos, EVENT_PLAYER_UNIT_SPELL_EFFECT) call TriggerAddCondition(gg_trg_ConvertGromToChaos, Condition( function Trig_ConvertGromToChaos_Conditions)) call TriggerAddAction(gg_trg_ConvertGromToChaos, function Trig_ConvertGromToChaos_Actions) endfunction If you have more jass knowledge, you could change it to use a 0.00 second timer instead of the wait which would probably be better but I didn't really notice the wait when I tested it so it's probably ok as is. |
| 04-25-2014, 02:08 PM | #3 | |
Quote:
The new problem I have is what if Grom isn't created yet, such as needs to be created from an Alter first. |
| 04-25-2014, 05:01 PM | #4 |
You shouldn't use a preset unit in your trigger, you need to use a unit variable, same as Fledermaus did in his example. Go to the variable editor (the green X icon at the top of your trigger editor) and create a new unit variable named GromTempUnit, then make your trigger match the example that Fledermaus wrote. Edit: Although I think this would work without the variable if you used "triggering unit" directly, but this is a good opportunity to learn about variables if you are not familiar with them yet so might as well use them. |
| 04-25-2014, 05:44 PM | #5 | |
Quote:
|
| 04-26-2014, 01:12 AM | #6 | |
Quote:
|
| 04-26-2014, 02:35 AM | #7 |
Any way I can fix the wait timer? |
| 04-26-2014, 03:56 AM | #8 |
Change the first animation to "Play Animation", not "Queue". You can probably lower the cast time to about 2.2 as well. |
| 04-26-2014, 04:01 AM | #9 | |
Quote:
|
| 04-26-2014, 04:04 AM | #10 |
Does the Object Editor really not work for something like this? Granted it's been a while for me, but I coulda sworn there were Fields in any given (transform) ability for accessing animations; Morph and Morph Alternate, etc... |
| 04-26-2014, 12:49 PM | #11 | ||||
Quote:
Quote:
the spell I am currently using works fine, the trigger is needed to make the animation work. the metamorph spell doesn't do the spell exactly how i want it to work, however the one I am using does. So what are you trying to explain to me? Quote:
Trigger: ConvertGromToChaos
Quote:
|
| 04-26-2014, 02:49 PM | #12 |
My gut instinct would be to fiddle with the model itself; rename the sequences to Morph etc, try and run them all together, something like that. You can probably avoid a lot of hassle that way; then again, I think Grom's a big model from his two animation sets and you'd obviously need to know your way around model editing. |
| 04-27-2014, 09:45 AM | #13 | |
Quote:
You changed it to the right action, just forgot to change it to stand second. Trigger: Animation - Play GromTempUnit's stand second animation |
| 04-27-2014, 02:47 PM | #14 | |
Quote:
Edit: Did both, same thing happened, it doesn't play either animation now.. it just changes the unit. Trigger: ConvertGromToChaosEdit2: Changed the values correctly Trigger: ConvertGromToChaosPS - what the difference between the que and play? (que animation seems to work) |
| 04-27-2014, 08:55 PM | #15 |
Second one needs to be queue. When you changed the first one to play from queue you forgot to change it to stand second. Trigger: ConvertGromToChaos |
