How do I add Sprites to a Container dynamically?

Get help using Construct 2

Post » Wed Dec 17, 2014 9:10 pm

gumshoe2029 wrote: If dynamically adding sprite instances worked, then I could create the sprite THEN associate it with the container avoiding the extra instances of everything else in the container.


You add object types, not instances, to a Container. So it doesn't make sense to add them 'dynamically'.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Fri Jan 02, 2015 9:39 pm

Yea, I know, but I need instances added to the container, not object types for my particular purpose.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,415
Reputation: 4,824

Post » Sat Jan 17, 2015 6:31 pm

codah wrote:
gumshoe2029 wrote:Make a scrollable table object that I can dynamically load sprites/text into. The "Container" behavior would allow me to move only one object in the container to scroll the entire table up and down.


A Container is not a container like a bucket. It's an association between object types during object creation, destruction and picking. You might want Pin behaviour. (Not saying Container wouldn't be useful, just in a different way).


Thanks codah. The pin behavior works perfectly. I have a scrollable/drag/droppable table now.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,415
Reputation: 4,824

Previous

Return to How do I....?

Who is online

Users browsing this forum: R0J0hound, StillSarah and 31 guests