use containers

Get help using Construct 2

Post » Mon Jul 29, 2013 3:13 pm

I have read the container manual page, but i am struggling to get them to work.

Firstly, I don't get if I am supposed to take the container object, and add its sub objects, or take each sub object, and add the container object.

Currently I am doing both, so if A contains B, I add B as the container for A, and A as the container for B. If I only do one, I get unpredictable results.

What objects are containers? Can any object be a container?

If I want to take a large group of sub objects which together make up one complete object, can i use containers to only have to anchor one object, rather than individually anchor them all? Previously I did this with pinning, but as pinning can only be set at run time, I end up with lots of code like:

pin B to A
pin C to A
pin D to A

Etc. Shame this cant be done in the designer.

What else do containers give you?

Currently I only know one thing: if you create the container, it creates the sub objects.

If you select one of the sub object, I could not get it to also select the container, so I use instance variables called MYID, and assign both container and containee the same instance Var at run time. This works, and allows me to select one when the other is selected. Are containers supposed to help with this?
Posts: 370
Reputation: 3,942

Post » Tue Jan 20, 2015 4:50 am

Hi nutmix,

I found a youtube tutorial by English Acorn that explains containers very well.

Here's the link

Copy and paste the url in a new tab/window to view it.

I hope this helps out.
Posts: 2
Reputation: 386

Return to How do I....?

Who is online

Users browsing this forum: urkokan and 68 guests