Staredit Network > Forums > SC2 Assistance > Topic: [Solved] Random Spawner
[Solved] Random Spawner
This topic is locked. You can no longer write replies here.
Feb 27 2011, 9:10 pm
By: Riney  

Feb 27 2011, 9:10 pm Riney Post #1

Thigh high affectionado

So Ive never really set up a system like this where it just picks a random spot on the map and just puts something there. What is the best way (Apart from just massing a ton of points) to make things spawn at random generated areas on the map.

Preferably a direction to tackle this problem would be great, though a whole system works too if you must ;o



.riney on Discord.
Riney on Steam (Steam)
@RineyCat on Twitter

Sure I didn't pop off on SCBW like I wanted to, but I won VRChat. Map maker for life.

Feb 27 2011, 9:16 pm DevliN Post #2

Woah

I'm not too familiar with the trigger editor, but I believe there is an event that places a unit randomly in a region. You could probably make separate regions for various sections that you would want items dropped in, and then just use that one trigger to pull it off.



:devlin: Currently Working On: :devlin:
Myself

Feb 27 2011, 9:22 pm TiKels Post #3



You could place a large location over parts that you want to spawn, and put "Negative" pieces of locations over where you don't want it to spawn. I'm no sc2 mapper but if what devlin says is true (The random point in a location thing) then these two ideas coupled together could avoid placement in areas where items would be unreachable.



"If a topic that clearly interest noone needs to be closed to underline the "we don't want this here" message, is up to debate."

-NudeRaider

Feb 27 2011, 9:28 pm Riney Post #4

Thigh high affectionado

Quote from DevliN
I'm not too familiar with the trigger editor, but I believe there is an event that places a unit randomly in a region. You could probably make separate regions for various sections that you would want items dropped in, and then just use that one trigger to pull it off.

See I was thinking that, but that again would require a few to masses of locations. I was hoping there would be a way to use 'Entire Map' or something of the sort.



.riney on Discord.
Riney on Steam (Steam)
@RineyCat on Twitter

Sure I didn't pop off on SCBW like I wanted to, but I won VRChat. Map maker for life.

Feb 27 2011, 9:28 pm DevliN Post #5

Woah

Unlike SC1, you can combine locations (regions) in SC2 into one large region, so the idea of "negative locations" is unnecessary.

EDIT:
There is a way to do the entire map, if you make a region big enough for the entire map. I figured you wanted different regions of the map to have different items or something.



:devlin: Currently Working On: :devlin:
Myself

Feb 27 2011, 10:32 pm payne Post #6

:payne:

Quote from DevliN
Unlike SC1, you can combine locations (regions) in SC2 into one large region, so the idea of "negative locations" is unnecessary.

EDIT:
There is a way to do the entire map, if you make a region big enough for the entire map. I figured you wanted different regions of the map to have different items or something.
1) Entire Map can be considered as a Region in itself: no need to create one huge-ass location.
2) If I remember properly, merged regions aren't working very well with the Reveal trigger.
3) Negative locations are buggy as well: "Spawn unit at random point in region" will spawn units in the negative region (as far as I remember).



None.

Feb 27 2011, 10:42 pm Roy Post #7

An artist's depiction of an Extended Unit Death

Quote from payne
1) Entire Map can be considered as a Region in itself: no need to create one huge-ass location.
2) If I remember properly, merged regions aren't working very well with the Reveal trigger.
3) Negative locations are buggy as well: "Spawn unit at random point in region" will spawn units in the negative region (as far as I remember).
Yeah, pretty much all of this.

Anywho:

Unit - Create 1 Marine for player 1 at (Random point in (Entire map)) using default facing (No Options)

Done?

You can also create regions dynamically through triggers by specifying points.

If you intend to do multiple things at the randomly selected point, create a Point variable and set it to (Random point in (Entire map)).




Feb 27 2011, 10:51 pm payne Post #8

:payne:

Quote from Roy
If you intend to do multiple things at the randomly selected point, create a Point variable and set it to (Random point in (Entire map)).
I have a test map for this if you're interested into it. :)

EDIT: this could help.



None.

Feb 27 2011, 11:11 pm Riney Post #9

Thigh high affectionado

Quote from Roy
Quote from payne
1) Entire Map can be considered as a Region in itself: no need to create one huge-ass location.
2) If I remember properly, merged regions aren't working very well with the Reveal trigger.
3) Negative locations are buggy as well: "Spawn unit at random point in region" will spawn units in the negative region (as far as I remember).
Yeah, pretty much all of this.

Anywho:

Unit - Create 1 Marine for player 1 at (Random point in (Entire map)) using default facing (No Options)

Done?

You can also create regions dynamically through triggers by specifying points.

If you intend to do multiple things at the randomly selected point, create a Point variable and set it to (Random point in (Entire map)).

Fair enough, but is there a way to detect height and stuff to make sure things dont get on top a wall?



.riney on Discord.
Riney on Steam (Steam)
@RineyCat on Twitter

Sure I didn't pop off on SCBW like I wanted to, but I won VRChat. Map maker for life.

Feb 27 2011, 11:59 pm NicholasBeige Post #10



Errp. Use a condition? Get the 'real' value of the height from the 'point' you stored? It's possible and I'm tired.



None.

Feb 28 2011, 12:54 am Ahli Post #11

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

You can check if the point is pathable by ground units, too.




Feb 28 2011, 1:11 am Riney Post #12

Thigh high affectionado

Quote from Ahli
You can check if the point is pathable by ground units, too.

Now thats good. What specifically is that condition called?



.riney on Discord.
Riney on Steam (Steam)
@RineyCat on Twitter

Sure I didn't pop off on SCBW like I wanted to, but I won VRChat. Map maker for life.

Feb 28 2011, 2:55 am Ahli Post #13

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

"Point is passable" returning a boolean.




Mar 7 2011, 3:04 am Riney Post #14

Thigh high affectionado

Quote from name:Cardinal
Errp. Use a condition? Get the 'real' value of the height from the 'point' you stored? It's possible and I'm tired.

Sorry for the late response. This actually did not work. I then found that there was a Cliff Level of Point function that did the desired effect, but thanks for putting me in the right direction.

This is solved and can be locked.



.riney on Discord.
Riney on Steam (Steam)
@RineyCat on Twitter

Sure I didn't pop off on SCBW like I wanted to, but I won VRChat. Map maker for life.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[02:53 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: I'll check it out this weekend!
Thanks
[02:47 am]
Symmetry -- I'll check it out this weekend!
[02:40 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: Another map maker? Damn we really ARE back
I invite you to try out the map I modified. I don't have the creativity to create maps from scratch, but I do have the know-how to modify existing ones; my project is to tweak community campaigns (specifically those with errors—to make them playable.
[02:27 am]
Symmetry -- Another map maker? Damn we really ARE back
[01:51 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Now that I wanted to change my avatar, the error image is showing up, haha.
[01:34 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
I invite you to try out a mission I'm modifying from *StarCraft Reversed*; I'm trying to make it more playable and challenging.
[01:33 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
[01:31 am]
Ultraviolet -- Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Is it forbidden to have a large avatar?
actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
[12:20 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: https://staredit.net/profile/133367/ dude's avatar is massive
Is it forbidden to have a large avatar?
[12:04 am]
Ultraviolet -- https://staredit.net/profile/133367/ dude's avatar is massive
Please log in to shout.


Members Online: UndeadStar, Ultraviolet