Keep actor front and center? xD

WolfieEnsaladaWolfieEnsalada Member Posts: 26
edited November -1 in Working with GS (Mac)
Hi. ^__^ Sorry about all of these questions, I'm still having trouble figuring GameSalad out. :(

So I have an actor who is "running" at a constant speed in a scrollable level. When you touch the screen, the actor jumps up and then falls back down (gravity). Unfortunately, I have this problem where the actor is scrunched up at the right side of the screen while running. How do I fix this so that the actor remains near the center of the screen while still running and having the level scroll past it? o_o I tried using the behavior "Constrain Attribute," but I wasn't even sure what to constrain! ^_^"

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi Wolfie(Ensalada); in the Editor, click the camera icon just under the Preview button, then adjst the camera view; to smaller probably. Then in your player, put a Control Camera Behavior in the Rules. That should do the trick!

    :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • quantumsheepquantumsheep Member Posts: 8,188
    Constrain player X position.

    The iphone screen (currently) is 480 across by 320,

    You'll want to constrain the player's X position to something like 100. Putting him in the middle (240 - which is half of the 480 width) will mean he won't be able to see objects fast enough to jump over them.

    Hope that helps!

    QS :D

    Or do what gyro says!

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • WolfieEnsaladaWolfieEnsalada Member Posts: 26
    :D Thanks guys! I must say, GameSalad's forums are one of the best for getting help. xD On most other forums I'm just sitting there like "... bump... bump... bump... anyone gonna help meh?"

    Let's see...

    I'm trying what you've said, quantumsheep...

    ...

    Hmmm... are you using the Constrain Attribute Behavior for this? If so, what do I constrain? The "Image" of the Actor? Or the "Tags"? o_O See, when I put "self.Image", it says the image is missing... o___o

    EDIT: WAIT! I got it! xD It's the X Position. Sorry! >__< Thanks again!
Sign In or Register to comment.