Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Unit spawning trigger
Unit spawning trigger
May 15 2008, 3:06 pm
By: lolzzzzzzzz  

May 15 2008, 3:06 pm lolzzzzzzzz Post #1



Ok, I am currently making an RPG in which battles are in the open and enemies spawn if you step close to their spawn point. The problem is, I don't want to create one location for every single spawn point just to check if there is enemies in there because the player can simply lure whatever unit is in the spawn out of it and voila, more spawn is created and the whole path can become cluttered with enemies in no time.

I played this RPG map named Deisha which I think is still in Alpha (I'm not sure, it's in Korean or Japanese). In there, everytime you are near a spawn point, it spawns units BUT ONLY if there are NO SAME UNITS of the SAME SPAWN nearby. I don't know how the creator did that trigger without overlapping locations or units since:

1- If you stand near a Zergling spawn, it spawns 3 Zergling and until you kill them, IT WILL NEVER SPAWN Zerglings there again EVEN IF YOU LURE THEM OUT of their spawn.

2- There are many spawns near each other, meaning that locations are surely overlapped which can only mean that there is a method I'm not aware of :(

So my main question is, how to make certain units spawn only if other units that spawned FROM THAT location AND THAT LOCATION ONLY are killed, like in Deisha RPG? Any help would be greatly appreciated.



None.

May 15 2008, 3:52 pm Kenoli Post #2



Can you upload that Deisha map?



None.

May 15 2008, 4:37 pm lolzzzzzzzz Post #3



Here it is. It's a pretty fun map to play, I just don't understand the quests lol...

Attachments:
µ¥ÀÌ»þRPG_Ver.A06.scx
Hits: 14 Size: 648.06kb



None.

May 15 2008, 4:45 pm Ahli Post #4

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

Is it possible that the enemy has at least 2 spawns of the same unit (e.g. zerglings) on the same part of the map (e.g.: 1 zergling spawn here and 1 zergling spawn a little bit more east)?

A -If no, there is the spawning condition that the computer player commands none of that unit (== brings none of that units to anywhere).

B -If yes, it could have A with different enemy players who might have the same color.

C -If yes, it must have a region to check that there are none of the same units near in that region (can be a static region or a centered region).

D -If yes and there is no region, there has to be a system implemented that detects when a spawn was activated (e.g. give burrowed unit in spawn to another player). The activated spawns will be deactivated when the player commands none (like A) or not enough of that units (2 spawns were activated, only 3 lings remaining -> deactivate 1 spawn [which could be the wrong one, too]).

Edit:
I unprotected the map and watched the triggers. He used A or C. At least he had 1 location for every spawn.

Post has been edited 1 time(s), last time on May 15 2008, 5:00 pm by Ahli.




May 15 2008, 5:01 pm lolzzzzzzzz Post #5



Yea, I see where you're getting at. I think the most likely scenario would be the last one you said although there are many spawns of the same unit near each other. I haven't played this map a lot, well 4 times to be exact, but I haven't encountered a scenario where 2 Zergling spawns were activated but there were only 3 Zerglings in the area and the wrong spawn was activated although it could certainly be this case.

I'll try skething the spawn points quickly:

- [Base]

[Z1] < [Player 1]


- [Z2] < [Player 2]

This is the most common scenario in that map. One player (me) gets the first spawn and starts killing Zs and another goes down to the other Z spawn to start killing aswell. When one of us have to heal it starts luring the Z from the respective spawn, say P2. When the Zs are out of the Z2 spawn, none spawns there and when P2 comes back and kills the remaining Zs in Z2, the Zs start spawning in Z2 again.

Once, I wanted to test how that worked so I waited for P2 to heal and lure Zs out of Z2 spawn and when that happened I went down and lured both Zs from Z1 and Z2 to the base and again, no Zs spawned from either because when I came back, the # of Zs was still 5 (3 from my spawn and 2 from Z2 spawn). Also, keep in mind that there are more than 2 Z spawns out there, I think 2 more, not sure but those are not close to the 2 I mentioned in my sketch.



None.

May 15 2008, 7:32 pm NudeRaider Post #6

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 maker probably made static locations above each spawn and then spawns only the respective unit if the owner of the spawned units brings at most 0 units of that type to the spawn.
e.g.:
C: P8 brings at most 0 Zergling to 'Spawn 1'
A: Create 3 Zerglings at 'Spawn 1'

Nothing magic ;)




May 15 2008, 10:02 pm Falkoner Post #7



You can also check to make sure there aren't already units around the player's hero unit, depending on how the map works, of course, if the units might possible lose interest in the hero, then that would not work.

You can use burrowed units and reuse a large location and a small location to do Nude's method if you want to limit locations more.

Dang, that map you posted is OS Map proof :PI didn't try other unprotectors though.



None.

May 16 2008, 12:50 am lolzzzzzzzz Post #8



Hmm, yea, at most would definitely make this feature more likely but the problem is that there are 2 Zergling spawns near each other and I tried luring out the Zerglings from, well, the most plausible location size (up to base). So if there is one huge location that checks to see if there is any alive that could only mean that:

1- Spawns are from different players and they use same colors.

So what I have to do is make one huge location that will check for existing units and another that will spawn right? Also, could you give me an example of how to use burrowed units as checkers? It's just that I've never used burrowed units to represent anything and I'm currently doing the battle engine of my map.



None.

May 16 2008, 3:49 am Falkoner Post #9



Actually, I realized that there is only a need for one location, since it will spawn in the middle anyway, so you only need one large location.

Here's how the burrowed unit system works, basically, you preplace a burrowed unit, usually for a neutral player like player 9(make sure it is researched for them) and then what you do is every trigger cycle you have it run through each burrowed unit, centering it on each one, checking for units around, spawning if there are not, and then giving away the burrowed unit and moving on to the next one, then at the end you give all the burrowed units back to the original player so you can do it all over again.



None.

May 16 2008, 10:47 am Kenoli Post #10



It's pretty easy to make it spawn tons of zerglings. Here's me getting owned:


Also, the spawn locations aren't very close together.
This is the starting area:


The trigger is pretty simple:
Quote
Conditions:
Bring("Player 7", "Zerg Zergling", "Location 49", Exactly, 0);
Switch("Switch1", set);
Bring("Player 6", "Any unit", "Location 86", At least, 1);

Actions:
Create Unit("Player 7", "Zerg Zergling", 3, "Location 49");
Preserve Trigger();
Basically, when there's no Zerglings in the spawn location, make some.
The second bring condition is part of some timer. It prevents it from spawning more than once every few seconds. (Which probably wouldn't happen anyway)
The switch... I have no idea. It doesn't seem to serve any purpose at all.



None.

May 16 2008, 11:19 am Ahli Post #11

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

Quote from Falkoner
Dang, that map you posted is OS Map proof :PI didn't try other unprotectors though.
just rename it? my osmap worked :O
I always have problems with squares in filenames after downloading... :bleh:




May 16 2008, 4:14 pm lolzzzzzzzz Post #12



Hmm, I see, so it would be best if I didn't overlap locations and make them rather big to prevent multiple spawning right? I'll give a shot at burrowed triggers as well but hmm, might take some time. Thx guys.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:45 am]
Sylph-Of-Space -- Does the shoutbox get disabled when there's spammers?
[2024-5-17. : 6:47 am]
NudeRaider -- lil-Inferno
lil-Inferno shouted: nah
strong
[2024-5-17. : 5:41 am]
Ultraviolet -- 🤔 so inf is in you?
[2024-5-17. : 4:57 am]
O)FaRTy1billion[MM] -- my name is mud
[2024-5-17. : 4:35 am]
Ultraviolet -- mud, meet my friend, the stick
[2024-5-16. : 10:07 pm]
lil-Inferno -- nah
[2024-5-16. : 8:36 pm]
Ultraviolet -- Inf, we've got a job for you. ASUS has been very naughty and we need our lil guy to go do their mom's to teach them if they fuck around, they gon' find out
[2024-5-16. : 5:25 pm]
NudeRaider -- there he is, right on time! Go UV! :D
[2024-5-16. : 5:24 pm]
lil-Inferno -- poopoo
[2024-5-16. : 5:14 pm]
UndeadStar -- I wonder if that's what happened to me. A returned product (screen) was "officially lost" for a while before being found and refunded. Maybe it would have remained "lost" if I didn't communicate?
Please log in to shout.


Members Online: 9andrewc3322eb1