SC2Mapster Forums

Development > Data

[solved] how to shoot in the facing direction of unit (no target?)

  • 11 posts
    #1 Nov 08, 2012 at 12:36 UTC - 0 likes

    I found nearly all skills in sc2 are based on a target. is it possible to create a weapon or ability that fires for a set range (for example: a beamgun, a shotgun with max range, a rocketlauncher that explodes at a max distance) at the angle of the unit without having a target? Or do you need to "fake" a target that is always in front of the unit and the unit fires to that location?

    Any tips on how to get something like this to work? is it possible to do with within the data editor or are triggers needed?

    #2 Nov 08, 2012 at 12:43 UTC - 0 likes

    @NGKrush: Go

    Something like this is what I think you want. You would just have to change it from a fireball to a rocket or whatever.

    http://www.youtube.com/watch?v=c3UVVG9C80o

    #3 Nov 08, 2012 at 21:39 UTC - 0 likes

    Use an Effect - Target effect that uses a Create Persistent to shoot at an offset that uses a Launch Missile effect. A Throw missile mover might also be good.

    #4 Nov 09, 2012 at 11:12 UTC - 0 likes

    @ shawn: perfect it really looks like what i'm looking for, tnx. @drsuperevil: tnx too, just getting the hang of the data side of the editor, i'll look into these effects too.

    Just keeping the thread open(not solved) so I can ask follow-up questions without opening a new thread.

    #5 Nov 09, 2012 at 13:41 UTC - 0 likes

    This might be helpful: http://www.sc2mapster.com/forums/resources/tutorials/17154-data-colliding-projectiles/

    Projects: Starmon - RuneCraft
    http://i.imgur.com/1jpXAne.png

    #6 Nov 09, 2012 at 21:50 UTC - 0 likes

    The diablo fireball tutorial was a great help in getting the missile to check and explode on impact, but it is still working with a target that is set by the mouse. Thanks for the link too TheAlmaity, it simplifies the process onetwoSC does in his video.

    But half of my question stays unanswered:

    I'm looking for a way that the fireball wil always come out at the angle of the players frontside. Much like the fireball mario shoots in mariobros. If you press the ability button, the missile will shoot. Without targetting anything with the mouse. Do I need to simulate this by making a target that is always in front of the player (through triggers) or is it possible to link to this angle in the data editor?

    I thought it would be possible as "Ability - Arc" uses the front of the unit to calculate where the cone is.

    Thanks for all the help already, it's really helped a lot!

    Last edited Nov 09, 2012 by NGKrush
    #7 Nov 09, 2012 at 22:12 UTC - 0 likes

    @NGKrush: Go

    This has already been answered before by DrSuperEvil, but I'll restate the solution for you. You need to use a create persistent with a negative Y periodic offset to choose your fireball target. I use something like -10 or -11, but you might need it to go further or shorter.

    The fact you want it to just happen instead of picking a target also says you need to be using an ability effect: instant. Don't change your Ability Effect: Targeted ability around, just make a new ability of type instant, very often certain fields are screwed up when you change between the two like that.

    Hope this helps.

    Horologium Super Cluster RPG

    #8 Nov 09, 2012 at 22:30 UTC - 0 likes

    Else just use a Throw driven mover that is launched -y relative to the unit.

    #9 Nov 11, 2012 at 21:58 UTC - 0 likes

    edited this question late, lost original q. sry

    Last edited Nov 11, 2012 by NGKrush
    #10 Nov 11, 2012 at 22:08 UTC - 0 likes

    You can use a Create Persistent since their offsets are local relative to the unit. The -y axis is straight infront of the unit.

    Missile movers can be added in two places. The mover of the ammo unit under the Units data type or the Launch Missile itself eg. the tentacle launch missile effects.

    Last edited Nov 11, 2012 by DrSuperEvil
    #11 Nov 12, 2012 at 14:16 UTC - 0 likes

    Solved the problem, there was a problem with the search filters in various effects. In the end I used Kueken's tutorial as the base with some minor alteractions.

    Thanks for helping guys, great community!

  • 11 posts

You must login to post a comment. Don't have an account? Register to get one!