Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Trigger question
Trigger question
Sep 29 2007, 1:48 pm
By: asaguda  

Sep 29 2007, 1:48 pm asaguda Post #1



I'm pretty much new to Starcraft mapediting, but I have quite a lot of experience in mapping for Warcraft 3, mind you, it's not the same.
I was wondering how to make a trigger that spawns a certain unit for a certain player at specified intervals of time as long as the command center/hive/nexus is still functional.

Also useful would be if someone gave me a link to a tutorial that lists various useful triggers to use and how to set them up so it works.
Or a whole site that has a bunch of tutorials. (Tutorials on this site just gives me "Omg. No permission." <.<)



None.

Sep 29 2007, 2:16 pm payne Post #2

:payne:

Players :
1,2,3,4,5,6,7,8
Condition :
Current Player bring at most 1 Zerg Hive to Anywhere
Action :
Create *desired number of units* *desired unit* at *desired location*
Wait *desired time* miliseconds
Preserve Trigger

Players :
1,2,3,4,5,6,7,8
Condition :
Current Player bring at most 1 Terran Command Center to Anywhere
Action :
Create *desired number of units* *desired unit* at *desired location*
Wait *desired time* miliseconds
Preserve Trigger

Players :
1,2,3,4,5,6,7,8
Condition :
Current Player bring at most 1 Protoss Nexus to Anywhere
Action :
Create *desired number of units* *desired unit* at *desired location*
Wait *desired time* miliseconds
Preserve Trigger

Example of action trigger:
Action :
Create 1 Terran Marine at Spawn
Wait 5000 miliseconds
Preserve Trigger



None.

Sep 29 2007, 2:27 pm asaguda Post #3



Will try, thank you. :D



None.

Sep 29 2007, 2:49 pm NudeRaider Post #4

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

The above would work if you use no other wait somewhere.

But as a general rule for sc mapediting I tell you not to use waits at all.
They will cause wait blocks (prevents triggers from firing) and/or throw off timing as your maps becomes more complex (when executing a wait action other triggers will run again).

Use a death counter system instead. Death counters (DCs) can be used for many more things, so its wise you learn them ASAP.
The basic idea is you take a unit you dont use in your map and modify (set, add, subtract) the death counts (sc counts how often a certain type of unit has been killed) for this unit. This can be done by triggers AND actual kills ingame, but because you dont use the unit it cant be killed, so you have full control over the DC. Simply count up every trigger loop until you reach the desired delay. Then you spawn the units and reset your counter to 0.

Take a unit lets say neutral - critters - kakaru and rename it to "Spawn Counter"
Create a location over every command center and rename them to "Spawn Loc 1-6"
So lets say you want to spawn untis every 10s (1 trigger loop take 2s of sc game time, an about 1,5s real time on speed 7)
Here are sample triggers how you can do it:

Trigger 1: Counter
Human Players (e.g. P1-6)
Conditions:
Always
Actions:
Add 1 for death counts of "Spawn Counter" for current player
preserve trigger

Trigger 2: Spawn / Reset
Player 1
Conditions:
Current player brings at least 1 Command Center to "Spawn Loc 1"
Current player has suffered at least 5 deaths of "Spawn Counter"
Actions:
Create 1 unit for current player at "Spawn Loc 1"
Set to 0 for death counts of "Spawn Counter" for current player
preserve trigger

Trigger 3: Spawn / Reset
Player 2
Conditions:
Current player brings at least 1 Command Center to "Spawn Loc 2"
Current player has suffered at least 5 deaths of "Spawn Counter"
Actions:
Create 1 unit for current player at "Spawn Loc 2"
Set to 0 for death counts of "Spawn Counter" for current player
preserve trigger

...
For all players.

Then you are on the safe side.




Sep 29 2007, 3:13 pm Gerrard2060 Post #5



Also, asaguda, go to www.maplantis.org if you want tutorials.



None.

Sep 29 2007, 4:35 pm asaguda Post #6



Yeah, I don't really get that with the DC system, but thanks anyways. Will try using wait anyways and see what happens. If it fucks up completely, I'll come back and demand a more detailed description of DCs. Or look for one, first. :P



None.

Sep 29 2007, 4:48 pm asaguda Post #7



Ah. I get it now.
The counter trigger makes the game think you have killed the critter, and when it reaches 5 the death counter for the critter resets and spawns a unit, and as you said the counter trigger would loop once about every 2 seconds.
Hehe, thanks alot! :)



None.

Sep 29 2007, 5:40 pm Twitch Post #8



Here is some great help like you ask for http://www.maplantis.org/index.php?sid=2945864bc9a306e47c5e29fa1360b098;pg=wiki



None.

Sep 29 2007, 6:14 pm Akar Post #9



Quote
lso, asaguda, go to www.maplantis.org if you want tutorials.
YAY lets advertise maplantis everywhere! On second thought lets not.

Here are some example maps of things that are commonly used.

Attachments:
Example Maps.zip
Hits: 3 Size: 343.44kb



None.

Sep 29 2007, 7:37 pm asaguda Post #10



Thanks. I find it tiresome to make triggers for each player separately though, is there any editor that can batch edit the same type of attribute in the same type of trigger? Or maybe a trigger exclusive program? ><
*Googles it too.*



None.

Sep 29 2007, 11:14 pm NudeRaider Post #11

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

Quote from asaguda
Thanks. I find it tiresome to make triggers for each player separately though, is there any editor that can batch edit the same type of attribute in the same type of trigger? Or maybe a trigger exclusive program? ><
*Googles it too.*
Use scmdraft 2 0.8 there you can copy and paste if you use trigger editor (not classic map trigs).
Then write a simple c++ code that writes the triggers for you. Or make copy and paste manually if its only a few times with similar code.




Sep 29 2007, 11:28 pm Demented Shaman Post #12



Or with trigedit use replace in notepad or my trigger duplicator that duplicates text.



None.

Sep 30 2007, 12:05 am fritfrat Post #13



Easiest way to copy triggers for multiple players is just to select the multiple players and use Current Player all the time.. but of course this doesn't work when locations are involved. SO, just make it for one player, open up trigedit, copy the section used into Wordpad, and use the Replace All function accordingly. Use Wordpad over Notepad, it does the replace all function much quicker.



None.

Sep 30 2007, 12:19 am Falkoner Post #14



Another tutorial that tends to help people with death counts.

Using current player wouldn't work for what you want unless you want to have them all spawn at the same spot, but using current player reduces the amount of actions you have to edit for each player when you copy the triggers.



None.

Sep 30 2007, 1:40 am Demented Shaman Post #15



Quote from devilesk
Or with trigedit use replace in notepad or my trigger duplicator that duplicates text.
Also my duplicator has a replace function, faster than notepad and also capable of multiline replace.



None.

Sep 30 2007, 2:34 am M s4 Post #16



where can we get a hold of that duplicator?



None.

Sep 30 2007, 2:39 am Fwop_ Post #17



http://www.maplantis.org/index.php?pg=wiki;id=5#wiki_17

Text Trigger Duplicator at Maplantis



None.

Sep 30 2007, 3:09 am Akar Post #18



Quote
posting any unprotectors or links to unprotectors is not allowed.
I wish you people would stop advertising maplantis now, kthnx.



None.

Sep 30 2007, 3:30 am Fwop_ Post #19



Sorry, that the unprotectors are on the same page as the requested file. Not my problem.



None.

Sep 30 2007, 3:41 am AntiSleep Post #20



Quote from Akar
I wish you people would stop advertising maplantis now, kthnx.
Maplantis is currently the place with the most complete UMS reference and tutorial wiki, not to mention the file/map db and modding resources. How about you stop complaining about people linking to completely relevant resources?



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
[2024-4-20. : 7:56 pm]
Oh_Man -- lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
Please log in to shout.


Members Online: Roy