Simple question!

For questions about using Classic.

Post » Wed Aug 05, 2009 5:42 am

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
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Post » Wed Aug 05, 2009 7:22 am

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.
B
3
S
1
G
3
Posts: 82
Reputation: 1,189

Post » Wed Aug 05, 2009 7:30 am

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!
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Post » Wed Aug 05, 2009 2:13 pm

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.
B
3
S
1
G
3
Posts: 82
Reputation: 1,189


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest