| 02-16-2004, 06:09 PM | #1 |
does ne 1 know if there is an EASY way to set a trigger to make everyone's gold shared with other players. i.e. my friend was considering making a co-op city building map. basically one team builds a city up in whatever way they choose, and then after a set time they are attacked by a "barbarian" horde. He was trying to make it so that all of the city "officials" share a pool of gold that goes down whenever ne 1 builds city related features. He is also tryign to set it up so that if the city is managed badly, the combat units would get penalties to attack, and the peasants would take up arms against their overlord. he was basing this loosely offa the game map i recently showed him (he has no battle.ent himself) called Genesis of Empires .9#b (i used # cause i couldn't remember the real number) he may have future q's so i'll keep y'all posted. |
| 02-16-2004, 06:38 PM | #2 |
Each time a unit does something that requires gold (building, training, researching, etc) get the amount of gold of the player that owns that unit and set his allies' gold to teh same amount. |
| 02-16-2004, 07:55 PM | #3 |
Event - Every .01 seconds of game time Action - Set goldInt = Player 1's current cold Action - Set Player 2's current gold = goldInt |
| 02-16-2004, 08:16 PM | #4 | |
Quote:
That'll work if you don't care about how well the map performs. Firstly, although a tenth of a second is a very small amount of time, it's still of window of time in which each player could create a something for the cost of whatever player 1's building costs... For instance, if player 1 builds a farm for 10 gold and player 2 builds a castle for 500 gold, both within the time frame it takes to refresh the gold, then player 2's building will be free. Of course, the lesser this refresh period, the better the chance of avoiding this bug -- but the more processing the map will take and the slower it will run as well. It would be "easier" than my method though, but I sure wouldn't recommend it. |
| 02-16-2004, 08:34 PM | #5 |
I always was one for the quickest route :) |
| 02-16-2004, 09:02 PM | #6 |
Thats kinda a stupid idea, i wouldnt bother with that map at all...just my opinion. |
| 02-16-2004, 09:24 PM | #7 |
He didn't ask for your opinion, he asked for help =P I think it sounds like an interesting idea -- but I love building stuff, coop or not. Anyhoo, I thought I'd clarify a bit my earlier post, so that this isn't totally worthless... I think that the events you'd need are all generic unit events, with conditions relating to begins/cancels training, construction, reviving, upgrading, and research... depending on whether or not something is instaneously finished or takes time (and hence a queue can come into play) things may not work out as you may want them too -- but that's for you to play around with. For the actions, set an integer variable equal to the owner of( triggering unit)'s gold (it's under Player Properties in the GUI ) and then do a player group loop on the allies of the owner of the triggering unit and set each of their gold amount to that variable. (Note: I'd normally frown upon "triggering unit" -- but in this case, since there are so many varying events, I think it's the only choice.) |
| 02-16-2004, 10:44 PM | #8 |
well ya, your right he needs help, i dont see why though, even if this map is uber with good terrain, it wont get played on bnet, all bnet noobs like are Mauls and gay AOS's... |
| 02-17-2004, 03:06 AM | #9 |
My friend seemed kinda de-flated after reading your comments, but then he said in response to Vikalsis' comments: "Weel then, we'll just need to show them the error of their ways." He just wants to create a map that tests city management and economic skills of players. He's also not sure how large a map he should make. He would like to make it 190x190. He also expresses thanx to those who are helpful. |
| 02-17-2004, 04:09 AM | #10 |
Couldnt you make a default computer allied with you, and then give each of you complete sharing of his units (building ability as well), seems simple but isnt that all you want? |
| 02-17-2004, 04:24 AM | #11 | |
Quote:
wow.. that's really a great idea -- unless of course, people start fighting over specific units or sumpin. I almost feel like makin some sorta co-op map now.. hehe |
| 02-17-2004, 07:01 AM | #12 | |
Quote:
I don't get that. Correct me if I'm stupid but: a. Why not just say "Set Player 2's current gold = Player 1's current gold ?" b. Wouldn't that trigger mean that player 2 could build stuff for free all the time because his gold would just be set to whatever player 1's is in 0.1 seconds? I have a nagging feeling I'm missing something. I would think you need an equation that averages out the gold between the two players. Like Action - Set goldInt = Player 1's current cold + Player 2's current gold / 2 Action - Set Player 1's current gold = goldInt Action - Set Player 2's current gold = goldInt |
| 02-17-2004, 09:47 AM | #13 | |
It's me, to the rescue! Quote:
|
| 02-17-2004, 12:57 PM | #14 |
Have you tested that, Grater? I considered it, but I thought that there would then be 2 states... when the gold is 0 and when it's not. Hence it would likely only fire once. Also, if a player as 500 gold and spends 500 gold then its then equal to 0 and the other players would still have 500 gold, so you'd probably need to also include Player X's gold becomes equal to 0.00 |
| 02-17-2004, 01:06 PM | #15 |
Player2GiveMoney Events Time - Every 5.00 seconds of game time Conditions (Player 2 (Blue) Current gold) Greater than 0 Actions Set Player_GROUP_ne_REMAIN = (Number of players in Player_MONEY_GROUP_NE) Player Group - Pick every player in Player_MONEY_GROUP_NE and do (Actions) Loop - Actions Player - Add ((Player 2 (Blue) Current gold) / Player_GROUP_ne_REMAIN) to (Picked player) Current gold Player - Set Player 2 (Blue) Current gold to 0 Do this for every player. Also, you have to set up a player group that has everyone you want in it. When a player leaves, remove them from the group. That's Player_money_group. Set this variable at map start. OH sorry, you wanted shared gold... this is to distribute gold from a player who has left the game say in an AOS style map... I'll leave it just in case :P |
