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