Add casting/cast buff on a morphing ability.

joaoac

Active Member
Reaction score
11
I ve been working on a "werebeast" hero that morphs to wolf, hawk, wendigo, etc...

The point is:

When the hero starts the morphing ability, the faerie fire (my choice) buff appears for 2 seconds and then the hero is morphed and no more faerie fires appears.

I can't mind a trigger that add a buff for the morphed unit for more 2 seconds after the transformation.

What I need:
Unit normal -->> Starts morphing (buff for 2 secs) --> Unit morphed (buff for more 2 secs)
e.g. 4 seconds of faerie fire

Also, how to make the storm crow ability not instant. I can't manage for it the same 2 seconds cast time as I do for ground units.

Thanks in Advance.
 

ianu74

New Member
Reaction score
8
I think metamorphesis removes all buffs when you morph.... You might wanna set a trigger that waits for a few seconds and then adds the buff...
 

Goober4473

TH.net Regular
Reaction score
7
You could make a dummy ability, and have a trigger that goes off when the ability is used that adds the buff, waits 2 seconds, gives the unit the real morph ability, orders the unit to use the real ability, then immediately removes it, then adds the buff again, since the morphing removed it, waits 2 seconds, then removes the buff.

How does that sound?
 

joaoac

Active Member
Reaction score
11
You could make a dummy ability, and have a trigger that goes off when the ability is used that adds the buff, waits 2 seconds, gives the unit the real morph ability, orders the unit to use the real ability, then immediately removes it, then adds the buff again, since the morphing removed it, waits 2 seconds, then removes the buff.
How does that sound?
Sounds good, but I suck at dummy abilities. Never finished one correctly. I'm really noob to play with more complicated abilities and efects.:banghead:

Are you saying that I need a dummy unit to cast the dummy ability on the hero 2 times, one for each form?
 

Sooda

Diversity enchants
Reaction score
318
This tutorial explains how to create dummy unit: http://www.thehelper.net/forums/showthread.php?t=28117

> Also, how to make the storm crow ability not instant.

Remove from 'Data - Morphing Flags' Immediate Take Off and keep just Uninterruptable.
Change 'Stats - Casting Time' to 2.00.

Variables used:
'werebeast_caster' is unit variable and starts with default value.
'werebeast_point' is point variable and starts with default value.

I had to use custom scripts to keep it MUI (multi unit instanceable). Because everything is case sensitive you have to write variable names like I did, otherwise you will get compile errors when trying to save your map or even World Editor may crash. Don't change actions priority (adding/ moving actions and custom scripts) also or you may produce compile errors and again World Editor may crash or give error message. That means edit trigger actions (like dummy unit created and ordered ability string to cast on unit), but keep other things unchanged. I used Priest and Inner Fire ability just for example, you can change them without any problems.
Code:
Werebeast Morph
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Storm Crow Form
    Actions
        Custom script:       local unit whichUnit = null
        Set werebeast_caster = (Triggering unit)
        Custom script:       set whichUnit = udg_werebeast_caster
        Set werebeast_point = (Position of werebeast_caster)
        Unit - Create 1 Priest for (Owner of werebeast_caster) at werebeast_point facing Default building facing degrees
        Custom script:       call RemoveLocation(udg_werebeast_point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Unit - Order (Last created unit) to Human Priest - Inner Fire werebeast_caster
        Wait 2.00 game-time seconds
        Custom script:       set udg_werebeast_caster = whichUnit
        Custom script:       set whichUnit = null
        Set werebeast_point = (Position of werebeast_caster)
        Unit - Create 1 Priest for (Owner of werebeast_caster) at werebeast_point facing Default building facing degrees
        Custom script:       call RemoveLocation(udg_werebeast_point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Unit - Order (Last created unit) to Human Priest - Inner Fire werebeast_caster
As a side note if you create custom ability and want to cast it on unit, pick from actions ability order which you based off of your new custom ability.
 

joaoac

Active Member
Reaction score
11
As for the not instant question, you can set the casting time.
Not really. I changed that, and nothing worked.
Also changed the imediate take off and nothing happened.

Thanks for all the HELP.
Specially Sooda.

EDIT: All modifications of casting time only make the unit stuck in the ground, then gets the take off.
e. g. if I set the casting time to 3 secs, for example, the air unit appears and stay for 3 secs on ground, then starts to fly.
I attached the map skecth.
 

Attachments

  • (1) A Test Map.w3x
    51.3 KB · Views: 92

Sooda

Diversity enchants
Reaction score
318
> the air unit appears and stay for 3 secs on ground
Actually you have tweaked something what causes this. When I tried it with default Crow Form ability, Druid of the Talon? (dude with cyclone) waited 2 seconds and then started to morph crow.
I will check your map and tell where is problem, it takes few days because I don't have much free time lately.

EDIT:
Interesting, 'Stats - Casting Time' collides with 'Data - Duration ...', Actually if both fields have values casting time is ignored and you can freely move unit while morphing. Because of that it is better when 'Stats -Casting Time' is set to 0. For your Hawk morph works very well combo where 'Data - Altitude Adjustment Duration' is same as 'Stats Duration ...' and 'Data - Landing Delay Time' is set to 0.
I didn't understand why you enabled both ability classifications - hero and item, you only need one at a time, in your case it should be hero or are you using these abilities in items also?
 

joaoac

Active Member
Reaction score
11
Really thanks.

I was figuring that all that times could be messing one with other.

The item was checked just in cause of the tooltips. The hero version has less tooltips. When finished tooltips, I ll back em to only Hero.
Thanks again.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top