My missile is a data editor object with only a trigger to activate the launch effect. I'd like to know when my missile enters a region, so I can kill it and set some variables among other things. I figured I could try to store the missile to a variable or something by using "last united created" since part of the missile is indeed a unit of projectile type, but it doesn't seem to detect that.
Because I can't select a unit that does not exist yet to be a part of an event. The missile is dynamically created during play time by a key press and can't be selected from a values list when defining an event...
@HeroicPrinny: Go
im going to make an ass of myself and assume that for whatever reasons youre wanting to do a missile in region, there is a better way. but now that ive made an ass of myself, you can do it just as caspersc said;
event;
unit - any unit enters REGIONNAME
condition;
unit type of (triggering unit) == MISSILEUNITNAMETYPE
actions;
cue T.I. "whatever you like"
so you dont distinguish the entering unit through the event here but through the condition. i think thats what youre looking for. e out-
Thank you, wow, it's amazing how long it took me to do such a simple thing because I never would have thought to use conditions. I was always wanting to determine if my specific missile was entering a region, which the trigger editor retarded won't allow. So instead I have to make it "any unit" which is very counter-intuitive.
And yeah, I am always curious of better ways to do things, but this is the main one I thought of. I wanted to detected when a missile went off the edge of the screen, because this is when I allow my ship to fire another one. The screen edges are already bounded by regions. It's not as simple as using periods or anything like that either, because the closer you get to the screen, the faster you should be able to fire the missiles, and it works now!
Edit: Oh this is great, now knowing that I can use this Unit Type condition I can check when my missiles are dying too. I was stuck on this forever, and now it's so easy.
I know, alot of people, including myself, took awhile to get around defining the exact trigger in the event, and just using generic events, and specific conditions. I'm not sure if this was a feature in WC3's editor, but it certainly wasn't in Broodwars. The mindset takes awhile to get out of. I wouldn't consider you an ass for explaining it, as its obviously overlooked at first glance.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
My missile is a data editor object with only a trigger to activate the launch effect. I'd like to know when my missile enters a region, so I can kill it and set some variables among other things. I figured I could try to store the missile to a variable or something by using "last united created" since part of the missile is indeed a unit of projectile type, but it doesn't seem to detect that.
Why not just use unit enters region and EventUnit ?
@caspersc: Go
Because I can't select a unit that does not exist yet to be a part of an event. The missile is dynamically created during play time by a key press and can't be selected from a values list when defining an event...
@HeroicPrinny: Go im going to make an ass of myself and assume that for whatever reasons youre wanting to do a missile in region, there is a better way. but now that ive made an ass of myself, you can do it just as caspersc said;
event;
unit - any unit enters REGIONNAME
condition;
unit type of (triggering unit) == MISSILEUNITNAMETYPE
actions;
cue T.I. "whatever you like"
so you dont distinguish the entering unit through the event here but through the condition. i think thats what youre looking for. e out-
@ezbeats: Go
Thank you, wow, it's amazing how long it took me to do such a simple thing because I never would have thought to use conditions. I was always wanting to determine if my specific missile was entering a region, which the trigger editor retarded won't allow. So instead I have to make it "any unit" which is very counter-intuitive.
And yeah, I am always curious of better ways to do things, but this is the main one I thought of. I wanted to detected when a missile went off the edge of the screen, because this is when I allow my ship to fire another one. The screen edges are already bounded by regions. It's not as simple as using periods or anything like that either, because the closer you get to the screen, the faster you should be able to fire the missiles, and it works now!
Edit: Oh this is great, now knowing that I can use this Unit Type condition I can check when my missiles are dying too. I was stuck on this forever, and now it's so easy.
@ezbeats: Go
I know, alot of people, including myself, took awhile to get around defining the exact trigger in the event, and just using generic events, and specific conditions. I'm not sure if this was a feature in WC3's editor, but it certainly wasn't in Broodwars. The mindset takes awhile to get out of. I wouldn't consider you an ass for explaining it, as its obviously overlooked at first glance.