Dynamic Private Variables on Sprites

For questions about using Classic.

Post » Tue Mar 31, 2009 7:23 pm

I have a question for everyone, which I'm pretty sure I know the answer to, but I'm not 100% sure.
Do you guys know if it's possible to dynamically create private variables on a sprite and check them? I am working on an advanced array loader and I am working with giving variables to sprites.
Does anyone know if this has been implemented? Thank you!
B
2
S
1
G
5
Posts: 54
Reputation: 1,508

Post » Tue Mar 31, 2009 7:26 pm

You could put the sprite in a container with a hash table and do it easily that way.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Tue Mar 31, 2009 9:56 pm

Oh, nice, that works perfectly. Thank you, I appreciate the help :)
B
2
S
1
G
5
Posts: 54
Reputation: 1,508

Post » Tue Mar 31, 2009 9:59 pm

Adding private variables would be nice; more control over private variables at runtime - and a better system - has been planned for 2.0.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Tue Mar 31, 2009 11:21 pm

that's like saying you're planning to have race tracks at the moon colonies :P
B
2
S
2
G
4
Posts: 171
Reputation: 1,792

Post » Wed Apr 01, 2009 1:12 am

Yeah, it's definitely not ideal.. Just because that will mean for every object I'd have to have a hash table to go along with it, or more creatively I could separate with delimiters even further, but that requires quite a bit of work.. So better private variable management would definitely come in handy :P
B
2
S
1
G
5
Posts: 54
Reputation: 1,508

Post » Wed Apr 01, 2009 1:33 am

It shouldn't really take much memory, so there's nothing to worry about - unless of course you're spawning 1000s of them.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest