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.
[01:20 am]
RIVE -- :wob:
[12:14 am]
Ultraviolet -- :wob:
[2024-2-20. : 8:35 am]
NudeRaider -- jjf28
jjf28 shouted: :laughing:
:lol: = :lol:
[2024-2-20. : 5:43 am]
Vrael -- lil-Inferno
lil-Inferno shouted: an idiot who is banging ur mum
u wot m8?
[2024-2-20. : 3:43 am]
ClansAreForGays -- I don't get it, so it just decreases? Like if I have it set to 1, it'll be zero during build. But If I have it set to 100... it's be like 50?
[2024-2-20. : 1:49 am]
kgh829 -- The weird thing is that the building defense value wasn't set to Zero. If the building's defense is abnormally high, the building under construction becomes almost invincible, just like a completed building.
[2024-2-20. : 1:44 am]
kgh829 -- I just tested out of curiosity, and it turns out that the defense of Zerg buildings also decreases.
[2024-2-19. : 11:27 pm]
ClansAreForGays -- do zerg buildings have 0 armor while morning? like how terran building do while being built?
[2024-2-19. : 10:16 pm]
ClansAreForGays -- It even told me I should probably use scmdraft2 instead, becuase I mentioned staredit in the prompt.
[2024-2-19. : 9:59 pm]
Dem0n -- I wonder if it's scraped SEN lmao
Please log in to shout.


Members Online: 3alicee931xxdha6, Roy, 1camilae76100xxdhN9