0 Favourites

Slide action while keeping platform behavior.

  • While trying to just remake a basic MegaMan NES clone to get even more comfortable with C2 I have come to a halt as I am running into a constant problem, And I do not understand it at all. Whenever I collide with anything while sliding to the left (only happens when sliding to the left and not the right) the player will "climb" whatever he is colliding with, be it a wall or the enemy. when colliding with the same object on the right it functions normally and he just stops moving forward.

    Any idea as to why this is happening? I have gone over the events many times I cannot find anything that would do that.

    How the slide portion of the event sheet looks right now.

    <img src="http://i45.tinypic.com/4r4ze0.png" border="0">

    I have been bothered by this for a while now and I am at complete lost as to why it only happens when sliding left and not right.

    I have both an online playable version and the .capx uploaded, just look at the group "Slide" for all the events related to that action but everything is as clean as i could make it, lots of comments explaining what i was trying to do for each step.

    Link to play online

    Link to download .capx

    EDIT: I forgot the controls are simple "Z" jumps "X" shoots, hold "X" for a charged shot (currently does not hurt any enemies when charged)

  • Did you tried changing that ELSE statement to an Inverted "Is mirrored"?

    Don't know if that helps. Maybe it has to do with image points. I can't check your capx right now and I'm not that experienced in Construct also.

    I'll try giving it a look when I get home.

  • Yep , you should try scary pumpkin suggestion ...

    I'll give it a look as soon as I get to my PC

  • Doesn't completely remove it but makes it unnoticeable ...

    MegaFixed

    Cheers ...

  • BACLog - your slide left condition is setting the x of the player, which if they are moving they will just phase up and over stuff (this is how the endless runner illusion is achieved, they never get stuck on anything by constantly setting the X of the player)

  • Doesn't completely remove it but makes it unnoticeable ...

    MegaFixed

    Cheers ...

    Thank you Whiteclaws, I appreciate it.

    I would never even have thought to go that route as I was so focused on how the right direction worked fine but the left did not what so ever.

    On another note, i added to the instance where you set the global on down press to player.y+8 and it is even less noticable

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • i am totally new to construct, but was messing with your slide a bit when making my own, and i completely got rid of the wall sliding by doing this below. seems like a hack, but works.<img src="https://dl.dropbox.com/u/503260/Capture.PNG" border="0" />

  • Hey,

    Instead of using player.x you should use the platform's Vector X to move the player.

    Do not ignore the platform input; instead set the necessary parameters to disable jumping, etc.

    <img src="https://dl.dropbox.com/u/11076434/C4DSamples/Solution.jpg" border="0">

    And finally, don't forget to restore those parameters :)

    <img src="https://dl.dropbox.com/u/11076434/C4DSamples/Solution2.jpg" border="0">

    Here's the LINK TO DOWNLOAD to the sample of my solution.

  • Xavy has a very good solution since it works with the platform plugin, not against like manual +/- of x

    If you want to ignore user movement, I suggest making it trigger an event (disablecontrols false/true) and on the control actions, have it check to make sure it's false.

    -On Right down

    -disabled controls is false

    --Simulate Platform Right

  • Hey,

    Instead of using player.x you should use the platform's Vector X to move the player.

    Do not ignore the platform input; instead set the necessary parameters to disable jumping, etc.

    <img src="https://dl.dropbox.com/u/11076434/C4DSamples/Solution.jpg" border="0">

    And finally, don't forget to restore those parameters :)

    <img src="https://dl.dropbox.com/u/11076434/C4DSamples/Solution2.jpg" border="0">

    Here's the LINK TO DOWNLOAD to the sample of my solution.

    this has solved so many things i cant even explain to you, haha i have been having trouble using the X vector for various purpose as it seemed to only move the player a short distance if any, i guess its the deceleration set to 0 stops the action from stopping after the short burst of movement. thank you very much for all the input.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
0 Favourites
[BEHAVIOR] Chipmunk Physics
673 82,517
nelostic's avatar
nelostic
Unread hot topic
0 Favourites
[Behavior] LiteTween
672 169,924
manujorgo's avatar
manujorgo
Unread hot topic
564 105,243
rexrainbow's avatar
rexrainbow