Player gets stuck in scenario after resizing =(

0 favourites
  • 9 posts
From the Asset Store
Save hours of work by resizing items on your game screens.
  • Hello...

    First, sorry about my english =P

    • In my project, the player can change his size to a small version for few seconds (just like the antman =D), to access certain areas af the stage.

    That's working pretty well

    The problem is: when the effect is over, the character returns to the original size, and sometimes it "enters the scenario", getting stuck. Something like this:

    How can I fix it?

    =[ Thanks

  • I guess that's a Tilemap with which you are drawing the obstacles.

    If that's the case, you can do this:

    Put a condition in front of your 'resizing back to normal'-action(s):

    If Tilemap.PositionToTileY(Player.Y-50) = -1[/code:34gke2xa]
    (Replace 50 if needed. Right now, the player will only rescale, if there are no tiles 50 pixels above his origin image point)
  • Humm...

    Sorry, I could not find this kind of condition...

    Found Else (wich I believed works together with IF), but not the IF itself... so sorry =(

    I ask you for patience with a beginner (with a terrible English knowledge) =P

    Here some screenshots of my attempt:

    "AlmaRed" is the platform guide, the "soul of character" (just as the tutorials taught me) =P

    "nanorun" is the trigger.

    /I'm a beginner =P Please don't laught at my "gambiarra" (something less functional than a quick fix)... This code is not smart, I know =P

    I tried few other ways, but it was conflicting with other character animations after resizing. This way it's working ;P

    All the objects. There's no tilemaps, I'm using the tiles (objects) that apears when you start a new project =P

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • To be honest, I would replace the TiledBackground with a Tilemap. That will make future environment building easier. :]

    Also, the "If" condition is not a "real" condition, I just used it to tell you that it is a condition.

    You know what? You could simply upload your .capx to Dropbox and link it here. Then, I can directly edit your .capx.

    That will make everything easier. :]

  • Man, you're a nice person! =P

    Here is the .capx: ... osave?dl=0

    Hum... It's just it? Don't you need the whole project?

    Thank you so much! =]


    [quote:3s4tzk4v]"Message: Rotieh can only post plain text URLS until they have 500 rep. 1 URLS modified."

    I can't send links yet... =P

    I'll try to send on code:[/code:3s4tzk4v]
  • He overlapped with a SOLID object

  • This fixes it:



    I also found two bugs:

    • The nano animation doesn't trigger anymore after it has been done twice in a row (probably an issue with the "nano"-variables
    • The reversed "nano" animation is triggered multiple times when "nanocontrol" >= 5 (I fixed this with the "trigger once" in the image
  • Yay!

    Thank you so much!

    The nano animation will not be able to be used twice in a row, there will be a cooldown =)

    You are the best!

    How can I thank you?

  • I'm happy to have helped, that's all. A Thank you is all I need to be happy.

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