- Joined
- Apr 26, 2009
- Messages
- 11
First the Tavern hero selection fault:
I have made this code, but it doesn't kill the hero selector unit!
Things to know:
-Family Farm = Hero Selection Tavern
-Units are used too select/choose/buy a hero from the tavern
Random Select Problem - It only selects 1 unit, always.
So that isn't random at all.
Things to know:
-I use 3 Heroes in the Tavern
I have made this code, but it doesn't kill the hero selector unit!
Things to know:
-Family Farm = Hero Selection Tavern
-Units are used too select/choose/buy a hero from the tavern
-
Hero Spawn
-
Events
- Unit - A unit Sells a unit
-
Conditions
-
And - All (Conditions) are true
-
Conditions
- ((Sold unit) is A Hero) Equal to True
-
And - All (Conditions) are true
-
Conditions
- ((Sold unit) is A Hero) Equal to True
- (Selling unit) Equal to Family Farm 0001 <gen>
-
Conditions
-
Conditions
-
And - All (Conditions) are true
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- HeroChosenByPlayer[(Player number of (Owner of (Sold unit)))] Equal to True
-
Then - Actions
- Unit - Remove (Sold unit) from the game
- Game - Display to (All players) the text: You have already ch...
-
Else - Actions
- Set HeroChosenByPlayer[(Player number of (Owner of (Sold unit)))] = True
- Unit - Move (Sold unit) instantly to (Center of Family Farm Spawn <gen>)
- Camera - Pan camera for (Owner of (Sold unit)) to (Center of Family Farm Spawn <gen>) over 1.00 seconds
- Selection - Clear selection for (Owner of (Sold unit))
- Selection - Add (Sold unit) to selection for (Owner of (Sold unit))
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
Random Select Problem - It only selects 1 unit, always.
So that isn't random at all.
Things to know:
-I use 3 Heroes in the Tavern
-
Randomise
-
Events
- Unit - A unit Sells a unit
-
Conditions
- (Unit-type of (Sold unit)) Equal to Randomiser
-
Actions
- Unit - Remove (Sold unit) from the game
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- HeroChosenByPlayer[(Player number of (Owner of (Sold unit)))] Equal to False
-
Then - Actions
- Unit - Create 1 TavernHeroes[(Random integer number between 1 and 3)] for (Owner of (Sold unit)) at (Center of Family Farm Spawn <gen>) facing Default building facing degrees
- Set HeroChosenByPlayer[(Player number of (Owner of (Sold unit)))] = True
-
Else - Actions
- Do nothing
-
If - Conditions
-
Events
Last edited: