Simple question!

This forum is currently in read-only mode.
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • I have a hash table/xaudio in a layout that I want to use in another layout, how do I get it there?

    I tried going to the project tab then to the objects folder, but it won't let me drag objects from there into the layout.

    Any help would be awesome

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • If they do not need to be global, what you can do is select them in the object list next to the layout editor (on the left by default, I think), copy, and then paste them into the other layout.

    Global would work better for XAudio2, and maybe HashTable. It depends on what you are doing with them, I suppose.

    I'm certainly not an expert at this, but in my game project, at least, I am using a global HashTable and global Xaudio2.

    These allow them to work on all layouts, to be used in all event sheets on all layouts, though they do not show in the Objects display in other layouts. They will show in the event sheet object pickers and whatnot for other layouts, though.

    If they weren't global, they'd be reinitialized on the start of a new layout, I think.

    Being global, I did not copy/paste them to my other layouts. Being global, they already exist in all layouts.

    (However, for most objects - things which have a sort of "physical presence": which can be moved or placed, having a position, size, etc., such as any onscreen objects, you probably won't want to make them global unless you want them to be placed in exactly the same place on all layouts (maybe a HUD or menu or such))

    Also, if you will have game saving/loading:

    It looks like I set "No serialize" on my Xaudio2 and HashTable. Either that's what I had to do, or I had a reason behind it. I forget. Maybe I shouldn't have that checked, I do not know.

  • I tried making the hashtable global - which works fine, although when I make the xaudio2 object global it will still only play the audio in the level that I placed it in.

    Altough I didn't realise you could paste objects into the object bar, which seems to work when I copy/paste the xaudio2 in, so thanks!

  • I have no idea why Xaudio2 won't play in the other layout when global.. Hmm.

    But.. using the objects folder in the project tab didn't occur to me until you mentioned it. Thank you also.

    It helps a lot organizing objects by folder to find them more easily in the event editor, I see. It would be nice to be able to drag objects out of the project tab to place in a layout, for sure.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)