How to group specific things.

strembitsky

Member
Reaction score
1
I am making a maze map like those way back in Warcraft III. It's very tedious to set up the event saying "Player 1 enters this region" 97 times, and then doing it again for player 2, and so on. How can I group all of my players, and also how do I group regions? And how could I make a simple trigger that says "Player group enters region group"?
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
post an example of the trigger plz, otherwise we cant really help you

select it all, right click->copy as text
reply here and paste it in [ wc3] tags (with no space)
 

strembitsky

Member
Reaction score
1
I don't have a trigger yet, that's what I'm trying to get from you guys. I want to group all of the regions together, and I also want to group all player units together, and then have a trigger that means "if player unit group enters region, kill them"

I am not a newbie to scripting, I've just racked my head to hard on this specific thing. I know it's with variables, but I'm still having trouble.
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
I think you can do it in the terrain editor when you're creating your regions. If I remember correctly, you can right-click a region and press edit. It should allow you to add more areas to that region. You can also use subtractive regions to cancel out a positive region. I'm not sure if this is exactly how it works. I'll check when I open the editor next time.

For the "Player group enters region group", you'll have to think of it differently. First of all, a Player Group is a group of players. What you want is a group of units owned by these players. What you want is a Unit Group. Create a new global unit group variable, add the units you want to the unit group. To check if any of them enters the region group, I would use a trigger like this:

Events:
Any Unit Enters *Your Region*
Conditions:
((Triggering Unit) is in *Your Unit Group*) == True
Local Variables:
Actions:
Kill (Triggering Unit)

If you successfully create a single region with several different areas, you should only need one event.

I might be misunderstanding you. Do you want a player's unit to die if they go outside the maze, or do you want all units to die if they're all outside at the same time? This trigger does the first option.
 

strembitsky

Member
Reaction score
1
This is exactly what I want, but the problem is I'm having troubles with turning all regions into one region still. Is it just trial and error with the x/y meter inside of the "edit" you click on the region? Could you go more in-depth, please?
 

MissKerrigan

Active Member
Reaction score
23
It's not possible to merge regions together
The things you'll have to do is make multiple events like this:

event 1: any unit enters region 'location 1'
event 2: any unit enters region 'location 2'
event 3: any unit enters region 'location 3'
event 4: any unit enters region 'location 4'

So the trigger will fire if 1 of the events happens
Basically you creating a big region with multiple small regions here

You want a player group enters a region to fire the trigger but:

- do you want multiple players enters the region?
- or multiple units of a player?
- or even multiple units of multiple players?
 

strembitsky

Member
Reaction score
1
I am simply trying to shorten the amount of events I have to make. Is there any work-around whatsoever, or do I have to make 97 events?
 

X-maul

AKA: Demtrod
Reaction score
201
You wont be able to do it like it was done in Wc3. In Wc3 it was done by checking what type of terrain it was. That is not possible in SC2.

If the terrain wont change in the maze (I'm thinking of same event in the map that would cause some area to be unpathable) you can create a custom region by creating a new region and editting it. By doing this you can add or substract shapes into the model (This is basically what Siritu said).

Like it's done in this image:
BuDBv.jpg
 

strembitsky

Member
Reaction score
1
^Right, I got that far. It's just a little difficult for me because it's not dynamic (it doesn't update while I'm adding shapes.) I guess I'll mess around with it some more.
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
It's not possible to merge regions together

That means you'll also learn something from this thread :)

You can select multiple regions and press numpad 0 to merge them. Don't mess with the shapes editor thing, instead just create the regions separately and select them all and press numpad 0 to merge them.

If you want a negative region, you can go into the shapes after you've merged them and check the "negative" box for the region you want to be negative.
 

strembitsky

Member
Reaction score
1
Unfortunately, Siretu, that didn't work for me. Are you sure it's zero on the numpad? Is there anything specific I need for pressing it to work?

EDIT: Turned Num Lock on and it worked flawlessly. I thank you a million times, and I shall like every one of your posts in this thread, since, as you said; you like likes.
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
Thank you :) I'm glad it worked out for you. I was thinking about adding a note that num lock needs to be on, but I forgot about it.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top