HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

limited amount of building

02-19-2007, 08:53 PM#1
notor
ok basically, i have this unit called Base, and it can upgrade to level 6. at this point it can upgrade to it's level 7 form, but i only want a certain amount to be created... for example... lets say there are 10 players. the first two players to get to level 7 are allowed, but at that point, everyone else can only upgrade to level 6. any help? here is what i've got



Trigger:
buildChekc
Collapse Events
Unit - A unit Begins an upgrade
Collapse Conditions
(Unit-type of (Triggering unit)) Equal to Base lvl 6
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
guildHallCounter Less than or equal to 1
Collapse Then - Actions
Set guildHallCounter = (guildHallCounter + 1)
Else - Actions
02-19-2007, 11:52 PM#2
notor
anyone read this?
02-20-2007, 04:02 AM#3
Pyrogasm
This should help you out:
Trigger:
buildChekc
Collapse Events
Unit - A unit Begins an upgrade
Collapse Conditions
(Unit-type of (Triggering unit)) Equal to Base lvl 6
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
guildHallCounter Less than or equal to 2
Collapse Then - Actions
Set guildHallCounter = (guildHallCounter + 1)
Collapse Else - Actions
Unit - Cancel <Your upgrade> for Triggering Unit [or whatever the thing is; I don't recall at the moment]
Player - Disable <Your Upgrade> for Owner of (Triggering unit)
Game - Display to Player group(Owner of (Triggering Unit)) the text: Unable to upgrade; too many Guild Halls are in existance already.
Alternatively, you could do this:
Trigger:
buildChekc
Collapse Events
Unit - A unit Begins an upgrade
Collapse Conditions
(Unit-type of (Triggering unit)) Equal to Base lvl 6
guildHallCounter Less than 2
Collapse Actions
Set guildHallCounter = (guildHallCounter + 1)
Collapse If (All conditions are true) then do (Then actions), else do (Else Actions)
Collapse If - Conditions
guildHallCounter = 1
Collapse Then - Actions
Game - Display to (All Players) the text: One Guild-Hall has been built; only one more may be constructed.
Collapse Else - Actions
Game - Display to (All Players) the text: The second and final Guild-Hall has been created; no mor may be built.
Player Group - Pick every player in (All Players) and do (Player - Disable <Your Upgrade> for (Picked Player))
02-20-2007, 06:53 AM#4
Chocobo
An easier way :

Trigger:
1 Building
Collapse Events
Map initialization
Conditions
Collapse Actions
Collapse Player Group - Pick every player in (All players) and do (Actions)
Collapse Loop - Actions
Player - Limit training of Town Hall to 1 for (Picked player)
02-20-2007, 07:32 AM#5
Pyrogasm
Not what he needs.

He needs it to be that out of 10 players, only two may upgrade to the 7th tier. After two have been upgraded, no more players can research the upgrade.
02-20-2007, 10:53 AM#6
Chocobo
Quote:
Originally Posted by Pyrogasm
Not what he needs.

He needs it to be that out of 10 players, only two may upgrade to the 7th tier. After two have been upgraded, no more players can research the upgrade.

Simply a couple of Ifs and it's ended..
02-20-2007, 08:40 PM#7
Pyrogasm
Precisely what my solution is

Rep'd for arguing, though.