[skip all navigation]

How to specify a unit type., Not a preplaced unit.

Creator: Apos
Time: Apr 25 2010, 6:59 pm

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

[Avatar]
Today is the tomorrow you worried about yesterday.
offlinecontact
Rank: Regular
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.

How to Ask Questions the Smart Way
(user posted image)
“I want to die in my sleep like my grandfather... Not screaming and yelling like the passengers in his car.” - Will Shriner
Ever wondered how to pronounce my usernames? Wonder no more!
Top

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

[Avatar]
If I were as smart as I think I am...
offlinecontact
Rank: Veteran
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.

(user posted image)
Top

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

[Avatar]
offlinecontact
Rank: Regular
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?

Top

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

[Avatar]
offlinecontact
Rank: Regular
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.

Top

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

[Avatar]
Addicted to SEN Games -Add more!-
offlinecontact
Rank: Veteran
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 -.-

Top

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

[Avatar]
Back in action!
offlinecontact
Rank: Veteran
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.

(user posted image)
Top

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

[Avatar]
offlinecontact
Rank: Regular
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.
This post was edited 1 time, last edit by Swampfox: May 15 2010, 2:57 am.

Top
0 members in this topic (italic members are currently writing a reply): None
+ guest(s)


[01:38 am]
Dem0n -- it looks like it's going to be a survival-ish type game.. maybe.. at least, that's what i got from it. We'll hear more about it at E3, no doubt.
[01:12 am]
Fire_Kame -- oops, accidental question mark
[01:12 am]
Fire_Kame -- I'm afraid of that?
[01:01 am]
Roy -- Yeah, it's a futuristic sci-fi alien-vs-human first-person shooter made by Bungie. Oh wait, that's Halo. Oh wait, it's both.
[12:53 am]
Fire_Kame -- has anyone heard anything exciting about the game Destiny?
[12:04 am]
NudeRaider -- im hungry
[12:00 am]
Wing Zero -- Best promotion ever.
Please log in to shout.