GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

HUD help?

sewinstonsewinston Posts: 51Member
edited 11:03AM 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 Posts: 1,803Head Chef, Member, PRO
    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 Posts: 8,188Member
    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: http://www.quantum-sheep.com

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

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

    Hope that explains everything.
  • quantumsheepquantumsheep Posts: 8,188Member
    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: http://www.quantum-sheep.com

  • JGary321JGary321 Posts: 1,246Member
    You would put it wherever your camera is. So if your camera starts on screen 4, then yea thats where it would go.
  • quantumsheepquantumsheep Posts: 8,188Member
    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: http://www.quantum-sheep.com

  • CodeMonkeyCodeMonkey Posts: 1,803Head Chef, Member, PRO
    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 Posts: 8,188Member
    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: http://www.quantum-sheep.com

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

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

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: http://www.quantum-sheep.com

  • estcestc Posts: 13Member
    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 Posts: 3,206Member
    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 Posts: 1,803Head Chef, Member, PRO
    Sorry. Link has been updated. http://gamesalad.com/wiki/how_tos:gsc_static-hud
  • estcestc Posts: 13Member
    Thanks firemaplegames & CodeMonkey.... it works... i love you guys...
This discussion has been closed.