How do i make a persistent HUD for every level?

jilliansjillians Member Posts: 33
edited November -1 in Working with GS (Mac)
Hey guys,

So currently i have to clone the HUD on every level, which means if i update it in once place, i'll have to update it everywhere. Is there a way to just have one version of the HUD?

Comments

  • jilliansjillians Member Posts: 33
    Anyone? : D

    I'd like to be able to change the HUD without having to go and edit every instance of it in every level i created.

    Thanks!
  • MeinMilchKaffeeMeinMilchKaffee Member, PRO Posts: 114
    Just copy the scene:D
  • simo103simo103 Member, PRO Posts: 1,331
    pretty sure what sounds like a easy/good idea isn't available. I have read a few items related to this tho:

    1. Design one or two levels only first and get them working completely/perfect before duplicating over and over into more levels (good advice but I've failed at this a few times :D )
    2. Could your game be designed with just one scene? Many GS games have numerous levels but they are all in one scene and use the same HUD and move the camera (recycling actors along the way to keep memory use under control)
    3. You could set a bunch of Game.attributes for the x and y position of your hUD actors and even put a few extra ones in if you're not sure what you might have by the end. Then each Hud actor you drop in you could have a change attribute to position it at the right x and y attribute. That would at least allow you to control where they appear from one set of attributes.

    Don't know if that helps any?
  • SparkyidrSparkyidr Member Posts: 2,033
    number 1 in simo103's post is probably the best way to do it.

    I have been messing around with a game, where I spawn the hud actors into place at the start of every level, which worked really well for what I was doing.
  • jilliansjillians Member Posts: 33
    I suspected this would either be non-existent, or complicated... I've kinda naturally fallen into doing the first option as described.. but it won't work, as the nature of my game requires numerous levels.

    Option number 3 is interesting, i will probably have to attempt that route! Thanks. Yeap it would be nice to group and spawn instances you've created, such as the HUD...

    Thanks guys!
  • SingleSparqSingleSparq Member Posts: 1,339
    I believe this is on the GS roadmap in a future upgrade for HUD usage
  • thebitmasterthebitmaster PRO Posts: 75
    Another option is to make a single object that spawns out all the HUD elements. All you would have to do is create the element once on each level, and any change made to the prototype would propagate to following levels. I've almost taken this approach a few times, but the requirement to have scene-level control over the HUD objects prevented me, since one can't do that with spawned objects.
Sign In or Register to comment.