Staredit Network

Staredit Network -> UMS Assistance -> Minerals Per Unit
Report, edit, etc...Posted by Kamikaze.Kow on 2005-04-02 at 22:02:57
Alright, in a new map im making i have 'Banks' i want it to add x minerals every second for every bank i have, i wanna do this w/o using alot of triggers, and players can build an UNLIMITED number of banks. helpsmilie.gif
Report, edit, etc...Posted by slayer766 on 2005-04-02 at 22:21:57
QUOTE(Kamikaze.Kow @ Apr 2 2005, 10:02 PM)
Alright, in a new map im making i have 'Banks' i want it to add x minerals every second for every bank i have, i wanna do this w/o using alot of triggers, and players can build an UNLIMITED number of banks.  helpsmilie.gif
[right][snapback]179168[/snapback][/right]


Simple enough, just do this:

Condition

Current Player Commands At Least 1 Bank

Action

Add Resources For Current Player Add x number you want
Preserve Trigger

just do that for how many banks you want like:

Current Player Commands At Least 2 Bank

Add Resources For Current Player Add x number you want


Like that. Hope this helps. smile.gif
Report, edit, etc...Posted by Kamikaze.Kow on 2005-04-02 at 22:31:06
the key word in my last post was unlimited, they can build UNLIMITED ammount of banks....
Report, edit, etc...Posted by chuiu on 2005-04-02 at 22:46:57
Ok then ... this might get a bit advanced. Is it alright if you give the 'banks' to another player? It would be instantly and probably not affect gameplay if the banks were a building like a supply depot. If it is then just do something like:

C:
Player #1 commands at least 32 banks.
A:
Give 32 banks owned by Current player to Player #2.
Modify resources for Current player: Add 32 Minerals.
Preserve trigger.

C:
Player #1 commands at least 16 banks.
A:
Give 32 banks owned by Current player to Player #2.
Modify resources for Current player: Add 16 Minerals.
Preserve trigger.

C:
Player #1 commands at least 8 banks.
A:
Give 32 banks owned by Current player to Player #2.
Modify resources for Current player: Add 8 Minerals.
Preserve trigger.

Then 4, then 2, then 1. To make it unlimited you would go 128, 64, 32, 16, 8, 4, 2, 1. Not unlimited, but I doubt you would need to go higher than 255. If you do then just double the number and make sure it runs from largest to smallest amount. And use different players for each player. So like player 1 gives to player 2, player 2 gives to player 3. Then have one final trigger that says:

C:
Always.
A:
Give all banks owned by Player 2 to Player 1.
Give all banks owned by Player 3 to Player 2.
etc.
Preserve trigger.

I hope this helps.
Report, edit, etc...Posted by Kamikaze.Kow on 2005-04-02 at 23:16:32
Wonder why i didnt think of that.... blink.gif thanks man

ADDITION:
actually... that didnt seem to work.
It kept giving me too many minerals
Report, edit, etc...Posted by LegacyWeapon on 2005-04-02 at 23:18:40
Make sure the trigger exchange the most number of banks for minerals is at the top and the one with the least is at the bottom.

Most given
A lot
A little
Least Given

Make sure you do the last player's triggers first, then the second to last, then the third to last.

Trigger order does matter.
Report, edit, etc...Posted by Kamikaze.Kow on 2005-04-02 at 23:24:14
oh wait i see what i did wrong, sorry my bad blushing.gif
Report, edit, etc...Posted by Heimdal on 2005-04-03 at 11:29:13
That's exactly what I told you to do on b.net last night...
Report, edit, etc...Posted by SkiLLz on 2005-04-03 at 11:42:57
If you still need any help, I saw something like that in the Mapping Tutorials. It looks like I'm too late, but gl man!
Report, edit, etc...Posted by Kamikaze.Kow on 2005-04-03 at 14:29:51
actually, i did exactly what u guys said, and yet again... its still not working! pinch.gif

when i have 2 buildings, it first gives 2 minerals, then gives 1...
Report, edit, etc...Posted by BeeR_KeG on 2005-04-03 at 14:48:55
This method is quite hard to understand and you will need to modify it to fit your needs but as of now it requires way less triggers than doing 1 per bank and it can easily reach infinite levels.

Just click on the Digit System on my Signature and it will bring you to my Tutorial.

basicly what the digit system does is that you can have unlimited number of anything without writting one trigger per every posible scenario. This will rgeatly reduce trigger number and it doesn't have limit, unless you reach 65535 digits of banks but I highly doubt you will reach that.

The Digit system wasn't meant for your kind of project but if you do modify it, you can let the system keep track of them all. Do remember that it's hard to understand.

You can also find the Digit System here: http://beer_keg.t35.com/digitsystem.html
Report, edit, etc...Posted by chuiu on 2005-04-03 at 18:19:41
I made an error up there. You will want to give to players that will not be affected (until I can think of a way around it). Like Player 1 to 9, 2 to 10, etc.

If that's not what is wrong then please post the map.
Report, edit, etc...Posted by LegacyWeapon on 2005-04-03 at 19:08:53
Actually chu, I'm pretty sure that will work as long as the last player has the triggers made first.

For clarity, if you are using players 1 - 8, then

1) Make the triggers for player 8, most banks to least banks. P8 gives to P9
2) Make the triggers for player 7, most banks to least banks. P7 gives to P8
3) Make the triggers for player 6, most banks to least banks. P6 gives to P7
etc.

This way player 8 will not count the banks given to him when player 7 has the banks converted to money.

But I think then this way you'll need a lot more triggers because you'll have to do all the conversion within one loop.

If you are confused, then I'm very sorry and will try to elaborate.
Report, edit, etc...Posted by chuiu on 2005-04-03 at 19:13:54
Yeah ... when I posted just then I was thinking I had the triggers for "Current Player" and not specific players. You're right, but one thing that needs to be done is the buildings need to be returned before the next players triggers run if you start with player 1's triggers and move to the next ones.
Report, edit, etc...Posted by Kamikaze.Kow on 2005-04-03 at 22:20:20
Actually, i got it now, i need to add a 'At Most' condition on each interval.

Like say if i was doing 8 banks i would do..

C:
Current Player owns at least 8 'Banks'
Current Player owns at most 15 'Banks'

A:

Whatever
blah blah blah

And so the 8 banks thing will only work up to the next interval, and since it changes into the other player it will just keep decreasing and stuff.... YA! w00t.gif

Hope this helps biggrin.gif
Report, edit, etc...Posted by chuiu on 2005-04-03 at 22:22:01
I'll be honest with you. You don't need the at most. If you have it going from highest to lowest in multiples of 2 then it won't matter at all.
Next Page (1)