Unnatural20's Forum Posts

  • Give this a try?

  • Actually, the method can work, because you can rerun that loop whenever you need.

    Take a look at this .capx.

    In this case, I'm running the algorithm every tick until I'm done spawning. You could run it exactly once every time you spawn a new character, instead, and the end-user would never see it.

  • I think you're missing something a little obvious- if I put Character 3 on top, then 2 on top, then 1 on top, what order are the characters in?

  • Take a look at this fellow, see what you think.

  • I think I understand now? This does what you want, but it still uses multiple conditions:

    On trigger: Set Text to ""

    (Subevent) System -> Foreach Object | Text -> Append "Variable IsFull: "&Object.IsFull & newline

    If you only want to pick certain objects, then put System -> Pick by evaluate in the same block.

  • You can set the Player platform VectorY to -Player.Platform.JumpStrength to make the player jump. Then you'd probably need to add some extra conditions to prevent the player spamming it.

    Actually that fits pretty well with my existing code- [Keyboard -> on space pressed] & [Player -> is Climbing] | [Set Player platform VectorY to -Player.Platform.JumpStrength]- and Climbing doesn't get reset until the player regrabs onto the ladder.

  • So I'm using https://www.scirra.com/tutorials/591/a-simple-method-for-climbing-ladders-in-platformers as my basis for ladder use in my platforming game. However, I want a few things that the tutorial doesn't do. Most of them I've figured out myself.

    1: Don't let being on a ladder phase through solid objects - fixed by setting platformer vector Y instead of set position

    2: Snap to ladder when climbing

    3: Allow jumping off the ladder

    3a: When jumping and remaining on the ladder, there's a brief pause before beginning climbing again.

    3b: Can climb ladder faster by jumping, regrabbing ladder, and jumping again.

    4: Can drop off of ladder with Jump + Down

    It's 3b I'm having trouble with. I can't figure out how to get the Platformer behavior to 'reset' jump ability if you're not technically landing on the ground.

    Any thoughts? I've attached a .capx with everything but 3b demonstrated.

  • Unnatural20 Not good enough because if you lure the enemy in that gap he cannot chase player. Enemy is stuck and cannot chase anymore

    Excuse me? What do you mean, "not good enough"? This is a minigame I put together in five minutes to illustrate "jumping over a gap," not "Here is your game for you."

  • ...I'm not sure where you're having problems? It really sounds like you've got it under control.

    That said, if you *were* having problems, fisholith has gone into serious detail for you.

  • Well, there's a lot of ways to pick things. This .capx includes two methods.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The solution I saw in a tutorial was to give them a 'detector' sprite, pinned to the forward bottom corner of the sprite, and if it sees open space? Jump.

    Here's a little demo game I put together: Control are the arrow keys for left, right, and jump; your score goes up every time you hit the switch, and down every time the enemy collides with you.

  • I'm working through the idea but I'm still getting dead zones for some reason.

    Any consistent ones?

  • Hm, that'll still miss things the same distance above/below/left/right. and for those you might want an offset of 0, 1.41 (as that's the straight-line distance of 0, 0 to 1, 1).

    Would there be a way to say "Sprite2 is X distance from other Sprite 2"?

  • Car.Pick Nearest (Player.X, Player.Y)

  • I can't help but think you're having a picking problem. But I can't figure it out either.

    Mind you, lots of check-neighboring is not necessarily a bad thing.