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

Making Skills mutually exclusive on heros

Status
Not open for further replies.
Level 3
Joined
Apr 17, 2008
Messages
44
I have a hero with two skills on it that are supposed to be mutually exclusive, as in if you learn one you can't learn the other. So what I've done is created two upgrades and made each skill require one level of the upgrades, then I wrote a script so that if you learned one skill it set the upgrade for the other one to zero, the problem is it isn't working.

The Script looks like this right now, I'm just going to write it in pseudo code because I don't really know how to wrap it otherwise

Event
unit learns a skill
Condition
none
Action
if ( hero(skill learned) is equal to firstSkill
Player - set current research level of Upgrade2 to 0 for owner of triggering unit

if( hero(skill learned) is equal to secondSkill
Player - set current research level of Upgrade1 to 0 for owner of triggering unit
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
just remove the other ability from the hero? :p

also, to copy triggers, right click on the top of the trigger where it says the name of the trigger, hit "copy as text", than paste it into one of the
  • tags
 
Status
Not open for further replies.
Top