Actor stops jumping after moving into a block

alexandra.voica2alexandra.voica2 Member, PRO Posts: 4

Hi everyone,

I'm new here so sorry if what I'm about to ask doesn't make too much sense.

I have tried to look for this specific question but haven't been able to find exactly what I need.

My problem is that when I move my actor into one of my platforms (so that it's not jumping onto the platform, but merely touching it with its head, for example), the jump behaviour stops functioning. This only happens if I force the actor into the platform. For context, I have created a game In Air boolean attribute, which is what I am using for the jump rules.

Thanks!

Comments

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,170

    Does colliding with the platform either disable air?
    Or, another way to look at it: what do you do to disable
    double jumping and do you re-enable it when you get on the platform?

  • bob loblawbob loblaw Member, PRO Posts: 793
    edited March 2020

    i’m guessing this is for a playformer.

    it sounds like a weird issue i had before as well when my player would run over two connected platforms/floors and the controls would disable (it was like the bool for being connected when the player touched the first platform would rightly go to ‘true’, then instead of staying like that if touching the next platform would +1 and go to false).

    from memory i needed to use 2 sets of rules to check the platform collision to get it working right. absolutely racked my brain for weeks figuring it out.

    i’ll have a look later when i get home, but in the meantime, @jamie_c did a short series of videos for platform games you might find useful.

  • alexandra.voica2alexandra.voica2 Member, PRO Posts: 4

    Hi @adent42, thanks for your response. In my Jump Rule, I have my event keyboard key condition and then an attribute comparison condition using the game.InAir attribute which is set to false. Then, a change attribute behaviour which changes the InAir attribute to True, and a change attribute for self.motion.linearvelocity.

    I also have a 'Detect if on ground' rule which is that when my actor collides with either the ground or the platforms, it changes the InAir attribute to false (I guess this is more what you were asking). Hope this makes sense!

  • alexandra.voica2alexandra.voica2 Member, PRO Posts: 4

    Hi @bob loblaw, thanks for your response as well! I'd probably also need to add a rule for my platform collision rule that I describe in the previous comment, but I have tried different things and they haven't worked so far so any help is appreciated. Thanks for letting me know about jamie_c's videos!

Sign In or Register to comment.