wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > Triggers & Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 04-24-2014, 05:59 PM   #1
JCarrill0
User
 
JCarrill0's Avatar
 
Join Date: Jan 2004
Posts: 156

JCarrill0 has little to show at this moment (0)

Default Convert Grom to Chaos Grom Spell.

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.
__________________

Last edited by JCarrill0 : 04-26-2014 at 02:42 AM.
JCarrill0 is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 04-25-2014, 02:10 AM
Fledermaus
This message has been deleted by Fledermaus.
Old 04-25-2014, 02:45 AM   #2
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 637

Submissions (1)

Fledermaus has a spectacular aura about (148)

Send a message via MSN to Fledermaus
Default

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.

Last edited by Fledermaus : 04-25-2014 at 02:46 AM.
Fledermaus is offline   Reply With Quote
Old 04-25-2014, 02:08 PM   #3
JCarrill0
User
 
JCarrill0's Avatar
 
Join Date: Jan 2004
Posts: 156

JCarrill0 has little to show at this moment (0)

Default

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.
__________________

Last edited by JCarrill0 : 04-26-2014 at 02:43 AM.
JCarrill0 is offline   Reply With Quote
Old 04-25-2014, 05:01 PM   #4
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,071

Submissions (19)

Anitarf has a brilliant future (884)Anitarf has a brilliant future (884)Anitarf has a brilliant future (884)Anitarf has a brilliant future (884)Anitarf has a brilliant future (884)Anitarf has a brilliant future (884)Anitarf has a brilliant future (884)Anitarf has a brilliant future (884)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

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.
__________________

Last edited by Anitarf : 04-25-2014 at 05:03 PM.
Anitarf is offline   Reply With Quote
Old 04-25-2014, 05:44 PM   #5
JCarrill0
User
 
JCarrill0's Avatar
 
Join Date: Jan 2004
Posts: 156

JCarrill0 has little to show at this moment (0)

Default

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.
__________________
JCarrill0 is offline   Reply With Quote
Old 04-26-2014, 01:12 AM   #6
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 637

Submissions (1)

Fledermaus has a spectacular aura about (148)

Send a message via MSN to Fledermaus
Default

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?
Fledermaus is offline   Reply With Quote
Old 04-26-2014, 02:35 AM   #7
JCarrill0
User
 
JCarrill0's Avatar
 
Join Date: Jan 2004
Posts: 156

JCarrill0 has little to show at this moment (0)

Default

Any way I can fix the wait timer?
Attached Files
File Type: w3x GromsRageTest3.w3x (7.9 KB, 7 views)
__________________
JCarrill0 is offline   Reply With Quote
Old 04-26-2014, 03:54 AM
Fledermaus
This message has been deleted by Fledermaus.
Old 04-26-2014, 03:56 AM   #8
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 637

Submissions (1)

Fledermaus has a spectacular aura about (148)

Send a message via MSN to Fledermaus
Default

Change the first animation to "Play Animation", not "Queue". You can probably lower the cast time to about 2.2 as well.
Fledermaus is offline   Reply With Quote
Old 04-26-2014, 04:01 AM   #9
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,071

Submissions (19)

Anitarf has a brilliant future (884)Anitarf has a brilliant future (884)Anitarf has a brilliant future (884)Anitarf has a brilliant future (884)Anitarf has a brilliant future (884)Anitarf has a brilliant future (884)Anitarf has a brilliant future (884)Anitarf has a brilliant future (884)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

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.
__________________
Anitarf is offline   Reply With Quote
Old 04-26-2014, 04:04 AM   #10
Kyrbi0
~There we go~
 
Kyrbi0's Avatar
 
Join Date: May 2008
Posts: 2,900

Submissions (1)

Kyrbi0 is a jewel in the rough (152)Kyrbi0 is a jewel in the rough (152)

Send a message via MSN to Kyrbi0
Default

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...
__________________
My Projects, Resources, + Tutorials: ~Just got back from my mission. Glad to be back. Woot! :P~
=It was brought to my attention recently that the ":P" icon stands for "tongue-sticking out", and not the "smirky half-smile" I was using it for all these years. = Thusly I apologize for any unintentional juvenilization of my messages to anyone so afflicted.=
Kyrbi0 is offline   Reply With Quote
Old 04-26-2014, 12:49 PM   #11
JCarrill0
User
 
JCarrill0's Avatar
 
Join Date: Jan 2004
Posts: 156

JCarrill0 has little to show at this moment (0)

Default

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.
__________________
JCarrill0 is offline   Reply With Quote
Old 04-26-2014, 02:49 PM   #12
Rao Dao Zao
www.raodaozao.net
 
Rao Dao Zao's Avatar


MDL & Resource Moderator
 
Join Date: Aug 2003
Posts: 2,440

Submissions (27)

Rao Dao Zao has a brilliant future (817)Rao Dao Zao has a brilliant future (817)Rao Dao Zao has a brilliant future (817)Rao Dao Zao has a brilliant future (817)Rao Dao Zao has a brilliant future (817)Rao Dao Zao has a brilliant future (817)

Approved Map: When the Freedom Slips Away

Send a message via MSN to Rao Dao Zao
Default

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.
__________________
Rao Dao Zao is offline   Reply With Quote
Old 04-27-2014, 09:45 AM   #13
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 637

Submissions (1)

Fledermaus has a spectacular aura about (148)

Send a message via MSN to Fledermaus
Default

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
Fledermaus is offline   Reply With Quote
Old 04-27-2014, 02:47 PM   #14
JCarrill0
User
 
JCarrill0's Avatar
 
Join Date: Jan 2004
Posts: 156

JCarrill0 has little to show at this moment (0)

Default

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)
__________________

Last edited by JCarrill0 : 04-27-2014 at 05:09 PM.
JCarrill0 is offline   Reply With Quote
Old 04-27-2014, 08:55 PM   #15
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 637

Submissions (1)

Fledermaus has a spectacular aura about (148)

Send a message via MSN to Fledermaus
Default

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.

Last edited by Fledermaus : 04-27-2014 at 11:47 PM.
Fledermaus is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 02:28 PM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2014, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services