Modifed platform plugin causing custom animation buggyness

Forum for plugin, effect and behavior programmers. Please use the Help & Support forum for help using Construct.

Post » Thu Dec 03, 2015 11:24 pm

So far using the built in platform plugin I found it to be very usful, that was until I started to add ladders, I was able to get the correct animations working for the player but, the jump bugged out using the built in tags this worked fine but broke the ladders, so I took a look into the platform code to suppress playing of the ladder animation, so far it was as simple as going to ExtObject::OnFrame and to line 1250 adding the following in place of the single call(also added a set and unset flag what simply does a bitwise operation to enable and disable the altered behavior) :
Code: Select all
if (ExtendedFlags & MT_ExtraFlags::EX_FLAG_ONLADDER) { }
else { SetAnimation(jumping); }


for the sake of all this all MT_ExtraFlags::EX_FLAG_ONLADDER means is 0x01

But now I get a weird bug what did not occur where if i drop down off a platform or jump onto a ladder instead of climbing from the floor when i climb up the animation frames will not increment I also get the same effect doing this check from within the is jumping condition.

Edit: Manged to fix the bug, it was not related to the plugin but rather the event sheet(On dropping from a platform and midair attach I forgot to set the plugins ladder flag but had set the OnLadder private var I was using).
Last edited by mathew653 on Tue Dec 08, 2015 9:12 pm, edited 1 time in total.
B
4
S
1
Posts: 15
Reputation: 384

Post » Fri Dec 04, 2015 8:49 am

@mathew653
mathew653 wrote:So far using the built in platform plugin I found it to be very usful, that was until I started to add ladders, I was able to get the correct animations working for the player but, the jump bugged out using the built in tags this worked fine but broke the ladders, so I took a look into the platform code to suppress playing of the ladder animation, so far it was as simple as going to ExtObject::OnFrame and to line 1250 adding the following in place of the single call(also added a set and unset flag what simply does a bitwise operation to enable and disable the altered behavior) :
Code: Select all
if (ExtendedFlags & MT_ExtraFlags::EX_FLAG_ONLADDER) { }
else { SetAnimation(jumping); }


for the sake of all this all MT_ExtraFlags::EX_FLAG_ONLADDER means is 0x01

But now I get a weird bug what did not occur where if i drop down off a platform or jump onto a ladder instead of climbing from the floor when i climb up the animation frames will not increment I also get the same effect doing this check from within the is jumping condition.


This is posted in the - now retired - Construct Classic section.

Is this what you intended?
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
84
Posts: 5,379
Reputation: 58,440

Post » Fri Dec 04, 2015 7:45 pm

zenox98 wrote:This is posted in the - now retired - Construct Classic section.

Is this what you intended?


Yea, the plugin work is related to construct classic's engine.
B
4
S
1
Posts: 15
Reputation: 384


Return to Construct engineering

Who is online

Users browsing this forum: No registered users and 1 guest