• 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 ability switchin

Status
Not open for further replies.
Level 11
Joined
Nov 12, 2006
Messages
765
In my map, a meele hero can "switch weapon" and become a ranged hero. Currently, his level switches over properly and the items he had switch over properly. What doesnt switch over to the new hero, is the abilities he picked.

both meele/ranged versions of hero have the same abilitys, so how can i make it so if i picked "reincarnation" for the meele hero, the ranged hero will already of picked "reincarnation" when i switch over?

FYI, i really only understand GUI. of course im obviously capable of inserting custome code.



Events

Unit - A unit Begins channeling an ability

Conditions

(Ability being cast) Equal to Switch Weapon
(Unit-type of (Triggering unit)) Equal to Anborn

Actions

Custom script: call UnitMakeAbilityPermanent(GetSpellAbilityUnit(), true, GetSpellAbilityId())

Unit - Replace (Triggering unit) with a Anborn2 using The old unit's relative life and mana

Hero - Set (Last replaced unit) Hero-level to (Hero level of (Triggering unit)), Hide level-up graphics

Selection - Select (Last replaced unit) for (Triggering player)
 
Status
Not open for further replies.
Top