Container object & Global library

New releases and general discussions.

Post » Tue Feb 01, 2011 7:16 pm

I love the way flash handles elements. Every object has its own timeline and can hold its own actions and subobjects. Is it possible to create some kind of container object with its own event sheet? Also a global library for reusable elements would be great.


I create a complicated Explosion with different particle systems for fire, smoke, different debris ect. Creating this effect in a container object (has its own canvas like a layout) would speed up the workflow. Exposed variables could be a good way to control the container object (like Expose: width of object a inside containerobject as: "Debriswidth". Then within the normal layout you can access this exposed variable via the layouts normal event sheet.

A global library where I can drag reusable elements into my layouts would be a great addition.

I know my english is gruesome. Sorry for that.

Posts: 22
Reputation: 919

Post » Tue Feb 01, 2011 10:58 pm

Funny I always get into trouble when I expose my variables.

Anyway there is an attribute called container, that's probably along the lines of what your thinking of.
There's some information on it in the wiki.
....if it loads.

I would warn you its not optimal for particles, as every object is created, and destroyed at the same time.
Also its a bit late to be asking for changes to the program, but hey stick around for C2.
Image Image
Posts: 7,668
Reputation: 79,535

Post » Wed Feb 02, 2011 1:09 pm

Hey newt,

thanks for your reply. I knew that my attempt would fail badly ;)

idea is more of a layout "inside" a layout.
For now I wil drop the term "container" and cal it "mymagicobjectwithitsownlayerandeventshet" for short "mmowiolaes".

Ok, I create a new Game. Then on my normal layout I create a mmowiolaes. Now I can rightclick this mmowiolaes and select edit. A new layout pops up. Its the layout of this mmowiolaes object. Has now boundaries just a center cordinate 0,0. Inside I can work like in a normal layout. Create sprites, events, particle systems ect.
I create 3 diffenret particle systems. Each with a spawn rate of 0.
Inside the object options (tab on the left) of particle system I can check a box under "rate" marked EV with a single textfield. EV means expose variable. Ill type "Particles1.rate".
I close this mmowiolaes. This object is now inside my global library and I can drag it into every layout Im working on.
In my layout of choice I drag an instance of this mmowiolaes onto the canvas/layout. From here on I can alter the rate of the particle system inside this mmowiolaes via the exposed variable:

+ Collision between objecta and objectb
- set mmowiolaes.x to objectb.x
- set mmowiolaes.y to objectb.y
- set nameofmmowiolaes.Particles1.rate to 500

Just a small example to make it clear I hope. I found the container object in the Wiki. Thats normaly the first place to lok for exotic parts of construct.

Posts: 22
Reputation: 919

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 0 guests