[Log in / Register]
| News | Chat | Pastebin | Donations | Tutorials | Rules | Forums |
| Maps | Skins | Icons | Models | Spells | Tools | Jass | Packs | Hosted Projects | Starcraft II Modding | Starcraft II Resources | Galaxy Wiki |
(Keeps Hive Alive)
Go Back   The Hive Workshop > StarCraft II > StarCraft II Editor Help Zone


StarCraft II Editor Help Zone Tell us about any problem you have ran into while using Starcraft II's editor ("Galaxy Editor") be it with a malfunctioning trigger or an issue with the complex Data Editor. If you need help on creating a trigger or system, you may also ask here!

Closed Thread
 
Thread Tools
Old 08-08-2012, 02:25 PM   #1 (permalink)
Registered User Lurppa
User
 
Join Date: Aug 2012
Posts: 4
Lurppa is an unknown quantity at this point (0)
Pick each unit owned by players --> Check terrain type

Okay, I tried to search but didn't quite find something to fit exactly my conditions.

So I used to map like hardcore on WarCraft III many years ago.. Now I decided to try mapping for SC2 and recreate an escape type map which I made for WC3.

Now, for WC3 I created pretty good trigger imho. Remember those "Escape from XXXX -city" maps? They had these paths and if you wondered off you'd die. They were typically done with loads of regions and I found it a bad way to do it.
So I created this trigger which checked every 0.1 secs or so, where the spesific unit was standing on the map. If on the wrong terraintype, it would die.

Can this be achieced in Starcraft II? I didn't find it but however I am still quite unfamiliar with this new editor. Also, the textures are a bit of mix of each other, but if I set the brush at 100% and create clear paths, you think it would work?

The trigger in principal goes somewhat like this:

Code:
Event:
Every 0,1 seconds of game time

Action:
Pick every unit (unit type).
IF:
And here comes the terrain part. However I didnt find the matching condition.
THEN:
Kill picked unit matching condition
ELSE:
Do nothing
E: And by "wrong terrain" I mean a spesific terrain type, like Bel'Shir Grass or something. So the trigger would check IF the selected unit is standing on that forbidden type of terrain.
Lurppa is offline  
Old 08-08-2012, 02:40 PM   #2 (permalink)
Registered User MileSplit
User
 
Join Date: Aug 2012
Posts: 63
MileSplit is an unknown quantity at this point (0)
Hey im made one of those!
I made it WCIII though.
Does your path change each time?
MileSplit is offline  
Old 08-08-2012, 03:50 PM   #3 (permalink)
Registered User Lurppa
User
 
Join Date: Aug 2012
Posts: 4
Lurppa is an unknown quantity at this point (0)
Well I was planning on using a couple of different "safe groundtypes", like light grass and regular grass and using only one "bad" terrain.
But I could reverse it too, making all but one terrain type bad....

Either way works. It would be better to have only one bad terrain type so I can change the path look for different parts of the map. :)

You think this trigger is possible with sc2?
Lurppa is offline  
Old 08-08-2012, 04:16 PM   #4 (permalink)
Registered User Dr Super Good
Imperial Good
 
Dr Super Good's Avatar
 
Join Date: Jan 2005
Posts: 15,278
Dr Super Good has been here far too long (2650)Dr Super Good has been here far too long (2650)Dr Super Good has been here far too long (2650)Dr Super Good has been here far too long (2650)Dr Super Good has been here far too long (2650)Dr Super Good has been here far too long (2650)
Merit Badge - Level 0: This user has proven to be extremely valuable to the Warcraft III Modding Community. User of the Year: 2010 
StarCraft II does not have terrain types. They are instead a painted blend of terrain textures.

What you could do is use the pathing map instead. Make all safe zones unbuildable and all death zones buildable. When a unit walks on a buildable terrain you then kill it. Probably can be done with the data editor alone even.
Dr Super Good is online now  
Old 08-08-2012, 05:24 PM   #5 (permalink)
Registered User Rispetto
umad?
 
Rispetto's Avatar
 
Join Date: Jul 2009
Posts: 1,118
Rispetto will become famous soon enough (109)Rispetto will become famous soon enough (109)Rispetto will become famous soon enough (109)
Quote:
Originally Posted by Dr Super Good View Post
StarCraft II does not have terrain types. They are instead a painted blend of terrain textures.

What you could do is use the pathing map instead. Make all safe zones unbuildable and all death zones buildable. When a unit walks on a buildable terrain you then kill it. Probably can be done with the data editor alone even.
Agreed.

Apply a behaviour to any unit that steps on a buildable terrain. The behaviour sets hp regen to -1000 or something

This would be the most simple way to do it.

Unlike WC3.. Sc2 (as DSG said, but in more detail here) does not use a simple terrain system.

In Wc3 you would assign a certain tile to a specific area on their grid, and that would be displayed. No two terrains could overlap.

However Sc2 terrain is more like taking two buckets of different colored paint and splashing them onto the same area.. except they dont change colour when combined.

It's just a matter of setting the alpha per terrain (thats why some can be somewhat see-through). However there must always be a solid texture underneath.

For this reason having the system monitor what texture a unit is on would be impossible as all textures can overlap one another.
Rispetto is offline  
Old 08-08-2012, 06:25 PM   #6 (permalink)
Registered User Lurppa
User
 
Join Date: Aug 2012
Posts: 4
Lurppa is an unknown quantity at this point (0)
Ah ok. :) I was assuming that it couldnt be done that way, but that pathing map seems like a reasonable idea.
Thanks!
Lurppa is offline  
Old 08-09-2012, 11:36 AM   #7 (permalink)
Registered User Illidan(Evil)X
Retired
 
Join Date: Oct 2004
Posts: 518
Illidan(Evil)X is a name known to all (746)Illidan(Evil)X is a name known to all (746)Illidan(Evil)X is a name known to all (746)Illidan(Evil)X is a name known to all (746)Illidan(Evil)X is a name known to all (746)
Speed Mapping Contest #1 - Winner: Cannon Commanders Modeling Contest #10 - Winner: Fire Elemental Modeling Contest #3 - Winner: Stormy Castle Citadel 
Actually, patch 1.5 added a condition to check for the dominating tile texture at a point, making what you had originally planned very much possible.

SomeTrig
Events
Timer - Every 0.1 seconds of Game Time
Local Variables
Conditions
Actions
Unit Group - Pick each unit in (Any units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Texture at (Position of (Picked unit))) == Agria Concrete
Then
Unit - Kill (Picked unit)
Else
__________________
Illidan(Evil)X is offline  
Old 08-09-2012, 11:43 AM   #8 (permalink)
Registered User Dr Super Good
Imperial Good
 
Dr Super Good's Avatar
 
Join Date: Jan 2005
Posts: 15,278
Dr Super Good has been here far too long (2650)Dr Super Good has been here far too long (2650)Dr Super Good has been here far too long (2650)Dr Super Good has been here far too long (2650)Dr Super Good has been here far too long (2650)Dr Super Good has been here far too long (2650)
Merit Badge - Level 0: This user has proven to be extremely valuable to the Warcraft III Modding Community. User of the Year: 2010 
Where are people finding these changes... I still have not found the core galaxy scripting changes that were made.

In any case you should iterate through a group and not all units on the map. It save the game having to perform extra filtering.
Dr Super Good is online now  
Old 08-09-2012, 12:53 PM   #9 (permalink)
Registered User Illidan(Evil)X
Retired
 
Join Date: Oct 2004
Posts: 518
Illidan(Evil)X is a name known to all (746)Illidan(Evil)X is a name known to all (746)Illidan(Evil)X is a name known to all (746)Illidan(Evil)X is a name known to all (746)Illidan(Evil)X is a name known to all (746)
Speed Mapping Contest #1 - Winner: Cannon Commanders Modeling Contest #10 - Winner: Fire Elemental Modeling Contest #3 - Winner: Stormy Castle Citadel 
By reading the sticky threads over at the battle.net custom maps forum.
New Native Functions

Quote:
Originally Posted by Dr Super Good View Post
In any case you should iterate through a group and not all units on the map. It save the game having to perform extra filtering.
Of course. What I posted was only meant as an example of the condition :)
__________________
Illidan(Evil)X is offline  
Old 08-09-2012, 04:21 PM   #10 (permalink)
Registered User Dr Super Good
Imperial Good
 
Dr Super Good's Avatar
 
Join Date: Jan 2005
Posts: 15,278
Dr Super Good has been here far too long (2650)Dr Super Good has been here far too long (2650)Dr Super Good has been here far too long (2650)Dr Super Good has been here far too long (2650)Dr Super Good has been here far too long (2650)Dr Super Good has been here far too long (2650)
Merit Badge - Level 0: This user has proven to be extremely valuable to the Warcraft III Modding Community. User of the Year: 2010 
That still does not mention the language syntax changes.
Dr Super Good is online now  
Old 08-09-2012, 05:00 PM   #11 (permalink)
Registered User Illidan(Evil)X
Retired
 
Join Date: Oct 2004
Posts: 518
Illidan(Evil)X is a name known to all (746)Illidan(Evil)X is a name known to all (746)Illidan(Evil)X is a name known to all (746)Illidan(Evil)X is a name known to all (746)Illidan(Evil)X is a name known to all (746)
Speed Mapping Contest #1 - Winner: Cannon Commanders Modeling Contest #10 - Winner: Fire Elemental Modeling Contest #3 - Winner: Stormy Castle Citadel 
http://www.sc2mapster.com/media/atta...natives.galaxy
I'm not sure if this is a complete list though.
__________________
Illidan(Evil)X is offline  
Old 08-10-2012, 10:28 AM   #12 (permalink)
Registered User Lurppa
User
 
Join Date: Aug 2012
Posts: 4
Lurppa is an unknown quantity at this point (0)
Quote:
Originally Posted by Illidan(Evil)X View Post
Actually, patch 1.5 added a condition to check for the dominating tile texture at a point, making what you had originally planned very much possible.

SomeTrig
Events
Timer - Every 0.1 seconds of Game Time
Local Variables
Conditions
Actions
Unit Group - Pick each unit in (Any units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Texture at (Position of (Picked unit))) == Agria Concrete
Then
Unit - Kill (Picked unit)
Else
Yeah this one works great! Thanks!

Shame though SC2 doesn't have a good "snap to grid" system for terrain textures but well, I just have to live with it.

Also (complitely irrelevant to the topic);
I seem to have trouble finding a way to use trigger for "all active players excluded one".
One player is CPU and I don't want to add a leaderboard and units to cpu which are supposed to be just for the players. Tried looking through variables quickly with no luck. "Active players" doesn't work either as sc2 counts cpu as one. So how I pick up all players but one / create units for all active players but one?

Errrm. Just as I was typing this I think I figured it out in my mind... Maybe. Heh. But no time to test as got to go. -->

Again, thanks everyone. :) It's been too long away from mapping... Forgot everything. ^_^
Lurppa is offline  
Old 08-10-2012, 11:49 AM   #13 (permalink)
Registered User Dr Super Good
Imperial Good
 
Dr Super Good's Avatar
 
Join Date: Jan 2005
Posts: 15,278
Dr Super Good has been here far too long (2650)Dr Super Good has been here far too long (2650)Dr Super Good has been here far too long (2650)Dr Super Good has been here far too long (2650)Dr Super Good has been here far too long (2650)Dr Super Good has been here far too long (2650)
Merit Badge - Level 0: This user has proven to be extremely valuable to the Warcraft III Modding Community. User of the Year: 2010 
You filter all active players, adding ones which pass the filter to another player group.
The filter checks if the controler is human.

You can then iterate through all players in the other player group (the one with filter results).

It can be useful to build a library of different player groups you will use regually. This saves recomputation and can allow some less used player groups to be generated using the player group set opperations.
Dr Super Good is online now  
Closed Thread

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 02:38 PM.





Powered by vBulletin
Copyright 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.1 PL2
Copyright © Ralle