How do I make monkey jumping effect?

  • Hi,

    I'm developing a game, inwhich monkeys have to jump from on tree to another.

    I have tired with platformer behaviour but it's not so effective. Monkeys are not landing on any branches.

    Can anyone help me in adding this effect?

    Thanks in advance.

  • Platform behavior should work perfectly. Add JumpThru behavior to branches. See template "Infinite jumping" in C3, it's pretty similar.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Platform behavior should work perfectly. Add JumpThru behavior to branches. See template "Infinite jumping" in C3, it's pretty similar.

    Thanks for the tip. "Infinite jumping" is a bit different from want to need.

    In my game, monkeys will be jumping from one branch to another without human intervention. Users will have to hit them with arrows (I haven't implemented this part yet). In "Infinite jumping", user will have to control the movement of the object but here in my game, monkeys will act as enemies. They will have to move as per the events.

    In there a way to implement this?

  • I haven't tested it, but you can try something like this:

    Monkey on landed
    System for each Monkey
     // find next branch to jump
     Branch Y<Monkey.Y
     Branch pick nearest to Monkey.X, Monkey.Y
    

    Save this branch in an instance variable (say, Monkey.TargetBranchUID). Then on every tick for each monkey than has target branch simulate jump and either left or right key (depending on whether its target branch is to the right or left from the monkey).

    If you want them to jump randomly and not always up, you can change the way next branch is picked - pick a random branch within some distance.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)