continues movement

Hi

If im holding down the right arrow key, the actor exits the screen and appears on scene 2 idle.
Is it possible so that i can hold down the key for him to have a continues run from scene to scene, withought him stopping and becoming idle after each scene?

Comments

  • GnarlyGnarly canadaMember Posts: 840

    Controls will reset when you change scene. So I would make a global attribute "Keep moving" boolean

    And have a rule in the first scene to trigger this to true if its moving and your about to change scene. Change attribute keep moving to true.

    In the second scene in the player you want to move. A rule as well.

    if Keep Moving is true
    move ........

    I am guessing you are trying to do something more complex than that?

  • sonicm3sonicm3 Member Posts: 141

    good idea, yea but only issue is, i would need it to work when going up/down/left/right as that reset of scene is pretty annoying.

  • GnarlyGnarly canadaMember Posts: 840

    I'm not exactly sure what you mean there? If there are only four possible directions?

    Then attribute integer.
    0= no move
    1= left
    2= right
    3= up
    4= down.

    Then set that attribute to the player for the next scene

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    @sonicm3 said:
    good idea, yea but only issue is, i would need it to work when going up/down/left/right as that reset of scene is pretty annoying.

    The easiest way is to ditch using self attributes for all info you want to carry over and make them game attributes.

    Then in you actor have a series of change attributes outside a rule. Since change attributes only fire once without a rule. All the settings you had when you left a scene and moved to another will become active on any other scene. Game level variables are not reset to default on scene changes. If you watch my GSLogic series I explain all the info on how logic and variables act and process in GS. GS code is nothing more than conditional logic.

  • sonicm3sonicm3 Member Posts: 141

    Okay thankyou both very much

  • GnarlyGnarly canadaMember Posts: 840
    edited April 2016

    Yes all attributes I described are global. You need to carry that attribute value to the next scene.

    Global attributes won't reset during scene changes.

  • sonicm3sonicm3 Member Posts: 141
    edited April 2016

    it seems like too much work, to change all my movement ect at this stage, shame.
    However, wish there was a simple way to make it continues.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    @sonicm3 said:
    it seems like too much work, to change all my movement ect at this stage, shame.
    However, wish there was a simple way to make it continues.

    This is why I reccomended you do some study first.

  • GnarlyGnarly canadaMember Posts: 840

    What player controls are you using?

    Only 4 directions for player?

    You don't have to change it. Just add a couple boxes of code.

    I'm not home today to make you a demo.

  • sonicm3sonicm3 Member Posts: 141

    Thanks gattoman i appreciate the gesture, cheers.
    I just deleted the scenes and made a larger scene instead with camera follwing actor, working so much better, thanks anyway tho.

  • GnarlyGnarly canadaMember Posts: 840

    @sonicm3 said:
    Thanks gattoman i appreciate the gesture, cheers.
    I just deleted the scenes and made a larger scene instead with camera follwing actor, working so much better, thanks anyway tho.

    Glad you figured it out. Learning only comes from trying and failing.

  • sonicm3sonicm3 Member Posts: 141

    your right there mate!! trial and error and sheer perseverance!

  • Terrellort_GamingTerrellort_Gaming Member Posts: 93

    Thank you ありがとうございました

Sign In or Register to comment.