Hello everyone. I have been looking around on here for a solution but haven't found one. Currently Im looking for a way to make a unit fire its weapon when the player left clicks.
It is using a WASD movement, with the camera rotated by the player overhead. I simply wish for the unit to fire its weapon in the direction in front of him. Any suggestions?
its all trigger based. the unit isn't actually ordered to attack and he typically doesn't even change animations because he will be walking and if u change to attacking he will look as if hes floating unless u create a combined animation yourself.
that said. You would do something along the lines of
event - player clicks
codition player left clicks down?
action - create unit (something that will be a bullet) for player and move it.
then you have to create another trigger for collision detection that will cause the bullet to do damage when it touches an enemy. not sure how that works in sc2 editor. search this site for top down fighter and look at the code inside this
Thanks guys! I was figuring I would have to do it that way, but was hoping there may be a different way. Appreciate it! Going to look at the arcade map now!
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello everyone. I have been looking around on here for a solution but haven't found one. Currently Im looking for a way to make a unit fire its weapon when the player left clicks.
It is using a WASD movement, with the camera rotated by the player overhead. I simply wish for the unit to fire its weapon in the direction in front of him. Any suggestions?
its all trigger based. the unit isn't actually ordered to attack and he typically doesn't even change animations because he will be walking and if u change to attacking he will look as if hes floating unless u create a combined animation yourself.
that said. You would do something along the lines of
event - player clicks
codition player left clicks down?
action - create unit (something that will be a bullet) for player and move it.
then you have to create another trigger for collision detection that will cause the bullet to do damage when it touches an enemy. not sure how that works in sc2 editor. search this site for top down fighter and look at the code inside this
you can check how they did this in the campaign arcade map.
Thanks guys! I was figuring I would have to do it that way, but was hoping there may be a different way. Appreciate it! Going to look at the arcade map now!