HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Convert Grom to Chaos Grom Spell.

04-24-2014, 05:59 PM#1
JCarrill0
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:
ConvertGromToChaos
Events
Conditions
Collapse Actions
Animation - Play Grom's Stand First animation
Animation - Queue Grom's stand second animation
Animation - Queue Grom's stand third animation

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
Fledermaus
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:
ConvertGromToChaos
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Chemical Rage //Replace this with your ability
Collapse Actions
Custom script: set udg_GromTempUnit = GetTriggerUnit()
Wait 0.00 seconds
Animation - Play GromTempUnit's stand first animation
Animation - Queue GromTempUnit's stand second animation
Animation - Queue GromTempUnit's stand third animation

Or if you like Jass, you don't need the global unit variable because locals rock
Collapse 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
JCarrill0
Quote:
Originally Posted by Fledermaus
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:
ConvertGromToChaos
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Chemical Rage //Replace this with your ability
Collapse Actions
Custom script: set udg_GromTempUnit = GetTriggerUnit()
Wait 0.00 seconds
Animation - Play GromTempUnit's stand first animation
Animation - Queue GromTempUnit's stand second animation
Animation - Queue GromTempUnit's stand third animation
Cool, Here is what I got: ("Duration - Normal" fields in the ability is set 2.5 seconds.)
Trigger:
ConvertGromToChaos
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Grom's Rage
Collapse Actions
Wait 0.00 seconds
Animation - Queue Grom Hellscream 0000 <gen>'s stand second animation
Animation - Queue Grom Hellscream 0000 <gen>'s stand third animation
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
Anitarf
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
JCarrill0
Quote:
Originally Posted by Anitarf
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.
I was not, that's why I removed it in the first place, so thank you. its always a fun learning experience.
04-26-2014, 01:12 AM#6
Fledermaus
Quote:
Originally Posted by Anitarf
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.
Can you use it after a wait? Wouldn't it mess up if something else got casted during the wait?
04-26-2014, 02:35 AM#7
JCarrill0
Any way I can fix the wait timer?
Attached Files
File type: w3xGromsRageTest3.w3x (7.9 KB)
04-26-2014, 03:56 AM#8
Fledermaus
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
Anitarf
Quote:
Originally Posted by Fledermaus
Can you use it after a wait? Wouldn't it mess up if something else got casted during the wait?
Cast event responses are indeed bugged the way you describe, but "Triggering Unit" should work correctly.
04-26-2014, 04:04 AM#10
Kyrbi0
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
JCarrill0
Quote:
Originally Posted by pOke
Metamorphosis. Just look at the regular DH , his ult is exactly what you want, you just need to change the unit types
No that's a different ult that I used to use. You are incorrect. it gives HP not haste
Quote:
Originally Posted by Talavaj
You would do that by.
Trigger:
Animation - Add the alternate animation tag to Grom Hellscream <gen>

However that won't work because grom's forms are separate models unlike illidan/druid forms.
Your only option is to edit the model and use eat tree to change its texture into chaos grom, or use metamorphosis .. or swap the units.
What?

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:
Originally Posted by Fledermaus
Change the first animation to "Play Animation", not "Queue". You can probably lower the cast time to about 2.2 as well.
I tried that and now its animation transforms first then does the animation. It's totally screwed :(
Trigger:
ConvertGromToChaos
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Grom's Rage
Collapse Actions
Custom script: set udg_GromTempUnit = GetTriggerUnit()
Wait 0.00 seconds
Animation - Play GromTempUnit's stand animation
Animation - Queue GromTempUnit's stand third animation
Quote:
Originally Posted by Kyrbi0
Does the Object Editor really not work for something like this? Granted it's been a while for me, but I could a sworn there were Fields in any given (transform) ability for accessing animations; Morph and Morph Alternate, etc...
Sadly because these are 2 different models, they don't do the animation.
04-26-2014, 02:49 PM#12
Rao Dao Zao
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
Fledermaus
Quote:
Originally Posted by JCarrill0
I tried that and now its animation transforms first then does the animation. It's totally screwed :(
Trigger:
ConvertGromToChaos
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Grom's Rage
Collapse Actions
Custom script: set udg_GromTempUnit = GetTriggerUnit()
Wait 0.00 seconds
Animation - Play GromTempUnit's stand animation
Animation - Queue GromTempUnit's stand third animation

You changed it to the right action, just forgot to change it to stand second.
Trigger:
Animation - Play GromTempUnit's stand second animation
:p
04-27-2014, 02:47 PM#14
JCarrill0
Quote:
Originally Posted by Fledermaus
Change the first animation to "Play Animation", not "Queue". You can probably lower the cast time to about 2.2 as well.
Sorry I didn't know you wanted both, I'll try that next

Edit: Did both, same thing happened, it doesn't play either animation now.. it just changes the unit.
Trigger:
ConvertGromToChaos
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Grom's Rage
Collapse Actions
Custom script: set udg_GromTempUnit = GetTriggerUnit()
Wait 0.00 seconds
Animation - Play GromTempUnit's stand animation
Animation - Play GromTempUnit's stand animation
I just reverted back to a previous version that works.

Edit2: Changed the values correctly
Trigger:
ConvertGromToChaos
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Grom's Rage
Collapse Actions
Custom script: set udg_GromTempUnit = GetTriggerUnit()
Wait 0.00 seconds
Animation - Play GromTempUnit's stand second animation
Animation - Play GromTempUnit's stand third animation
It still doesn't quiet work like the Que Animation trigger does, But it is a lot faster.
PS - what the difference between the que and play? (que animation seems to work)
04-27-2014, 08:55 PM#15
Fledermaus
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
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Grom's Rage
Collapse Actions
Custom script: set udg_GromTempUnit = GetTriggerUnit()
Wait 0.00 seconds
Animation - Play GromTempUnit's stand second animation
Animation - Queue GromTempUnit's stand third animation
The difference is that play will play it instantly while queue will play it after the current animation finishes.