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

Hero Switch spell

Status
Not open for further replies.
Level 5
Joined
Jan 6, 2005
Messages
137
Hi!, im correctly working on another dota(ish) map and im trying to somehow recreate a spell that i met on another dota(ish) map. Well i had this cow(tauren) hero that would transform himself into a firebull and gain new fire versions of the old abillties, i just cant get this system to work. When i try to use the normal Demon hunter metamorphosis spell it does transform the hero and gives more damage as i've said it should and other stuff too, but the abillitis just dont change and i with triggers it simply adds the new ones without removing the old, messings things up completely... i just know this can be done, and it shouldent really be that hard... heh... please help me..

InF.
 
Level 2
Joined
Dec 18, 2005
Messages
28
Well, if you only have one hero, with 4 abilities or actually just 3 since the fourth will be this one, you could simply do a jass function where you store the 3 abilityID and 3 integers (the levels of each) as locals, remove the basic abilities, add the new ones and set their levels to the old ones, set a pulled wait depending on the level of your firebull ability and then just undo all.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,259
ANOTHER DOTA...
Do you not think that there are enough dotas..
But thats besides the point.

This is a rough guid line of what to do.

Its simple and does not require jass at all.
You have to make a dummy spell that does nothing.
When the spell is cast create a new hero, the fireball, and set its EXP to that of the caster and set its level of fire forms of the spells to thoughs of the caster.

Then temporary remove the old hero from map (not remove as in permantly the one that just makes it disapear)
give the old hero to a neutral player.

After a "wait X seconds" (can even be a timer) simply give the old hero back to the orignal owner and set its exp to that of the fire form.

Finish of by making it reappair and the spell is done.

If you need any more help just say or PM me. . .
 
Level 1
Joined
Apr 18, 2006
Messages
1
Create two units; one unit the Transformer, and the other Transformed. Give the spells you want the transformed unit to have using the Object Manager. Then, add this basic trigger I whipped up in a few minutes.

Code:
TrgTRANSCast
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Transform 
    Actions
        Unit - Turn collision for (Casting unit) Off
        Unit - Create 1 Transformed Unit for (Owner of (Casting unit)) at (Position of (Casting unit)) facing (Facing of (Casting unit)) degrees
        Hero - Modify Strength of (Last created unit): Set to (Strength of (Casting unit) (Exclude bonuses))
        Hero - Modify Agility of (Last created unit): Set to (Agility of (Casting unit) (Exclude bonuses))
        Hero - Modify Intelligence of (Last created unit): Set to (Intelligence of (Casting unit) (Exclude bonuses))
        Hero - Set (Last created unit) experience to (Hero experience of (Casting unit)), Hide level-up graphics
        Hero - Learn skill for (Last created unit): Searing Arrows
        Unit - Set level of Searing Arrows for (Last created unit) to (Level of Frost Arrows for (Casting unit))
        Unit - Remove (Casting unit) from the game
        Selection - Select (Last created unit) for (Owner of (Casting unit))
        Unit - Move (Last created unit) instantly to (Position of (Casting unit))

This simply takes my hero when using the Transform spell and creates a new unit to give the appearance of a transformation, but with two seperate units. It takes Frost Arrows level 2, learns Searing Arrows for the transformed and changes the level of it to whatever Frost arrows was before.
 
Status
Not open for further replies.
Top