Staredit Network

Staredit Network -> UMS Assistance -> just a little help needed
Report, edit, etc...Posted by Staredit.Net Essence on 2005-09-27 at 00:21:19
Ok so I am working on a new Diplomacy type map and I realize, I don't know how to get money everytime the timer hits 2:00, let alone keep the timer going and keep the money flowing(guessing theres a way to do it without making 879835 triggers for it)

And as I think more, I don't know how to get "special" units to spawn right where they were created, I am guessing that has been asked before, but just for the hell of it, I'm asking here

and oh yea, i tryed the search button and didn't come up with much
Report, edit, etc...Posted by Sniper on 2005-09-27 at 00:58:44
Preserve trigger action makes sure that as long as the condition is met, the action will keep going.

"special" units meaning....
Report, edit, etc...Posted by MindArchon on 2005-09-27 at 01:40:41
A countdown timer COUNTS down, so im assuming every 2 minutes you want units to be created. Set a countdown timer to 120 seconds, and when it hits zero, create the special units you want created, then reset the countdown timer.

QUOTE
And as I think more, I don't know how to get "special" units to spawn right where they were created, I am guessing that has been asked before, but just for the hell of it, I'm asking here


I don't quite follow you here, do you want these to be created at the end of the countdown timer? And where do you want them to be created? Please clarify.
Report, edit, etc...Posted by Staredit.Net Essence on 2005-09-27 at 04:17:29
about the special units, Say you make a marine at any old spot on the map, if you command the correct capitol, the unit will be replaced by a hero marine, at that spot where the orginal marine was created, this goes for almost all units, cant really do it per location because the unit can be created anywhere as long as you build a barracks to make the orginal marine tongue.gif

and for the timer thing, this is what i want

timer starts at 4:00
- when timer hits 2:00, you get money per city you own
when timer hits 0:00 it starts over and process repeated
Report, edit, etc...Posted by in_a_biskit on 2005-09-27 at 04:32:47
the idea behind replacing units with 'special'/hero units is that you center a location on them to find them:
Trigger
Conditions:
¤ Player 1 commands at least 1 marine
Actions:
¤ center location labeled 'replace' on marine owned by Player 1.
¤ remove 1 marine owned by Player 1 at 'replace'.
¤ create 1 hero marine at 'replace' for Player 1
¤ Preserve trigger


Use 'current player' and/or other modifications to suit.


With the timer, learn to use 'Preserve trigger' to create recurring triggers.

Simple (normal) diplo maps have a trigger for every city to give you money:
Trigger
Conditions:
¤ countdown timer is exactly 120 seconds
¤ Current player brings at least one 'city' to 'Athens'
Actions:
¤ modify resources for current player: add 100 ore.
¤ preserve trigger

And repeat for every city to collect money every time the timer reaches 2:00.

To reset the timer every time it reaches 0, the same thing applies:
Trigger
Conditions:
¤ Countdown timer is at most 0 seconds
Actions:
¤ Modify countdown timer: set to 240 seconds
¤ Preserve trigger
Report, edit, etc...Posted by Urmom(U) on 2005-09-27 at 14:38:47
QUOTE
Simple (normal) diplo maps have a trigger for every city to give you money:


Trigger
Conditions:
¤ countdown timer is exactly 120 seconds
¤ Current player brings at least one 'city' to 'Athens'
Actions:
¤ modify resources for current player: add 100 ore.
¤ preserve trigger

And repeat for every city to collect money every time the timer reaches 2:00.

To reset the timer every time it reaches 0, the same thing applies:


Trigger
Conditions:
¤ Countdown timer is at most 0 seconds
Actions:
¤ Modify countdown timer: set to 240 seconds
¤ Preserve trigger

[right][snapback]323035[/snapback][/right]

that wont work because it will only be exactly 2:00 for a second about and all the triggers wont run. in the diplo that i am looking at, they made it so that when the countdown timer is 0 it adds 240 seconds and sets about 60 switches. then for the trigger they did

undefined
Trigger
Conditions:
¤ Brings at least 1 building to 'Location'
¤ Switch for certain city is set
Actions:
¤ Add 1000 Minerals
¤ Display Text for city
¤ Clear Switch for certain city
¤ preserve trigger
Report, edit, etc...Posted by Oo.Turin.oO on 2005-09-27 at 20:34:50
Will people PLEAES stop using 'center location' when helping with triggers. The correct trigger is MOVE LOCATION. Thank you. And like urmom says, your gonna have to have a trigger for each city or something. So you can do his way or, i was thinking, that you use death counters. So, every time you build next to a city it adds one to your death count. And if you lose the city it subtracts from your death count. THEN you have to reset the death count every turn so, you would do something like, Player 1 has at least 1 death of (lets use a zergling), then give player 1 1000 minerals and subtract one death of zerglings for player 1 and preserve the trigger. Note that the timer has to have also hit 2:00. A good idea would be to conjoin me and urmom's ideas into something like this.


Trigger
Description:
Timer hits 2:00
Players:
¤ All Players
Conditions:
¤ Countdown Timer is exactly 120 seconds.
Actions:
¤ Set Switch 1
¤ Preserve Trigger



Trigger
Description:
Give money at 2:00
Players:
¤ Player 1
Conditions:
¤ Switch 1 is set
¤ Player 1 has at least 1 death of zergling
Actions:
¤ Set resources to add 1000 minerals
¤ Set deaths to subtract 1 death of zergling for player 1
¤ Preserve trigger



Trigger
Description:
Last city
Players:
¤ Player 1
Conditions:
¤ Player 1 has 0 deaths of zergling
¤ Switch 1 is set
Actions:
¤ Clear switch 1
¤ Preserve Trigger



Trigger
Description:
Count cities
Players:
¤ Player 1
Conditions:
¤ Switch 1 is cleared
¤ Current Player has at least 1 building at location 'city 1'
¤ Countdown Timer is exactly 2:30
Actions:
¤ Set deaths for player 1 to add 1 death of zergling
¤ Preserve Trigger


IMPORTANT NOTES!!!!!:
-Each player must have his own switch.
-You CANNOT use a unit that is available in game play for death counts.
-If you want captials to give more money, you must use a different unit/death count.
-You must have a seperate 'count cities' trigger for EACH CITY.
-I used Countdown Timer is exactly 2:30 on the last trigger so that the trigger wasn't constantly firing and it still gave it time to calculate each city.

That should work. I'll review it real quick and if im not comfortable with it ill go plug it into a basic map for this purpose to see if it works correctly.
Report, edit, etc...Posted by Staredit.Net Essence on 2005-09-27 at 22:40:49
couldnt you use hypers to make all the triggers go exactly on the 2:00 mark confused.gif
Report, edit, etc...Posted by Sniper on 2005-09-28 at 00:15:09
QUOTE
Will people PLEAES stop using 'center location' when helping with triggers. The correct trigger is MOVE LOCATION. Thank you.


What difference does it make it means the same thing.

Theres switch overuse up there. You would be better off with death counters and adding 1 per step.
Report, edit, etc...Posted by Urmom(U) on 2005-09-28 at 15:16:20
QUOTE(backalleyracer @ Sep 27 2005, 10:40 PM)
couldnt you use hypers to make all the triggers go exactly on the 2:00 mark confused.gif
[right][snapback]323483[/snapback][/right]

hypertirggers dont make things go instantly. they just speed up the process so instead of checking every 2 seconds they check every 1/12 seconds approximately. if there are 30 cities it might not check them all and the coutdown timer is 50% faster than a normal second anyways giving it less time to check.
Report, edit, etc...Posted by PCFredZ on 2005-09-28 at 20:21:00
QUOTE(urmom @ Sep 28 2005, 03:15 PM)
hypertirggers dont make things go instantly.  they just speed up the process so instead of checking every 2 seconds they check every 1/12 seconds approximately.  if there are  30 cities it might not check them all and the coutdown timer is 50% faster than a normal second anyways giving it less time to check.
[right][snapback]323670[/snapback][/right]

About 118 times in 10 seconds if you want to be even more exact.

The cities shouldn't be checked via 1 trigger assisted by hypers, but instead using a binary check that can count the number of cities and give the right amount of minerals in 1 single trigger cycle, which is pretty damn close to instaneously.
Report, edit, etc...Posted by Oo.Turin.oO on 2005-09-29 at 18:49:58
QUOTE(Sniper @ Sep 27 2005, 08:15 PM)
Theres switch overuse up there. You would be better off with death counters and adding 1 per step.
[right][snapback]323522[/snapback][/right]

Theres only 1 per player...if you have 7 players thats 7 switches...big deal
Report, edit, etc...Posted by PCFredZ on 2005-09-29 at 19:02:26
QUOTE(Veritaserum @ Sep 29 2005, 06:49 PM)
Theres only 1 per player...if you have 7 players thats 7 switches...big deal
[right][snapback]324271[/snapback][/right]

Nevertheless, using Death Counts instead of Switches will be more logical if you're using 1 for each player.
Report, edit, etc...Posted by in_a_biskit on 2005-09-30 at 09:18:19
Note that StarCraft will check each trigger in a very very short amount of time - probably less than a millisecond for a single trigger. It can easily check an entire list of triggers in less than a twelfth of a second (which is why hypers can work that fast in the first place).

Which means that if you have a separate trigger for every city (which i think most diplo maps do), they'll all be checked easily in a single trigger cycle. Which means that they all can fire on the 2:00 mark.

In addition, if you want a trigger to fire more than once per trigger cycle, you can always simply make multiple copies of that trigger. Or if possible, a more efficient method is to make a 'binary counter' type system.


Anyway, if you want to reduce the number of different triggers (that is, not have one per city), then you can try counting the cities off for each player by giving them to another player (eg p9). You won't need a separate 'give-to' player for each human, because each player's trigger list is checked separately and finishes before the next player starts.

What I mean is this:
Trigger
Conditions:
¤ Current player commands at least 1 'city'
Actions:
¤ Give 1 'city' from Current player to player 9
¤  Give player minerals
¤ Preserve trigger
Copied as many times as necessary,
With a trigger to give all p9 stuff back to the Current player when they no longer control any cities.

Notice that you don't need any switches nor deathcounts wink.gif

But do whatever you feel comfortable with.
Report, edit, etc...Posted by Oo.Turin.oO on 2005-10-01 at 11:11:57
QUOTE(PCFredZ @ Sep 29 2005, 03:02 PM)
Nevertheless, using Death Counts instead of Switches will be more logical if you're using 1 for each player.
[right][snapback]324286[/snapback][/right]

okay. i was just replying to his comment on how i was going switch happy...its only 7
Report, edit, etc...Posted by Staredit.Net Essence on 2005-10-03 at 22:03:55
ok thanks for the help guys my diplo should be looking good now happy.gif
Next Page (1)