Make missile detonate upon impact of a wall

Discussion in 'Starcraft 2 (SC2) Editor Help' started by Ancanus, May 4, 2010.

  1. Ancanus

    Ancanus [ancanus@TheHelper.net]# _

    Ratings:
    +54 / 0 / -0
    Getting tricky now.

    I currently have a marauder with it's default weapon using ballistic as a motion phase driver. This causes the missile the marauder fires, to fly in a straight line towards the target. However, if the target moves and the missile misses, if it reaches a wall it just clips through it.

    I was hoping if there was a way to kill a missile upon detection of cliff level change?

    Update:
    Also, would it be possible to have the missile detonate upon detection of any unit?

    I've added a test map to the attachments in case anyone is willing to give it a try.
     

    Attached Files:

  2. Sensang

    Sensang TH.net Regular

    Ratings:
    +7 / 0 / -0
    um thats maybe offtopic but could you somehow tell how you managed to get that kind of attack? (non homing missiles)

    Other than that I'd also like to have an answer to that question :thup:
     
  3. Ancanus

    Ancanus [ancanus@TheHelper.net]# _

    Ratings:
    +54 / 0 / -0
    Sure!

    Unit (Marauder) -> Effect (MarauderLM) -> Movers -> Marauder Weapon

    Change Motion Phase+ field:

    Driver: Ballistic
    Acceleration: -1
    Minimum Speed: 10
    Maximum Speed: 10

    I also checked the Ignore Terrain box.
     
  4. Sensang

    Sensang TH.net Regular

    Ratings:
    +7 / 0 / -0
    Ah thx. It appears like ballistic and minimum speed is enough to get that effect. Dearly it doesn't aim ahead like i thought it might... maybe that can be done somehow else^^

    have you tried editing the missile unit yet? maybe there is something at collision or you could even set path blockers to stop it. or some kind of autocast ability that makes it explode when something is in range... that would be cool. Like this you could enable teamattack :D

    Has anyone yet played around with the unit settings of missiles? for example giving them autocasts?
     
    • Like Like x 1
  5. Ancanus

    Ancanus [ancanus@TheHelper.net]# _

    Ratings:
    +54 / 0 / -0
    What aim ahead effect were you looking for?

    I'm looking in to the missile unit right now. I'm sure the way to do it is in Missile Unit -> Actor -> Events. For the event, it is UnitMovementUpdate. However, I have no idea which Term I should use to check if a cliff was encountered.
     
  6. Sensang

    Sensang TH.net Regular

    Ratings:
    +7 / 0 / -0
    which event? its not the first event is it? since it has the "birth" of the missile.
     
  7. kioSk

    kioSk New Member

    Ratings:
    +1 / 0 / -0
    Maybe you should NOT check "ignore terrain"?!
     
  8. Ancanus

    Ancanus [ancanus@TheHelper.net]# _

    Ratings:
    +54 / 0 / -0
    kioSk, that makes the missile lift-off and fly away when it approaches a wall.

    It's going to be something less trivial. (;
     
  9. Weep

    Weep Godspeed to the sound of the pounding

    Ratings:
    +400 / 0 / -0
    I am going to pull this idea out of my ...behind... because I don't actually have the beta, but:

    I've read people talking about "Validators" as some way to limit an action with a condition. Collision with the terrain would be the condition that the missile's height above the terrain is less than or equal to 0 - maybe there's some way to check that periodically, without triggers, or maybe some data element that fires when that becomes true?

    Feel free to completely ignore me if it's nonsense. :D
     
    • Like Like x 1
  10. Ancanus

    Ancanus [ancanus@TheHelper.net]# _

    Ratings:
    +54 / 0 / -0
    Actually Weep, that makes a lot of sense. I'm actually using the cliff validators to make sure some units unable to blink out of an arena. I can't make out cross or squares of how to apply the validators to a periodic check though.

    Also, I've added a test map to this thread's attachments to entice you guys to try and solve this. :3
     
  11. Sensang

    Sensang TH.net Regular

    Ratings:
    +7 / 0 / -0
    maybe some kind of periodic ability that explodes the missile when it changes height? or something like that.
     
  12. Advice D.

    Advice D. New Member

    Ratings:
    +11 / 0 / -0
    Got it. You use a Buff attached to the missile that has a Remove Validator and an Expire/Final Effect set to the detonation effect.
    Map attached.
    Perhaps a Buff attached to the missile that has a Remove Validator related to changing cliff level (I can't find one, haven't played around with validators much yet), with an Expire/Final Effect set to the Marauder Set? I'm trying this at the moment in the test map, but I'm stuck on the Validator part.
     

    Attached Files:

    • Like Like x 1
  13. Ancanus

    Ancanus [ancanus@TheHelper.net]# _

    Ratings:
    +54 / 0 / -0
    :O

    You did it, Advice!

    Is the detonation effect working for you? On my side, it seems the missiles are removed when they impact a cliff, no explosion. Weird... I can tell the buff is going off since the missile is disappearing.
    Is it because the MarauderLM is expecting a unit to display the Damage effect?
     
  14. Advice D.

    Advice D. New Member

    Ratings:
    +11 / 0 / -0
    I thought it wasn't appearing because of the uberlow settings on my laptop. I'll have another go at it, I have a hunch that there might be a behaviour remove/expire event in Actor events.
     
  15. Cookiemaster

    Cookiemaster New Member

    Ratings:
    +36 / 0 / -0
    Take a good look at what the "Explode" behavior does.

    It has "Effect - Final" Concussive Grenade (set), and it has "Expire Effect" Concussive Grenade (set).

    Combined with the validator (remove) which is basically a condition wether or not the missile is above the ground. If it returns false, Validator(remove) goes off and the given behavior GETS REMOVED.


    If the given effect(s) trigger upon removal (which seems what is happening, seeing how the missiles disappear. Assuming that's what the set->(slow+dmg) effect does...), then I suggest changing it to something more like, an effect that kills the unit (missile)!
     
  16. Ancanus

    Ancanus [ancanus@TheHelper.net]# _

    Ratings:
    +54 / 0 / -0
    Indeed, when the behaviour gets removed, the Effect - Final is executed (that's what I get from its tooltip.)

    However, it seems that Concussive Grenade (Damage) only happens if it has a target unit. Since this is the effect that also produces the explosion effect, it accounts to no unit = no effect.

    Right now, all we need to do is to find how to make Concussive Grenade (Damage) produce the explosion even if no unit is present.
     
  17. Advice D.

    Advice D. New Member

    Ratings:
    +11 / 0 / -0
    Target Unit to Target Unit/Point? I don't have my editor handy. And yeah, I might have to recheck my code if for some reason the missile isn't being removed (also devise a method of detecting it since it would be invisible).
     
  18. Ancanus

    Ancanus [ancanus@TheHelper.net]# _

    Ratings:
    +54 / 0 / -0
    Upon changing to Target Unit/Point, the missile explodes in the location where the enemy was, instead of flying straight ahead.

    The missile is being removed. However, it's supposed to die or create the detonation model instead. :/
     
  19. overload119

    overload119 New Member

    Ratings:
    +5 / 0 / -0
    I'm currently working on a similar map.

    So far, I have Stalkers that shoot missiles that can be dodged. I added a periodic Search Area behaviour to the Weapon - Stalker unit (the projectile) then for the effect of the Search Area (which periodically searches for neabry enemies, then runs a Set effect when found) The Set effect deals damage to the unit it hits, and it also deals like 10000 damage to the projectile, so that it effectively suicides.

    The problem I have right now is with showing a death animation when the unit dies. I tried connecting an actor UnitDeath - Create the impact model, but that hasn't worked.
     
  20. Sensang

    Sensang TH.net Regular

    Ratings:
    +7 / 0 / -0
    could you please link that map or at least the needed data in a blank map... btw. is it possible to have something like team attack by doing that kind of thing??
    Ive tried doing something like that with the explode ability from banelings^^

    btw. is there a possibility to make a missile explode after a certain amount of range? Ive given the missile a -life regeneration aura but it doesnt seem to work at all ... (-2 regeneration at 6 life and it will still fly to the end of the map)
     

Share This Page