• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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