HUD help?

sewinstonsewinston Member Posts: 51
edited November -1 in Working with GS (Mac)
I have a moving camera over a background that is 1000x720. I created a HUD, put it on its own layer and turned off scrollable, but it remains fixed to the background rather then moving with the camera. What am I doing wrong?

Comments

  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    Hey sewinston,

    A couple of questions for you.
    1. Is the background in a scrollable layer?
    2. Which actor has the Control Camera behavior? Is your control camera behavior on a different actor(i.e. not the hud and not the background).
  • quantumsheepquantumsheep Member Posts: 8,188
    I had a similar problem, and did what sewinston did vis a vis turning the scrolling off on the layer the HUD was displayed on.

    The camera control was on the player actor.

    I never fixed that problem so I'd be interested in any solutions.

    Ta!

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

  • Just created this: http://gamesalad.com/wiki/how_to_gsc_static-hud

    Hope that clears up questions about creating HUDs.
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    http://gamesalad.com/wiki/how_tos:gsc_static-hud

    Hope that explains everything.
  • quantumsheepquantumsheep Member Posts: 8,188
    I've had a read of that CodeMonkey, thanks for the reply. I'm at work, but will have a quick look again at it when I get home.

    There's a few things I'm not clear about though in my mind. I'm going to use some easy maths to try and get a handle on this.

    Say my scene is 4800 x 320; essentially very long along the X axis, 10 screens wide!

    If the starting position of my player actor is in the middle of these 10 screens, say screen 4, then this is where the game will start.

    Where do I put the score, for example, in a non-scrollable layer? Is it in the top left corner of the start screen (screen 4 of 10) or is it elsewhere?

    Do you have a screenshot of the rules that would govern this perchance?

    Cheers,

    QS

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

  • JGary321JGary321 Member Posts: 1,246
    You would put it wherever your camera is. So if your camera starts on screen 4, then yea thats where it would go.
  • quantumsheepquantumsheep Member Posts: 8,188
    Thanks Jgary - I'm pretty sure I tried that before and it didn't work. The rest of the scene scrolled but the score stayed in place on screen 4 - which is not ideal to say the least.

    I'll give it a try when I get home!

    cheers,

    QS

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

  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    All your HUD actors need to be placed in a nn-scrollable layer and as if you started your camera view all the way to the left.

    Added a couple of images to the how to that may help.

    JGary,
    You put the scores in a non-scrollable layer and in the camera view as if it started at the bottom left of the scene.
  • quantumsheepquantumsheep Member Posts: 8,188
    Well alrighty then! I'll try this out when I get home.

    Those pics really do help, Codemonkey. We're visual thinkers, remember? ;)

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

  • JGary321JGary321 Member Posts: 1,246
    Shows how much I know =p

    Thanks for the tip Code
  • quantumsheepquantumsheep Member Posts: 8,188
    Works a treat - cheers! :)

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

  • estcestc Member Posts: 13
    hi everyone, i'm new to gamesalad, just got it about a week ago and with regards to the HUD, i've been having the same problem as discussed here. I understood that there is a link that CodeMonkey had attached on how to do the HUD but the link is no longer available. Do anyone have any idea where i can find it or teach me how to create it? My scene size is 1440x640. Camera orgin is 480x320 (somewhere centre top of the scene as the start of the game)....thanks estc...
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Hi estc!

    Regardless of where your camera is, or how big your Scene is, your HUD elements need to be in the lower left corner of the Scene, in a new layer that is unscrollable.
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    Sorry. Link has been updated. http://gamesalad.com/wiki/how_tos:gsc_static-hud
  • estcestc Member Posts: 13
    Thanks firemaplegames & CodeMonkey.... it works... i love you guys...
Sign In or Register to comment.