Staredit Network

Staredit Network -> UMS Assistance -> Minerals For Buildings
Report, edit, etc...Posted by wraith_shadow on 2005-12-16 at 23:52:11
I need some help, you know how in diplo maps how after the timer runs out you get money for how many citys you own. I want the same thing only with buildings, since the player can make a lot of the building I want to know if you can do this without making individual triggers for every ammount of buildings you can have.

Please help me out if you can.
Report, edit, etc...Posted by I-X-King-X-I on 2005-12-17 at 00:22:39
im not exactly sure
but you coudl use a death counter system

similar to the one they use for income triggers

except just have some stuff taken out and added adn stuff

but im sure a deathcount system would work
Report, edit, etc...Posted by Demaris on 2005-12-17 at 01:01:31

They have a trigger over each city, and if you own a building next to it it displays the name of the city and gives you the money for it. Works individually for each city.
Report, edit, etc...Posted by Kow on 2005-12-17 at 01:02:20
That's individual triggers though. Do they players need to use the buildings?
Report, edit, etc...Posted by wraith_shadow on 2005-12-17 at 16:14:07
No, the buildings are like supply depots and pylons. Can you explain in more detail how the death counter would work? Because I want it to be giving money after the timer runs out, how would you do that if the player built then all at diffrent times then you would get money at diffrent times.
Report, edit, etc...Posted by BLISSARD[VdD] on 2005-12-17 at 16:33:55
I don't know what the heck you are talking about"Death Counter"
Have no idea what are you talking about. really

Okay if you want to get the accurate amount of money for each city you own,
I suggest you to have these type of triggers for individual cities in 'force1' which is for the human players: (Example)

*Conditions:
*put current player own *this city*
*timer
*

*Actions:
*Set resurces for player
*display"city name"
*
*

So it doesnt matter how many cities you own, you will get the accurate amount of money you suppose to get, but remember to put it in the force1, or the humans players group, and put "current player" instead of a player*

I guess you have some idea of what I am talking about don't you?
I hope all of that what I said would help you... happy.gif
Report, edit, etc...Posted by KABOOM on 2005-12-17 at 16:57:16

Trigger
Description:
start the cycle
Players:
¤ player that is using this
Conditions:
¤ countdown timer is at most 0
¤ and something else if you want
Actions:
¤ set switch
¤ set countdown timer to 120 game seconds
¤ preserve
¤ comment




Trigger
Description:
money system
Players:
¤ player that is using this
Conditions:
¤ switch is set
¤ brings at least 1 building to anywhere
Actions:
¤ center location on building at anywhere
¤ add 1 death to unit
¤ give building at location to pl12(different one per player)
¤ preserve
¤ comment




Trigger
Description:
after buildings have all been given
Players:
¤ player that is using this
Conditions:
¤ current player brings atmost 0 buildings
¤ player 12 brings atleast 1 building at anywhere
¤ switch is set
Actions:
¤ give all buildings owned by pl12 at anywhere to current player
¤ clear switch
¤ set switch
¤ preserve
¤ comment




Trigger
Description:
giving gold for the buildings
Players:
¤ player that is using this
Conditions:
¤ swich is set
¤ current player has atleast 6 deaths of unit
Actions:
¤ subtract 5 deaths of unit
¤ add 5 mineral for current player
¤ preserve
¤ comment




Trigger
Description:
giving gold for the buildings
Players:
¤ player that is using this
Conditions:
¤ swich is set
¤ current player has atleast 1 deaths of unit
¤ current player has atmost 5 deaths of unit
Actions:
¤ subtract 1 deaths of unit
¤ add 1 mineral for current player
¤ preserve
¤ comment




Trigger
Description:
ending the cycle
Players:
¤ player that is using this
Conditions:
¤ swich is set
¤ current player has atmost 0 deaths of unit
Actions:
¤ clear switch
¤ preserve
¤ comment


ok sry if i screwed up i was going alittle fast but that should work
Report, edit, etc...Posted by www.com.au on 2005-12-18 at 20:57:18
no kaboom, conditions regarding the timer have to be set to 1 seconds, because the game starts with 0 seconds, so if they have a city itll set off them all for no reason at the start
Report, edit, etc...Posted by DjDTM on 2005-12-18 at 21:54:58
I just had an Idea for a second about how you could do this. but I'm too lazy to make/create and test the trigger idea.


Do this:


TRIGGER 1:

Conditions:
Timer = 0

Actions:
Set Switch 1
Preserve Trigger

TRIGGER 2:

Conditions:
Switch 1 Set

Actions:
Center LOCATION on building owned by P1
Give P1 ## RESOURCES
Give All buildings at LOCATION owned by P1 to NEUTRAL PLAYER
Preserve Trigger.

TRIGGER 3:

Conditions:
P1 Commands 0 buildings

Actions:
Give all buildings at anywhere owned by NEUTRAL PLAYER to P1.
Set Timer to ###
Clear Switch 1
Preserve Trigger.

OBVIOUSLY this set of triggers was wipped up in like 20 seconds. So there are flaws, but you get my basic idea.

Which if your still lost is:

The location centers on each building owned by P1 giving P1 resources for each building, then giving the building of which the location is centered on to a neutral player so that it doesn't recenter on a building it already has and give resources to P1 for the same building(s). Then when the trigger has given resources for all buildings, it has also given all the buildings to the neutral player, then after, reseting the timer and giving all the buildings back to P1.
Report, edit, etc...Posted by Kumano on 2005-12-19 at 05:20:59
QUOTE(DjDTM @ Dec 18 2005, 06:54 PM)
I just had an Idea for a second about how you could do this. but I'm too lazy to make/create and test the trigger idea.
Do this:
TRIGGER 1:

Conditions:
Timer = 0

Actions:
Set Switch 1
Preserve Trigger

TRIGGER 2:

Conditions:
Switch 1 Set

Actions:
Center LOCATION on building owned by P1
Give P1 ## RESOURCES
Give All buildings at LOCATION owned by P1 to NEUTRAL PLAYER
Preserve Trigger.

TRIGGER 3:

Conditions:
P1 Commands 0 buildings

Actions:
Give all buildings at anywhere owned by NEUTRAL PLAYER to P1.
Set Timer to ###
Clear Switch 1
Preserve Trigger.

OBVIOUSLY this set of triggers was wipped up in like 20 seconds. So there are flaws, but you get my basic idea.

Which if your still lost is:

The location centers on each building owned by P1 giving P1 resources for each building, then giving the building of which the location is centered on to a neutral player so that it doesn't recenter on a building it already has and give resources to P1 for the same building(s). Then when the trigger has given resources for all buildings, it has also given all the buildings to the neutral player, then after, reseting the timer and giving all the buildings back to P1.
[right][snapback]382780[/snapback][/right]



That should all work, although I don't think you need to center a location since you could just use anywhere and get the same results. What I recommend, to make it faster since it will only go through 12 buildings per second, which can look very bad, you can make a trigger similar to his second trigger, but make sure they have at least 2 buildings, and give resources for 2 buildings and give 2 buildings. Then copy that trigger and make it them for 4 buildings. Then you can continue doing it like that with 8, 16 and however long depending on how quickly you want it to go through their buildings (you will always see for a short time it being given to a different player). You could just copy the second one over and over, but this way is more effective.
Next Page (1)