Staredit Network > Forums > SC2 Assistance > Topic: I need help with..to find (Bring Trigger in Sc1 but in SC2)
I need help with..to find (Bring Trigger in Sc1 but in SC2)
Oct 7 2014, 7:02 pm
By: SHANE-009  

Oct 7 2014, 7:02 pm SHANE-009 Post #1



So...I am re-making my 7vs1 Random Computer! in SC2....But..I cannot understand..which trigger is just like bring trigger in Sc1 in to sc2...Map Editor hurts my head. LOL.

But if anyone can help me find it..that be nice..! :)

(I am getting back into Sc2..Now i got a desktop! Although its not gonna be call 7 vs 1 its [8 vs 1 Random Computer Good Luck!] But yea.)

Naw i am gonna re make just 7 vs 1. Just SC2 Way... -.-

New name: 7 vs 1 Random Computer!

Post has been edited 1 time(s), last time on Oct 9 2014, 4:03 am by SHANE-009.



New Username: Cool-Knight !
Please follow me on my site: www.cool-knight.eu.org/

Oct 8 2014, 12:00 am Ahli Post #2

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

Triggers in SC2 are event based meaning that code is executed after something generic happened. For example, a unit entered a location aka region.

In SCBW triggers were all periodically checked for their conditions.


"Bring" is a check for an amount of units of a specified unit type within a location owned by a specified player.

In SC2 you would do the following to execute code per unit in a location:
Code
Unit Group - For each unit UNIT_VARIABLE in (UNIT_TYPE units in LOCATION owned by player OWNER matching Excluded: Missile, Dead, Hidden, with at most Any Amount) do (Actions)
- a list of actions that are executed for each unit that is found and temporarily stored within UNIT_VARIABLE for you to use it


For example, this code heals all Marines owned by player 1 in region1.
Code
       Unit Group - For each unit unitVar in (Marine units in region1 owned by player 1 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) do (Actions)
               Unit - Set unitVar Life (Percent) to 100.0



Bring would be a comparison of an amount of units inside a unit group. The unit group would contain all units in a region matching owner, unit type and filter as used in the code examples:
(UNIT_TYPE units in LOCATION owned by player OWNER matching Excluded: Missile, Dead, Hidden, with at most Any Amount)

I hope that helped a bit.

Anyway, what do you attempt to do?




Oct 8 2014, 12:36 am SHANE-009 Post #3



Thank, you so much! :D

"Anyway, what do you attempt to do?"

Well..re-make what I can like having tons of locations...lol..hopefully...I can just release a..version of this map..some time soon..hope get this map..just like i have in Sc1 :D

Yea..when I can..I'll try to show you. :)



New Username: Cool-Knight !
Please follow me on my site: www.cool-knight.eu.org/

Oct 9 2014, 3:33 am SHANE-009 Post #4



Sorry..I take that back....Ummmm does it look like this?


Ai(Trigger name)

Events
Local Variables
Conditions
Actions
Unit Group - For each unit Unit in (Command Center units in (Region named "P9") owned by player 9 matching Excluded: Missile, Dead, Hidden, with at most 1) do (Actions)
Actions
Unit - Create 2 Ghost for player 9 at Point 003 facing Point 003 (Under Construction)



New Username: Cool-Knight !
Please follow me on my site: www.cool-knight.eu.org/

Oct 9 2014, 7:01 am Ahli Post #5

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

That would work, yes.

Is the point directly at the CC? If yes, you could just create the ghosts next to the CC without checking regions.

Creating ghosts "under construction" won't have any effect, I believe.

Also, your trigger has no event. If you just want to have code that you re-use a couple of times, you can put it into an action definition.

Action definitions are like self-made trigger actions. You can even add parameters to them which act like variables inside the action definition. For example, you could specify the amount of ghosts that are spawned with a parameter of the type integer.




Oct 9 2014, 12:02 pm Roy Post #6

An artist's depiction of an Extended Unit Death

Or if you just want it to run once when the map starts, use the "Game - Map Initialization" event.

If you want something to run repeatedly (like a preserved trigger in SC1), use the "Timer - Periodic Event" event.




Oct 9 2014, 6:29 pm SHANE-009 Post #7



Okay..ummmm I change the trigger's like this (Name of the trigger) [If AI Terran]
  • If AI Terran
    Events
    Game - Map initialization
    Local Variables
    Conditions
    Actions
    Unit Group - For each unit Unit in (Command Center units in (Region named "P9 Main") owned by player 9 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) do (Actions)
    Actions
    Unit - Create 10 SCV for player 9 at Point facing (Random point in Region 001) (Ignore Placement)

But nothing is happening.. :(

Post has been edited 1 time(s), last time on Oct 9 2014, 6:45 pm by SHANE-009.



New Username: Cool-Knight !
Please follow me on my site: www.cool-knight.eu.org/

Oct 9 2014, 9:05 pm Ahli Post #8

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

You have no event. An event is a generic situation that needs to occur for the trigger to be started.

For example, "'Any Unit' enters 'Region 1'" would start, if a unit enters "Region 1".




Oct 9 2014, 9:24 pm Roy Post #9

An artist's depiction of an Extended Unit Death

Quote from Ahli
You have no event.
Looks like he used the Map Initialization event in his most recent example.

Quote from SHANE-009
Unit - Create 10 SCV for player 9 at Point facing (Random point in Region 001) (Ignore Placement)
Did you actually specify a point for the unit to be placed at? This trigger would be automatically disabled if you leave a required field unspecified (you'll see in the trigger list it will have a little mark indicating it's disabled).

Other than that, the only reason it wouldn't do anything is if the unit group is empty.




Oct 9 2014, 11:33 pm SHANE-009 Post #10



Okay, I fixed...it!
It goes like this... ;)
  • If AI Zerg
    Events
    Game - Map initialization
    Local Variables
    Conditions
    (Count of Hatchery units in (Region((Start Location 008 reflected at Start Location 008 with normal facing 270.0), 1.0)) owned by player 8 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) == 1
    Actions
    Unit - Create 10 Drone for player 8 at P9 Workers Spawns using point facing (Under Construction, Ignore Placement)


Post has been edited 1 time(s), last time on Oct 10 2014, 6:03 pm by SHANE-009.



New Username: Cool-Knight !
Please follow me on my site: www.cool-knight.eu.org/

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2024-12-04. : 12:56 am]
da real donwano -- ClansAreForGays
ClansAreForGays shouted: http://www.staredit.net/topic/18772/
Is money an object?
[2024-12-02. : 11:44 pm]
Excalibur -- Done. Let me know what else you need.
[2024-12-02. : 4:55 pm]
NudeRaider -- * 4/7 or 6/9
[2024-12-02. : 4:53 pm]
dumbducky -- 3/7 of the front-page announcements are Happy Thanksgiving
[2024-12-01. : 4:03 pm]
Ultraviolet -- :lol:
[2024-12-01. : 7:18 am]
l)ark_ssj9kevin -- don't worry I had no creepy intentions. only labor exploitative intentions. I'm gonna scout the next big content creators from there
[2024-12-01. : 3:23 am]
Ultraviolet -- l)ark_ssj9kevin
l)ark_ssj9kevin shouted: Holy shit. This is like a goldmine of children-made content o_o
this sounds dirty and dark
[2024-11-30. : 5:35 pm]
RIVE -- l)ark_ssj9kevin
l)ark_ssj9kevin shouted: Holy shit. This is like a goldmine of children-made content o_o
Yes
[2024-11-30. : 12:38 pm]
Oh_Man -- that's legit
Please log in to shout.


Members Online: NudeRaider, Roy