InadequateChris's Recent Forum Activity

  • Worked perfectly, thanks BaconSwagg

  • I'm using the platform behaviour and have a character walking left or right.

    I then stop the player if they hit a button at a certain point like so:

    On Keyboard Press W

    Set Group "Movement Controls" Deactivated

    Set Platform Disabled

    Start ignoring Platform user input

    Tween Position to Location.Y

    And that moves the player to a new position perfectly.

    The problem comes when returning them to the Platform:

    On Keyboard Press S

    Tween Position to Floor.Y

    Wait for previous action to complete

    Set Group "Movement Controls" Activated

    Stop ignoring Platform user input

    Set Platform Enabled

    At this point, when the player has returned to the ground, their motion from their initial walking continues as if it was never interrupted. So if they were moving right before hitting W, they now go back to moving right after hitting S, until they decelerate and stop.

    Why is the movement carrying over? Is there a way for me to kill it upon the press of W?

    Thanks for any help.

    Tagged:

  • Ahh, I've seen that being used in other projects and wasn't sure why - I guess that's it. Thanks so much for your help WackyToaster.

  • Hi all.

    I've used the Platformer behaviour, and when the player keeps walking towards a wall, they keep 'bouncing' off it rather than stopping. I've noticed the Platform has wall condition but I can't figure out what actions to implement.

    I've uploaded my file here if it helps.

    Thanks!

  • Ah, I managed to figure it out!

    I set the walk and run speeds as variables, and created a tween between the two on release of the run button.

    And I have a listener waiting for when the tween is playing - which updates the Platform maximum speed to match the tween.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks BaconSwagg. Would I need to use an Every tick to get it to keep updating to where the tween is at? And how might I do that from a Key is Released condition? My understanding is that it would only execute once, when the key is released.

    I'm still learning so any help is appreciated!

  • Hi all.

    I have a 2D platformer with two movement speeds - walk and run. Walk is 300 max speed, run is 600 max speed.

    The player holds L to run.

    I'm using the code below. The problem is that as soon as they stop running (letting go of L), they immediately drop to the walking speed of 300, and it's a jarring difference.

    How might I make the speed drop from 600 to 300 over the course of a second, rather than immediately please?

    Tagged:

  • Looks like I need to do some reading up on Dictionaries. Thanks so much!

  • Hi dop2000,

    Thanks for the response but I'm not sure I was really being clear on what I was after.

    I have a set of enemy types and have a method that determines which one the player is up against. That is stored in the variable currentEnemyType. Eg:

    var: currentEnemyType ...Goon ...Brute ...Mage ...Boss ...etc

    What I'm trying to do is get the type of enemy inserted in to the name of an instance variable on the player sprite. Taking Goon as an example:

    Player.attackGoonOneLand

    And against a Brute it would say:

    Player.attackBruteOneLand

    So I'm trying to insert the variable of currentEnemyType in to that instance variable:

    Player.attack**currentEnemyType**OneLand

    But I'm just not sure what to replace those asterisks with.

    Dunno if this makes a difference, but the instance variable is a Number.

  • Hello!

    I've managed to bring a variable in to a string using the & symbol, but how do I do the same for a numeric instance variable?

    I took a wild guess with Hero.guardAttack&currentEnemyType&OneLand but I have no clue how to do this properly.

  • Worked a treat, thanks so much El Constructorr!

    And thanks for helping too newt :)

  • Does anyone know what the best method is to scroll the screen along by its own width, using acceleration and deceleration?

    I've tried lerp but that only produces the effect of deceleration, of course.

    Tagged:

InadequateChris's avatar

InadequateChris

Member since 2 Dec, 2020

None one is following InadequateChris yet!

Trophy Case

  • 4-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

6/44
How to earn trophies