I've been searching for days and trying random stuff in the trigger editor, but still can't find out how to make a tug of war spawning system similar to desert strike. You get a probe and you build structures that are supposed to spawn units every time it is your turn based on the number buildings you have (there are multiple types of buildings). Does anybody know how to replicate that spawning system?
There are probably many ways to do this, and probably several good ones. Without knowing specifics of Desert Strike, I'd suggest you'll need to know:
(1) When are units spawned? If perioidic (based on game clock), use a Trigger that launches periodically. If it's by some other method, you'll need to explicitly call the spawning code from some other method that is controlling the temporal flow of your game. I'd recommend an Action called "Spawn Units for Player" that takes player as a parameter. Then you can call this via various methods - keeps things flexible.
(2) You'll need to figure out how many structures each player has and what types they are. I'd recommend using Pick Each Unit in Unit Group and then use All Units in Region Matching Condition. Give the function Entire Map as the region and the player owner. Then in your loop, use Unit Type to figure out the type and implement your spawn logic based on the information you gather using that method.
Ah, I'm not the best at the triggers and such, so I don't understand everything you said, but I will play around and see if I can come up with anything : EDIT: I got the first thing you said, the trigger launches periodically (every 30 secs) now, but I don't understand really anything in the second paragraph. Could you explain it more/tell me where I put the stuff(event/condition/action) in the second paragraph. Thanks!
Thanks for replying btw to my first post :D
I've been searching for days and trying random stuff in the trigger editor, but still can't find out how to make a tug of war spawning system similar to desert strike. You get a probe and you build structures that are supposed to spawn units every time it is your turn based on the number buildings you have (there are multiple types of buildings). Does anybody know how to replicate that spawning system?
@N33b: Go
There are probably many ways to do this, and probably several good ones. Without knowing specifics of Desert Strike, I'd suggest you'll need to know:
(1) When are units spawned? If perioidic (based on game clock), use a Trigger that launches periodically. If it's by some other method, you'll need to explicitly call the spawning code from some other method that is controlling the temporal flow of your game. I'd recommend an Action called "Spawn Units for Player" that takes player as a parameter. Then you can call this via various methods - keeps things flexible.
(2) You'll need to figure out how many structures each player has and what types they are. I'd recommend using Pick Each Unit in Unit Group and then use All Units in Region Matching Condition. Give the function Entire Map as the region and the player owner. Then in your loop, use Unit Type to figure out the type and implement your spawn logic based on the information you gather using that method.
@IcculusLizard: Go
Ah, I'm not the best at the triggers and such, so I don't understand everything you said, but I will play around and see if I can come up with anything : EDIT: I got the first thing you said, the trigger launches periodically (every 30 secs) now, but I don't understand really anything in the second paragraph. Could you explain it more/tell me where I put the stuff(event/condition/action) in the second paragraph. Thanks! Thanks for replying btw to my first post :D
@N33b: Go
OH MAN I FIGURED IT OUT. HOLY SHIT YES!!!! I DON'T EVEN KNOW WHAT I JUST DID, BUT IT WORKED! :DDDDD