- Joined
- Apr 7, 2009
- Messages
- 241
Im making an ORPG and Im trying to get a save/load system into my map. But my hero selection system wont work together with it.
The problem is that I can first -load a hero and then pick a new hero with my selection system, in other words I can have 2 heros. The hero selection system uses taverns and is made-up so that you can only pick one hero from the tavern, but I need it to be able to sense if the player trying to pick a hero already has a hero or not, instead of sensing if the player has picked a hero from the tavern or not.
Here's my Hero Selection system:
Tavern Initialization:
The problem is that I can first -load a hero and then pick a new hero with my selection system, in other words I can have 2 heros. The hero selection system uses taverns and is made-up so that you can only pick one hero from the tavern, but I need it to be able to sense if the player trying to pick a hero already has a hero or not, instead of sensing if the player has picked a hero from the tavern or not.
Here's my Hero Selection system:
Tavern Initialization:
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Set Tavern1Heroes[1] = Mage
-
Set Tavern1Heroes[2] = Berserker
-
-
Events
-
Unit - A unit Sells a unit
-
-
Conditions
-
And - All (Conditions) are true
-
Conditions
-
((Sold unit) is A Hero) Equal to True
-
Or - Any (Conditions) are true
-
Conditions
-
(Selling unit) Equal to Hero Tavern 0068 <gen>
-
-
-
-
-
-
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 Player spawn <gen>)
-
Camera - Pan camera for (Owner of (Sold unit)) to (Center of Player 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))
-
-
-