director 1.4 and game huds

Has anyone had any issues with thier in-game hud using director 1.4 I was using 1.3 and everything was strait. But after switching to 1.4 my hud group seems to be automagicly entered into my localgroup. Has anyone found a workaround for this? can I just do something like

Thanks [import]uid: 39088 topic_id: 15371 reply_id: 315371[/import]

Well director 1.4 have a built-in function that adds all objects into the localgroup

  • clean() function is back
  • new start() function on books
  • initVars() is called after scene is loaded
  • improved error handling
  • bug fixes on pop up
  • group recreation (internal)
    - missed objects are now inserted on localGroups
  • protection handle now “tap” listeners
  • lot more! [import]uid: 9577 topic_id: 15371 reply_id: 56843[/import]

Thats the thing my objects are not missed. They are inserted into a seperate group called, gameHud. I would think missed means objects that are not inserted into any groups. Thats what baffles me. Its all good though I will stick with version 1.3 for now

Thanks [import]uid: 39088 topic_id: 15371 reply_id: 56866[/import]

@skalistican6

Your group should be created at the main.lua file. With this, Director doesn’t insert it into the scene group. [import]uid: 8556 topic_id: 15371 reply_id: 56871[/import]

So the hud group should be in the main.lua file?

If you test it with the Ghosts vs Monsters example game, (it uses director 1.1), you can see this in action, the hudGroup is inserted in to the local group and moves with the screen.
[import]uid: 72726 topic_id: 15371 reply_id: 56874[/import]

Ricardo, First off thanks for the awesome director. You are the man. And thanks for taking the time to reply.

Im not sure if I can create the hudGroup in the main.lua file, as the user interacts with the hudGroup frequently. Im sure there is a way to implement my hudGroup in my main.lua but i’m still pretty noobish when it comes to transfering info between lua files with out using global variables. How would you implement this if I needed my users to interact with the hudGroup. How can I insert all my hud items into a group that is in another lua file?

Thanks again for the reply [import]uid: 39088 topic_id: 15371 reply_id: 56892[/import]

Thanks!

Well, you can try something like this:

Scene for creation

...  
local hudGroup = display.newGroup()  
hudGroup.directorId = "main"  
--  
director:changeScene( { hud = hudGroup }, "scene2" )  
...  

Scene 2

...  
new = function( params )  
 local hudGroup = params.hud  
...  

I didn’t test it but I think it could be the way to do it. [import]uid: 8556 topic_id: 15371 reply_id: 56897[/import]

[edit] comment removed, was meant for yesterday! [import]uid: 11636 topic_id: 15371 reply_id: 56898[/import]

Thanks, I will give this a try when I get off work in the morning.

Thanks again :slight_smile: [import]uid: 39088 topic_id: 15371 reply_id: 56988[/import]