Yoshii
New Member
- Reaction score
- 74
Hero is created
this is my trigger that work fine, I buy a hero from a tavern and everything but the hero created is deleted for the player.However since my map use save/load i need to have a variable in place that tell me if player already has a hero thus I Created an array Boolean named PlayerHasHero.
However when I write
The game does run the whole thing and set the playerhashero correct but Im im still able to click and get more hero even tho its set to TRUE; I dont get it I tried everything from buying,trigger,sold unit and it just wont accept anthing when I setup the array has a condition before running the trigger
anyone know why?
Trigger:
- Events
- Unit - A unit Sells a unit
- Conditions
- Actions
- Set PlayerHasHero[(Player number of (Owner of (Buying unit)))] = True
- Unit Group - Pick every unit in (Units in (Playable map area) owned by (Owner of (Buying unit))) and do (Unit - Remove (Picked unit) from the game)
- Unit - Create 1 (Unit-type of (Sold unit)) for (Owner of (Buying unit)) at (Random point in Start <gen>) facing Default building facing degrees
this is my trigger that work fine, I buy a hero from a tavern and everything but the hero created is deleted for the player.However since my map use save/load i need to have a variable in place that tell me if player already has a hero thus I Created an array Boolean named PlayerHasHero.
However when I write
Trigger:
- Hero is created
- Events
- Unit - A unit Sells a unit
- Conditions
- PlayerHasHero[(Player number of (Owner of (Buying unit)))] Equal to False
- Actions
- Set PlayerHasHero[(Player number of (Owner of (Buying unit)))] = True
- Unit Group - Pick every unit in (Units in (Playable map area) owned by (Owner of (Buying unit))) and do (Unit - Remove (Picked unit) from the game)
- Unit - Create 1 (Unit-type of (Sold unit)) for (Owner of (Buying unit)) at (Random point in Start <gen>) facing Default building facing degrees
- Events
The game does run the whole thing and set the playerhashero correct but Im im still able to click and get more hero even tho its set to TRUE; I dont get it I tried everything from buying,trigger,sold unit and it just wont accept anthing when I setup the array has a condition before running the trigger
anyone know why?