Not placing sprite object in layout

For questions about using Classic.

Post » Tue Aug 30, 2011 3:32 am

Something confuses me a lot. I don't understand why I need to place all sprite objects within the layout. What I'm saying is that I want the sprite "dot" to be just in the objects list and not actually be placed into the layout yet, instead I want it to be created when an event is activated.

Is it possible to not place it in the layout or do I have to hide it and somehow inactivate it?
B
3
G
1
Posts: 44
Reputation: 563

Post » Tue Aug 30, 2011 4:35 am

Bugs me that the object list doesn't show objects from other layouts too.

The other thing you are asking about, creating objects at run time, that is entirely possible, but there are situations that they don't show up in the event editor. Sometimes layout order plays into this, maybe even event sheet order.

Try putting the objects into a layout near to the top of the layout stack, and make a new event sheet, they should show up.

If all else fails, copy the object from where you have it to the layout you want the event to work in(because the object window doesn't show anything but what is on the current layout, no matter what the setting is) create your events, and then delete the object out of the layout.

B
9
S
2
G
4
Posts: 346
Reputation: 2,726

Post » Tue Aug 30, 2011 5:31 am

Object list will show everything in the project if you use an event sheet that isn't bound to a layout (just make a new event sheet and include it in the layout event sheet).
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Post » Tue Aug 30, 2011 10:11 am

Hum... so could you tell me how>

For the sake of discussion I want to create the character 'pac man'. I create him as sprite object.

In the main layout(show when the app is launched) I want pac man to appear at a random position when I press the enter key and not when the layout has just loaded.

In fact the when the app is open it's just a black screen, so when I press enter a pac man spawns, I press enter again another pac man spawns, etc etc etc. So tell me, how would I do that?

How do I add a sprite object into a layout without it actually being placed 'visually' in the layout itself (while using CC, since I found out you have to actually place it onto a layout to use it), so I can create an instance of it to appear on the layout while running the app.

I'm sorry if you guys couldn't understand me... or is it me who don't understand you? @@
B
3
G
1
Posts: 44
Reputation: 563

Post » Tue Aug 30, 2011 5:54 pm

There has to be at least one instance of a object in a layout for it to be visible in the event sheet. Give the pacman sprite the attribute "Destroy on startup" and just copy/paste it to any layouts you want to use it.

At this point you have to manually create the pacman with events.
B
79
S
24
G
52
Posts: 4,725
Reputation: 39,713

Post » Tue Aug 30, 2011 9:14 pm

"There has to be at least one instance of a object in a layout for it to be visible in the event sheet. "

This is not the case. It IS possible to create elements from other layouts without them being in the current layout. You just need to create a new event sheet.
B
9
S
2
G
4
Posts: 346
Reputation: 2,726

Post » Tue Aug 30, 2011 10:53 pm

Hm... interesting. I thank you for your time. I shall try and do both to see which one fits my logic the best.
B
3
G
1
Posts: 44
Reputation: 563


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests