Suggestion - store additional types as variables

Discussion and feedback on Construct 2

Post » Mon Nov 28, 2011 12:28 am

This came up in another post, but I thought I'd make an individual thread.

Would be very powerful and extemely handy if we could store types other than Number and Text as local or global variables. For instance storing a Sprite would allow you to have references to more than one instance of the same Sprite at any one time and cut down on a lot of work arounds.

Also, am I right in thinking you can't currently store a local boolean? (besides using the 1/0 work around).
B
16
S
5
G
1
Posts: 43
Reputation: 1,595

Post » Mon Nov 28, 2011 12:51 am

You can actually store references to instances by using their UID. Set a number variable to the object's UID to save it, and you can get it back with the 'pick by UID' condition.
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Mon Nov 28, 2011 2:23 am

Hi Ashley, I do that quite a bit now, but that technique still doesn't allow you to set instance_1.my_variable to instance_2.my_variable directly without the use of a middle man event/action/local variable.
B
16
S
5
G
1
Posts: 43
Reputation: 1,595


Return to Construct 2 General

Who is online

Users browsing this forum: 99Instances2Go, Eisenhans, MatheusCastellar and 6 guests