Hi, I've been searching and been doing all that seems to be the suggestion of each post I've been in but sadly it still doesn't work for me. I am unsure at what the problem is, or if there is a better solution to what I'm doing and what the name of that solution is.
I have set-up multiple barracks on the map owned by player2(computer).
The barracks sells the unit footman.
The goal is, a hero/unit is in range of any of the barracks and buys the footman. Footmen starts spawning at the base of the barracks towards the enemy. I have got this part down and it is working. The sad thing is that the footman unit must only be available once. It is a one time purchase. Am I doing this wrong?
defnum_footman is a variable i'm using to identify that the first level of footman is bought.
I have set-up multiple barracks on the map owned by player2(computer).
The barracks sells the unit footman.
The goal is, a hero/unit is in range of any of the barracks and buys the footman. Footmen starts spawning at the base of the barracks towards the enemy. I have got this part down and it is working. The sad thing is that the footman unit must only be available once. It is a one time purchase. Am I doing this wrong?
defnum_footman is a variable i'm using to identify that the first level of footman is bought.
-
Footman Start
-
Events
- Unit - A unit Sells a unit
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Unit-type of (Sold unit)) Equal to Footman Level 1
-
Conditions
-
Or - Any (Conditions) are true
-
Actions
- Set defnum_footman = (defnum_footman + 1)
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
- Player - Make Footman Level 1 Unavailable for training/construction by (Picked player)
-
Loop - Actions
- Game - Display to (All players) the text: ((Player_Colors[(Player number of (Owner of (Sold unit)))] + (Name of (Owner of (Sold unit)))) + (Player_Colors[13] + ( has bought + (Name of (Sold unit)))))
- Unit - Remove (Sold unit) from the game
-
Events