Change size for one animation?
simon31184
Member Posts: 14
Hi guys, I'm working on a platform game and I'm stucked into a problem,my animation of character with sword attack is larger than the others sprites like run, fall and jump. I don't want to change my actor size just for one animation because it will incide on collisione with ground and others. There is a trick to make this animation without resize my actor permanently? I tried with
When x key is pressed:
game.playerAttacks is true
Otherwise game.playerAttacks is false
When game.playerAttacks is true
change attribute self.size to 130
animate (loop and restore)
Otherwhise
chance attribuite self.size to 90
Somebody can help me?
Bests
Christian milano
Comments
You could spawn a larger actor that is constrained to the main actor - and this larger actor has the larger image and no collision behaviours.
what I would do is create an actor that does all of the collisions and movements etc. and set its opacity to 0. then I would create an actor that handles the animations and I would constrain its x and y positions to the collision actor.
Thanks for rhe response, that was my solution too, I tought that exists a solution more user friendly. I also think to spawn the plus piece of the actor for the animation on the left/right of my player when I need it and make the other parte of the animation inside of that.