Celestient Posted March 27, 2015 Report Share Posted March 27, 2015 I'm in a bit of a conundrum and I'm not sure whether its a problem I should solve in Construct 2, Spriter, or is a result of my own incompetence. I have a few animations i'm trying to put in a game that have the character move around a lot. the thing is it always begins relative to the position of the player controlled object. For example if an animation moves the player like this: (X = original position, O = final position) X-------------------------------Oand the next animation has the player move like this: O--------X I want it to move like this X-------------------------------O O----------XInstead it moves like this X-------------------------------O O--------XDoes anyone here know how to solve this problem or will i have to adjust all the animations like this manually? Asuqytrau and Dryynrins 2 Quote Link to comment Share on other sites More sharing options...
Mike at BrashMonkey Posted March 27, 2015 Report Share Posted March 27, 2015 In general, animation should not move the player Sprite, actual x or y movement should be in code. Are you using an invisible rectangular sprite(regular C2 sprite, not Spriter object) and pinning the Spriter object to the rectangular sprite? This is the best way to do things. Cheers,Mike at BrashMonkey Quote Link to comment Share on other sites More sharing options...
Celestient Posted March 27, 2015 Author Report Share Posted March 27, 2015 I do have the rectangular C2 sprite with the spriter object pinned to it. I just want the spriter object to be oriented at the end position so the new animation can start from there and not from the starting position. Quote Link to comment Share on other sites More sharing options...
Mike at BrashMonkey Posted March 27, 2015 Report Share Posted March 27, 2015 I'd have to see your capx to know for sure, and your Spriter project... but if your character animations are moving in the animations themselves this is going to be incredibly diffucult to fix... 1) The Spriter animation is becoming far away from the sprite its supposed to be pinned to. 2) The end of one Spriter animation does not ligh up with the beginning of the next. Do you understand my point about not moving the character in the spriter animations? Did you look at the Essentials Platformer pack and see that for Walking, Jumping, Falling, Attacking etc, the characters actual coordinates never change, he just animates as though moving... The actual changeing of position like moving up i nthe air, falling downward, and traveling left or right should be done in events in C2, not in Spriter. Does this make sense? Thanks,Mike at BrashMonkey Quote Link to comment Share on other sites More sharing options...
Celestient Posted March 27, 2015 Author Report Share Posted March 27, 2015 All of my basic animations work like those you've mentioned. However, these specific animations are much more elaborate, which is why i tried to make them in spriter and translate them into construct 2.An example of what I mean: If it is the case that I have to go back and animate/edit these individual animations separately (for example in the case of the above animation, separating the sword from the rest of the animation in order to control its movement separate from the main body) then I will do so. I was just not sure which part I was getting incorrect. Quote Link to comment Share on other sites More sharing options...
Celestient Posted March 27, 2015 Author Report Share Posted March 27, 2015 Oh, never mind, i seem to have found a solution to the problem. Shifting the position of the main sprite at the end of every animation to the body hitbox works. Quote Link to comment Share on other sites More sharing options...
Mike at BrashMonkey Posted March 28, 2015 Report Share Posted March 28, 2015 Excellent job Celestient. Thats exactly what I was going to suggest... but a note to anyone else reading this thread...whenever possible its better the movements are done within the game engine and not "built into the animations", howver, in complicated cases like this, Celestient came to the propper solution. :) cheers,Mike at BrashMonkey Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.