How Do I Create A Basic Attack?
FallingBoxStudios
Freelance Graphic DesignerMember Posts: 822
Hi,
What I'm trying to create is a basic attack, but I don't want to create an animation of my character swinging a sword (or something like that…), I'll try to explain better, basically my character is just a box, it has no face or anything, its just a coloured box, and I would like to make him have a power attack, I have created an animation of the weapon swinging, basically what I'm trying to say is I want to have the weapon actor hidden behind my character, so the weapon actor will follow my character, and when a button is pressed, the attack animation plays, I'm pretty bad at explaining things… I hope it was clear enough, thanks.
What I'm trying to create is a basic attack, but I don't want to create an animation of my character swinging a sword (or something like that…), I'll try to explain better, basically my character is just a box, it has no face or anything, its just a coloured box, and I would like to make him have a power attack, I have created an animation of the weapon swinging, basically what I'm trying to say is I want to have the weapon actor hidden behind my character, so the weapon actor will follow my character, and when a button is pressed, the attack animation plays, I'm pretty bad at explaining things… I hope it was clear enough, thanks.
Comments
Or just spawn the weapon actor in front of your character, run any animation, check for collisions and then destroy it.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
@KevinCross Has been a big help
and constrain attribute game.playery to self.position.y
go into the weapon and
constrain attribute self.position.x to game.playerx
and contrain attribute self, position.y to game.playery
now the weapon stays in the middle of the player.
if you want it to be a little to the right then
constrain attribute self.position.x to game.playerx+10 (or something)
✮ FREE templates at GSinvention ✮
✮ Available for hire! support@gsinvention.com ✮