• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Making Skills mutually exclusive on heros

Status
Not open for further replies.
Level 3
Joined
Apr 17, 2008
Messages
43
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
 
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.
Back
Top