Interpolate behavior can't destroy?

WeiyuWeiyu Member Posts: 216
edited March 2018 in Working with GS (Mac)

Hello everyone!
I have a problem about interpolate again.

Stair was going to destroy when Player collision stair.
But I have no idea why it can't trigger.

Please help me how to slove this problem.
Thank you. :'(

------------------This is my behaviors------------------

Player behaviors:
When collision "Stair"
Change "game.collision" to "1"

Stair behaviors:

When "self.size.width" = "200"
Interpolate "self.size.width" to "250" for "0.5" seconds
Else:
When "self.size.width" = "250"
Interpolate "self.size.width" to "200" for "0.5" seconds

When attribute "game.collision" = "1"
Destroy

Comments

  • Twayne2Twayne2 Member Posts: 458
    edited March 2018

    Hm, I seem to remember something like that happening on a game I a working on, and then fixing it or something. 2 things to maybe try:
    1. Maybe add a really short timer to the destroy rule.
    2. Maybe move the destroy rule before all of the others. This sounds like it might do the trick. :smile:

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    The Interpolate Behavior works outside of the normal physics engine and because of that collisions don't register correctly.

  • WeiyuWeiyu Member Posts: 216

    @Twayne2
    Thank you for your advice.
    I have already solved this problem. :D

    @jamie_c
    I understand, thank you for your reply. :)

Sign In or Register to comment.