Okay, this may be something I'm overlooking thats obvious, in which case I'm sorry if so.
----------
I'll start out with a scenario:
-In this game, you currently have 30 minerals
-There is a countdown timer going
-There is a scoreboard(currently set to 0 or a previous value)
-There is a location, lets call it "Unit_Spawn"(obvious, but to clear confusion)
----------
I want a trigger that...
IN THE EVENT OF:
-Countdown timer reaches 0
THE FOLLOWING ACTION WILL BE TAKEN:
-The score will be set to the users ore(30, in the previously mentioned scenario)
-A number of units equal to the ore will be spawned at location "Unit_Spawn"(30, in the previously mentioned scenario)
-The ore will be set to 0But, I'm used to stuff like Visual Basic where I can set variables, which I don't notice anything of this capability.
But if I could set variables...
Variable
X = Ore count
Upon countdown timer hitting 0
Score =
X(
X) Units spawn at location "Unit_Spawn"
I've got the obvious parts worked out... Something like...
IN THE EVENT OF:
CountdownTimer(Exactly,0);
THE FOLLOWING ACTION WILL BE TAKEN:
<Score set to Ore?> (I KNOW YOU CAN USE SETSCORE, BUT HOW?)
<Units(equal to number of ore) being spawned?> (I KNOW YOU CAN USE CREATEUNIT, BUT HOW?)SetResources(CurrentPlayer,SetTo,0,Ore);
SetCountdownTimer(SetTo,30);
PreserveTrigger();
NOTE: I AM USING STARFORGE(LATEST VERSION?)
Thank You!
None.
· Conditions
Time is 0
Current player has at least 1 ore
· Actions
Set ore: substract 1
Give 1 unit wherever you want
Give 1 point
Preserve trigger
I think that this is the basic idea of the trigger. You will adjust more to your map..
F.E. I think you will need making different triggers and locations for each players..
Post has been edited 1 time(s), last time on Apr 23 2008, 12:22 am by CeR.
None.
Yes, when many people move into mapping, they expect variables set up for your use, but you have to use other things, like score and
Death Counts, the latter being the most advanced, to keep track of numbers.
None.
· Conditions
Time is 0
Current player has at least 1 ore
· Actions
Set ore: rest 1
Give 1 unit wherever you want
Give 1 point
Preserve trigger
I think that this is the basic idea of the trigger. You will adjust more to your map..
F.E. I think you will need making different triggers and locations for each players..
Yeah, I have the different locations, I just left them out to avoid complexity of my post(did a great job at that eh?)
BUT:
I don't understand the...
set ore: rest 1?
None.
· Set Resources from current player: subtract 1
If you do that, the trigger will be executed the same times that player's ore.
None.
Oh wow,
I get your idea Cer
Thanks! Took you a second to edit your post, and me a minute to think through the process.
Also:
Falkoner,
Explain how to use death count as a variable, for my future use...
or post a link if it's to complex...
or just deny me.
Either way.
Thanks to both of you.
None.
ALSO:
Sorry, I'm a curious boy:
Cer,
Using your idea...
What if a person has, say, 200 ore, and the location can only hold 100 units...
And with hyper triggers in effect(if that would affect the unit spawn rates)...
Even with the units moving(south) it seems like it would be to fast of a spawn... I'll try it out I guess...
None.
yes, you have to try.
If the location only can hold 100 units... bad. You may put a limit in the triggers like this:
·Condition
Player bring at most 99 units to "Spawn_location"
Ore is at least 1
·Actions
Modify ore
Make unit
Set score
With this trigger, you will get 100 units at most (if the dont move or something like this)...
If you want more units, you will have to get a biggest location.
Sorry, i'm going bed (i'm from spain)..
None.
Okay, you will need to use Binary Count-offs, they work similar to how computers compute numbers in binary, basically, to speed up the transfer of the score, you will make multiple triggers to transfer it, here's how it works:
Conditions:
If Player 1 has at least 32 ore
If countdown timer is exactly 0
Actions:
Subtract 32 ore from Player 1
Add 32 to score for Player 1
Add 32 deaths to Y unit for Player 1
Preserve Trigger
Conditions:
If Player 1 has at least 16 ore
If countdown timer is exactly 0
Actions:
Subtract 16 ore from Player 1
Add 16 to score for Player 1
Add 16 deaths to Y unit for Player 1
Preserve Trigger
Conditions:
If Player 1 has at least 8 ore
If countdown timer is exactly 0
Actions:
Subtract 8 ore from Player 1
Add 8 to score for Player 1
Add 8 deaths to Y unit for Player 1
Preserve Trigger
Conditions:
If Player 1 has at least 4 ore
If countdown timer is exactly 0
Actions:
Subtract 4 ore from Player 1
Add 4 to score for Player 1
Add 4 deaths to Y unit for Player 1
Preserve Trigger
Conditions:
If Player 1 has at least 2 ore
If countdown timer is exactly 0
Actions:
Subtract 2 ore from Player 1
Add 2 to score for Player 1
Add 2 deaths to Y unit for Player 1
Preserve Trigger
Conditions:
If Player 1 has at least 1 ore
If countdown timer is exactly 0
Actions:
Subtract 1 ore from Player 1
Add 1 to score for Player 1
Add 1 deaths to Y unit for Player 1
Preserve Trigger
Conditions:
If Player 1 has at least 32 deaths of Unit Y
If countdown timer is exactly 0
Actions:
Subtract 32 deaths of Unit Y from Player 1
Create 32 spawned units
Preserve Trigger
(Continue just like the other one, slowly down all the way to 1)
Conditions:
If countdown timer is exactly 0
Actions:
Set Countdown Timer to 30
Preserve Trigger
This will transfer 63 minerals maximum to the scoreboard and create the units immediately, and do exactly what you want. If you want more units, just keep copying the trigger and doubling the number, make sure to make the triggers from greatest number to lowest, or it will not work.
Also, I did post a link to how to use Death Counts, check my post.
Post has been edited 2 time(s), last time on Apr 23 2008, 9:20 pm by Falkoner.
None.
Yeah, i think that falkoner sys is better >_<
Certainly i'm noob -_-U
None.
Thank you both a bunch,
I've got it working borderline perfect, which I can settle at.
It's been atleast 2 years since I've done mapmaking and I'm starting back quite well(If not better than before!).
None.
Define borderline perfect

Perhaps I can help you make it perfect.
None.
Well...
ATM I'm having an issue because...
Heres what my triggers look like(involving my problem)...
KEY:
LS1-LS6 = "LIFE" SPAWN LOCATION
Zealot -=]|[1]|[=- = MAIN UNIT OF THE GAME
ESPAWN1 = ENEMY SPAWN
If you notice, near the end... on the LeaderBoardScore, there is no first parameter, it was set to 'Custom' but it disappears every time I go to edit it...
TRIGGER ONE:
Condition:
CountdownTimer(Exactly, 0);
Accumulate(P1, AtLeast, 1, Ore);
Action:
SetResources(P1, Subtract, 1, Ore);
CreateUnit(1, Zealot -=]|[1]|[=-, ESPAWN1, P8);
SetScore(P1, Add, 1, Custom);
PreserveTrigger();
Comment("p1 enemy spawn");
TRIGGER TWO:
Condition:Always();
Action:
CreateUnit(3, LIFE, LS1, P1);
CreateUnit(3, LIFE, LS2, P2);
CreateUnit(3, LIFE, LS3, P3);
CreateUnit(3, LIFE, LS4, P4);
CreateUnit(3, LIFE, LS5, P5);
CreateUnit(3, LIFE, LS6, P6);
SetCountdownTimer(SetTo, 45);
DisplayText("By x[Alkali]x @ USEast", 5);
Wait(3000);
DisplayText("Dark Templar = 10 Zealots", 5);
Wait(3000);
DisplayText("Inspired by Self Defense 1.4", 5);
Wait(3000);
DisplayText("Only have two heroes(High Templar/Dragoon) at ANY one time otherwise they will be killed. A Dragoon counts as 4 Zealots, a High Templar counts as 6.", 4);
Comment("start timer + msg's");
LeaderBoardScore(, "Units to kill");
SetScore(All Players, SetTo, 0, Custom);
My problem is...
The score is counting either units or buildings or something...
They start off with like 8 buildings and the score is in the high 600's...
Then I'll build units, and the score skyrockets to the thousands, depending on how many units I make...
It's just me being retarded with custom scoreboard...
(I PROBABLY WONT VIEW THIS TILL TOMORROW)
Post has been edited 1 time(s), last time on Apr 23 2008, 1:46 am by xAlkalix.
None.
Make it using Classic Trigedit in SCM Draft, that has the option for Custom, I'm not certain how to make it in text-based.
None.
Christ it worked!
I'll continue my map tomorrow... you may want to check this for more questions considering you answered a lot of my questions so far...
None.
Don't worry, I'll be here
None.

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
Btw. it doesn't matter how large a location is. If the location is filled up sc will just spawn them outside. But there's a limit of about 100 units until the next created unit would have to be displaced too far from the center and you will get a message "Error creating unit x a xxxx,xxxx" (or something similar).
Still you should make the location quite large and check for at most x units, x being near to the max. Remember that this trigger fails if player has buildings in the location as it would occupy space for about 10 units.
i fixed that part nude...
in order to spawn units, for the conditions its just like
Bring(P1, AtMost, 70, Zealot -=]|[1]|[=-, PSPAWN1);
so it waits for them to move, or die...
None.
Why not just create them somewhere, move them, then remove all units at the place you made them, that way you don't have any problems, if they can't move there, they simply get removed. (Although, you might not have enough space for that)
None.