so... it seems that i have forgotten how to do this... dont know why... but anyway, when walking into an obstacle like a wall, how do i keep the characters animation from spazzing out and rapidly switching between the first frame of the walking animation and the standing animation while the character is not moving? again, im using the platform movement object. i know its something simple, i just have not done it in quite a while.
[Game design makes my brain feel like its gonna explode.]
Not sure I'm aware of a "simple" solution, though what I do is have an active object detector on either side of the player object. I disable right movement when the right detector overlaps a wall. The same thing for the left. This has worked well for me. It's not difficult, just a bit of a workaround.
Works for me lol. ill be able to easily incorporate that into my game celestia, as it already has those detectors used for wall jumping and such, guess ill just add them to this new project as well.
[Game design makes my brain feel like its gonna explode.]
Well, this is kinda cheater mode; but you can fix the animation problem by testing for a higher base speed value on your detector active. Still won't keep the active from 'bouncing' off of obstacles, but it does keep the overlayed player active from wigging out and looping between stopped and walking animations.
Always:
Change animation direction(Player_Active) to Dir(Detector_Active)
Set position(Player_Active) at 0,0 from (Detector_Active)
(Player_Active) Bring to front.
Speed of (Detector_Active) > 15
+Only one action when event loops:
(Player_Active) change animation to Walking.
Speed of (Detector_Active) <= 15:
(Player_Active) change animation to Stopped.
(Detector_Active) collides with Background:
(Detector_Active) stop.
Now, to do the same with PMO, I guess we're testing for xvelocity instead of speed.
I add two extra events that test xvelocity within both a positive and negative range to differentiate between moving left versus right.
Oh, also... this will work with the default options of PMO, but if you've changed settings, you may either need to increase or decrease the xvelocity test range (from 0-100).
Start of Frame:
(PMO) set object (Detector_Active)
Always:
Change animation direction(Player_Active) to Dir(Detector_Active)
Set position(Player_Active) at 0,0 from (Detector_Active)
(Player_Active) Bring to front.
GetXVelocity(PMO) > 100
+Only one action when event loops:
(Player_Active) Change animation sequence to walking.
(PMO) Test obstacle overlap
+(Detector_Active) Collides with the background:
(PMO) Selected object overlaps an obstacle.
Repeat while Left Arrow is pressed:
(PMO) User is holding left input key.
Repeat while Right Arrow is pressed:
(PMO) User is holding right input key.
Edited by The_Antisony
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?