Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Dynamically Created Units - Complications
Dynamically Created Units - Complications
Dec 10 2009, 3:47 pm
By: Pinky  

Dec 10 2009, 3:47 pm Pinky Post #1



Hey all Pinky once again!

I have a scenario set up where I have units being dynamically created and then junkyard dogging around a portion of the map. In this section of the map there are two types of enemies:
Leaders & Followers.

Leaders strut around with a multitude of Followers trailing after them (if you have played L4D2, you know the Clown Infected? Like that.) This way you can't really fight a leader on his own as he will always have followers backing him up.

I can't for the life of me think of a way to do this. The Leaders and Followers belong to the same player, how would I get multiple dynamically created leaders to have followers following them? I mean I could center a location but the location would only detect the leftmost Leader...

Hope I explained my problem correctly, thanks guys.



None.

Dec 10 2009, 4:51 pm Symmetry Post #2

Dungeon Master

You could do it using two computer players. Center a location on the first leader, order all followers in said location to that location (towards the leader), give the leader in that location to the other computer player, repeat the process.

I don't know if this'll work for your map specifically, but it's a possible solution.



:voy: :jaff: :voy: :jaff:

Dec 10 2009, 5:38 pm Neki Post #3



I made a concept map for you. I'm not sure how reliable this would be in a real application in a map, but you can try anyway. Basically, I center two 1x1 pixel (or 0x0 tile size) location on each marine, and then give them to another player. I do this until no more marines are left, and I give them all back to the original player. You'll need two locations for each unit, and basically, I center each location on each other, so they never transfer to other units. You'll need hyper triggers, and you can't use a unit which will outrun the location (Zergling and vulture can outrun these small locations). The only thing that might be a problem is I'm not sure if you can reliably detect if the marine is still alive in the location, because I center the locations regardless if the marine is present.

Attachments:
dynamicunits.scm
Hits: 4 Size: 51.69kb



None.

Dec 11 2009, 6:52 am stickynote Post #4



You could just change the conditions to check if the marine is still alive by centering it on a marine at anywhere and if there is no marine in location, then it is dead. If there is, then it just moved, but is still alive.



None.

Dec 11 2009, 11:40 am Pinky Post #5



Mmm that is rather ingenious but unfortunately uses up too many locations for the amount of things I will need for my map.

I have sort of thought up a "work-a-round" myself if there is no other method its slightly different to what I originally wanted but it might have to do unless anyone knows any other techniques. Basically when the Leader "sees" the player (walks into a location that is being constantly centered on the player) he stops and begins "screaming" (wav file + visual effect), players have X seconds to kill him before many Followers (who are just junkyard-dogging around) rush in for the kill.

Something probably people new already but I only just thought of today as well, for those of you who are interested:

I originally just had five locations spread around my battlefield, with units spawning on them and then junkyarding around. But then I thought of something much more location efficient and useful. I have multiple burrowed zerglings spread throughout the battlefield owned by a neutral player, then I have a location (the only location that i need) center on any zergling at ANYWHERE, then spawn units and give the zergling to another neutral player, and then continue to the next zergling, so on and so forth, repeat repeat.

The problem with this was that the spawns always started left to right, which was a bit predictable and allowed for easy camping, so then I decided to add RANDOMIZED switches, which pretty much gives the illusion that the spawns are happening anywhere everywhere, and stops the players from camping. All this for just one location to boot!

Anyway just thought I'd share that, though I'm sure someone probably thought of this years ago its new to me hahaha.

Also if anyone would have any more methods I could try out for my Leader-Follower concept that would be much appreciated!



None.

Dec 11 2009, 5:30 pm CecilSunkure Post #6



I've done this before, except, I used two different computer players. I'd say using two different computer players would be the simplest solution to this.



None.

Dec 11 2009, 7:08 pm Pinky Post #7



Ok, but how exactly would you do it? One computer for the Leaders and one for the followerS?



None.

Dec 12 2009, 3:01 am DavidJCobb Post #8



Yep, one computer for leaders, one for followers.

Me, I'd probably have a really big location around a leader. Any followers in that location would be ordered to the leader, and the leaders would Junk Yard Dog. This, of course, creates the potential problem of two leaders getting too close, with one of them "leeching" the other's followers away... Plus, it's probably not elegant (in any way, shape, or form). But it is simple. (Probably too simple.)

Course, recently I've only been doing SC maps for fun (usually while waiting for pages to load) -- I haven't really finished anything advanced. I have several maps that are just incomplete terrain, with plans and dialogue marked out by locations, but no triggers... Chances are, the solutions above are more elegant and efficient.

EDIT: With two players, if both the leaders and followers are the same unit, you need (using my method) multiple locations. For three players, you can get away with one. (Center the location on a leader, order the followers, give the leader, repeat... Then return all leaders to the original controlling player).

EDIT: If followers and leaders are different types of units, on the other hand, then you could do this with one player and multiple locations, or two players and one location.

Post has been edited 2 time(s), last time on Dec 12 2009, 3:12 am by DavidJCobb.



None.

Dec 12 2009, 3:47 am ForTheSwarm Post #9



Ultimo says:

Why not use two locations? It works well unless you are stressed for locations. Two computers is not efficient, unless you have several to spare. How many leaders are there going to be?



None.

Dec 13 2009, 3:43 am Pinky Post #10



around 10ish. with about 30ish followers

they spawn dynamically, both the leaders and followers.



None.

Dec 14 2009, 5:36 pm CecilSunkure Post #11



Well you are going to be using your two different computers so that you can order each computer to different locations without affecting the other. Take advantage of this, and then rig up some sort of system to allow Computer A to be followed by Computer B.

If you want to do this, you need to be able to center a location over each leader, and then order all the Computer B units to that location. To do this, you can cycle through your leaders by giving them to multiple players, or you can keep a burrowed unit underneath your leaders and then cycle through those burrowed units. Both tactics work, and the cycling with a burrowed unit would be best, imo.

To cycle through units and center locations over them, you need to make sure that the locations don't all center onto a single unit. To do this, you center a location over a leader owned by Computer A, and then give it to Computer B. Repeat this process until A has no leaders, and then give all the leaders owned by B back to A. Do all of this within a single trigger cycle. The alternative is to cycle through burrowed units underneath the leaders, say, a drone.

It would be far easier to just order groups of units altogether to certain locations (including leaders and followers), instead of ordering groups of units to leaders.



None.

Dec 21 2009, 7:19 am Pinky Post #12



It would be easier yes but that would require too many locations and their patterns would fast be predictible... also triggers would get messy and not produce intended effect and etc. etc.

I think for ease and for location and trigger efficiency I am just going to stick with the Leader doing a 'spell" where he calls all surrounding followers (who are junk yard dogging around) to his position. This spell will have a visual/audio cue and a buildup so the player has time to kill the leader before it draws the horde to it, yes I think that will suffice.

Thank you SEN!



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:00 pm]
lil-Inferno -- benis
[10:41 am]
v9bettel -- Nice
[01:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[10:11 pm]
Ultraviolet -- :P
[10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
Please log in to shout.


Members Online: DarkenedFantasies, lil-Inferno, Ultraviolet