Staredit Network > Forums > SC2 Assistance > Topic: How to specify a unit type.
How to specify a unit type.
Apr 25 2010, 6:59 pm
By: Apos  

Apr 25 2010, 6:59 pm Apos Post #1

I order you to forgive yourself!

I'm trying to make a trigger kill a unit if that unit enters a location. The problem is that I can't find out how to choose a unit type and not a preplaced unit.

In Starcraft 1 it would look like: If current player brings at least 1 Terran marine to location kill -> kill all Terran marine for current player at location kill.




Apr 25 2010, 7:08 pm Centreri Post #2

Relatively ancient and inactive

Event: Any unit enters region x
Condition: Comparison of unit-type of triggering unit and Terran Marine
Event: For each unit in (Unit Group: Units in Region Matching Condition(Comparison of unit-type of triggering unit and Terran Marine)), kill it.

Basically, this. You might need to create a local variable for the killing-portion, but I really don't want to write the entire trigger for you.



None.

Apr 26 2010, 12:29 am Swampfox Post #3



So you're saying that if we ever want a trigger to act upon a certain unit, we can never just specify that type of unit, we have to make a comparison?



None.

Apr 26 2010, 12:33 am Morphling Post #4



You can specify the unit, but by comparing it. You compare the unit that enters the region to, in this case, a marine. If the unit if a marine the actions will fire.



None.

Apr 26 2010, 4:01 am payne Post #5

:payne:

Quote from Morphling
You can specify the unit, but by comparing it. You compare the unit that enters the region to, in this case, a marine. If the unit if a marine the actions will fire.
Gosh, how I hate GE's logic -.-



None.

Apr 26 2010, 8:27 am Devourer Post #6

Hello

Quote from payne
Quote from Morphling
You can specify the unit, but by comparing it. You compare the unit that enters the region to, in this case, a marine. If the unit if a marine the actions will fire.
Gosh, how I hate GE's logic -.-
It actually seems completly logical to me :)
Where's the problem? At some parts it's rather overcomplicated such as "brings 1 unit to location" is event "unit enters location" and condition "triggering unit == unitname". After some days (for me three days now) you'll understand it.



Please report errors in the Staredit.Network forum.

May 15 2010, 2:45 am Swampfox Post #7



Ok, maybe I never fully grasped the concept, but for the life of me, I can't fucking figure out how to conditionalize:
"If any one of my pre-placed tree units is selected, and if it's in a certain region."

If someone would post a picture of a trigger showing this, I would be MOST grateful.


This is really annoying. I was so frustrated with this for at least a whole hour prior to making this post and on various other occasions, and then 5 minutes after posting, I figure it out. There seems to be a trend here... coincidence? I think not!

I suppose you can lock this topic.

Post has been edited 1 time(s), last time on May 15 2010, 2:57 am by Swampfox.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[2024-4-27. : 3:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[2024-4-26. : 6:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[2024-4-26. : 6:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[2024-4-26. : 6:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
Please log in to shout.


Members Online: Roy, Dem0n