SoldjahBoy's Recent Forum Activity

  • The easiest way to do something like this would be to have an invisible "detector" or "helper" sprite that is around your character... Then if the player hits an enemy, and another enemy is within his "detector" then he will just move on to hit the next one.

    You would need to have some sort of Boolean instance variable to tell the player if an enemy has already been hit in the combo so he doesn't continuously hit the same enemy again and again... then the boolean could reset for each enemy after the player is no longer attacking.

    So your events would look something a little like;

    [For each enemy (loop)]

    [Player "attack" animation is playing]

    [Player "attack" animation is on last frame]

    [Enemy HasBeenHit.variable = 0]

    [Enemy is overlapping "detector"]

    --- Set player position X -> lerp(player.x,enemy,x-(player.width+enemy.width),1-0.3^dt)

    --- Set player position Y -> lerp(player.Y,enemy.Y,1-0.3^dt)

    --- Deal damage to enemy

    --- Set enemy.HasBeenHit.variable to 1

    --- Set player animation to "Attack" play from beginning

    This example would only work on an attack going left to right, but it should give you the rough idea to get something started.

    ~Sol

  • You can make your pressure plate sink slowly using LERP to position in on the downwards motion...

    Something like; lerp(a,b,x)

    [Set pressureplate.Y position] -> lerp(pressureplate.Y,desired.Y,1-0.9^dt)

    You can set the desired.Y position manually, or have an instance variable set at startup of layout to be pressureplate.y+10 or whatever, then reference the variable as the B component to the lerp formula. The X component can be changed for faster or slower reaction. 1-0.9^dt is pretty slow, but you can do like 0.99 for even slower.

    For your trampoline, you will need to do a Y comparison between the player and the trampoline to determine if the player is below or above the trampoline in order to apply the impulse in the correct direction;

    [Player collides with trampoline]

    [player.Y is greater than Trampoline.Y]

    --- Impulse down

    [Player collides with trampoline]

    [player.Y is less than Trampoline.Y]

    --- Impulse up

    You can make the trampoline "sink" by having a small animation of it "bending" - then apply the impulse when the animation frame reaches the desired one. In the above example pseudo-code, you would do "play animation XYZ from beginning" instead of "impulse (angle)" then make another event that triggers the impulse once the animation is at whatever frame you like.

    Hope this helps

    ~Sol

  • I don't understand what you're wanting to do.

    Can you draw a simple picture of what you expect to happen?

    From what I can guess, I think you want to show an object's instance variable as text?

    ~Sol

  • I can't see any issue either from your screenshot... using a "for each" loop should pick each instance that meets the conditions you have specified.

    A capx would be beneficial so we can play around with it and see what can be done.

    ~Sol

  • Looks like a BORG Cube

    ~Sol

  • If you set your origin point of the stair rails to the bottom left corner, you can compare the Y position of the player (as well as overlapping the rails) and stairs rail to know when he should be in front or behind.

    Basically if the player is overlapping the stair rails, but his Y position is the same as the stair rails or lower then he will be behind. If He is overlapping the rails and Y position is higher, then he will be in front.

    ~Sol

  • Yes it's possible, there are loads of different ways to do this, depending how your sprite moves.

    Do you have some visual example of your sprite and how you want it to move? I'm not sure what the numbers mean that you've used in your question, or what a "plopp up" animation is.

    If you can draw a simple image of what you want to do, I can probably help you.

    ~Sol

  • That's really weird... I published a game with the help of Kyatric a couple of years ago when Cocoon was in its infancy - using WebGL and it worked great. It's been so long now that anything I did is almost certainly irrelevant today. I wish I could be of more help, but maybe someone else will have some thoughts to add.

    ~Sol

  • Right click group -> Edit

    ~Sol

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is a long-standing issue with the platform behavior; nothing to do with using dt in events.

    There has been a number of threads about it already, like this one:

    There's one solution by JohnnySix at the bottom of that thread. Last time I implemented/tested it was 2 years ago so I dunno how well it works now but it's worth a shot.

    Ah, good to know... I assumed he wasn't using behaviour driven control for his jumping. Well that's a bummer... :/

    ~Sol

  • No problem

    ~Sol

  • Yes when you use instances of the same object, any behaviour or instance variable you add to it will be used by all instances of that same object... but they can be set and controlled PER instance

    You're welcome! Glad that worked

    ~Sol

SoldjahBoy's avatar

SoldjahBoy

Member since 2 Apr, 2008

Twitter
SoldjahBoy has 3 followers

Trophy Case

  • 16-Year Club
  • Email Verified

Progress

17/44
How to earn trophies