I am curious about how to make a projectile disappear after reaching a certain point or after a certain amount of time has elapsed... I have a missile set to a very short-duration mover. If it does not impact anything and the mover expires, it suddenly shoots off very fast off the edge of the map. I'd rather that it simply vanish instead.
I have no experience with projectiles or with the ide I have but I can make a guess.
create a new effect of the type 'damage'.
In the effect tab of that effect enable the 'kill' flag and in the target tab => impact location - value choose 'origin unit'.
Then create a new behavior of the type 'buff'.
In that behavior go the the effect tab and for Effect - final choose your effect you just created.
In the stats tab change the duration to how long you want the projectile to live.
and as last thing go to the projectile unit go to the behavior tab and for behavior - behavior add th behaviour you just made
If my guessing is right, once the projectile comes into game, it gets your ticking timebomb buff and after the chosen duration it will kill itself.
You can specify a timeout for the missile's mover. By default it's 30 seconds if I remember correctly. If the missile has not hit anything before this time, it will be removed.
Good idea, but I actually tried this already... and as soon as the timer expires, the missile suddenly shoots off the screen strangely... then again, the reason why it shoots off the screen could be because I have the guidance phase set to some obscure target. I'll have to look into it... Thanks!
Edit:
One more thing (somewhat off topic): how do you set an offset for a missile launch. Say I want the missile to appear at a distance of 2 away from the caster. Any ideas? I tried using a Target - Launch Offset of -2 x to make it off to the left, but nothing happened... :(
Use a Create Persistent effect. One period at 0 second, set the offsets to your liking, and launch the missile at that period. Control the orientation of the offsets with Location Offset Start/End. The line you can draw between them is the orientation of the offsets.
If you meant an offset for the actor, disregard the above. You'll have to use Site Operation actors for that.
If it is purely a visual problem just give the missile actor a timer event that when it expires it sets the missile opacity to 0 like the automated refinery does for it's text kicker but have a shorter blend in duration.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
Hi,
I am curious about how to make a projectile disappear after reaching a certain point or after a certain amount of time has elapsed... I have a missile set to a very short-duration mover. If it does not impact anything and the mover expires, it suddenly shoots off very fast off the edge of the map. I'd rather that it simply vanish instead.
Suggestions are welcome!
You can specify a timeout for the missile's mover. By default it's 30 seconds if I remember correctly. If the missile has not hit anything before this time, it will be removed.
@LanceDH: Go
Great, thanks! By the way, would the kill flag make it kill an invulnerable missile?
@Builder_Bob: Go
Good idea, but I actually tried this already... and as soon as the timer expires, the missile suddenly shoots off the screen strangely... then again, the reason why it shoots off the screen could be because I have the guidance phase set to some obscure target. I'll have to look into it... Thanks!
Edit:
One more thing (somewhat off topic): how do you set an offset for a missile launch. Say I want the missile to appear at a distance of 2 away from the caster. Any ideas? I tried using a Target - Launch Offset of -2 x to make it off to the left, but nothing happened... :(
You should definitivly look at the missile of Ravens. They do time-out (with specific animation) when nothing is reached for X seconds.
@Circulation: Go
Sounds more like a problem with the actor than the mover in that case.
Alright, it seems to work fine now - thanks for the input.
@Builder_Bob: Go
It turns out that setting the expire timer on the movers did the trick.
If anyone knows how, I'd appreciate it if you tell me how to set a launch offset for the missile.
@Circulation: Go
Use a Create Persistent effect. One period at 0 second, set the offsets to your liking, and launch the missile at that period. Control the orientation of the offsets with Location Offset Start/End. The line you can draw between them is the orientation of the offsets.
If you meant an offset for the actor, disregard the above. You'll have to use Site Operation actors for that.
If it is purely a visual problem just give the missile actor a timer event that when it expires it sets the missile opacity to 0 like the automated refinery does for it's text kicker but have a shorter blend in duration.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg