continues movement
sonicm3
Member Posts: 141
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
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?
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.
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 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.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Okay thankyou both very much
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.
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.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
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.
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.
your right there mate!! trial and error and sheer perseverance!
Thank you ありがとうございました