Private Variable assign

For questions about using Classic.

Post » Mon Mar 12, 2012 12:22 pm

Hello everyone.
Ive got one simple question . How to assign private variable in CC ?
For example ive got variable "xx" and i need to assign it as an angle for sprite 2.
In cc2 in events menu i just set angle to sprite 2.xx , but how to do it in classic?
Sorry for my awful english.

Best regards,
Erikeony321v2012-03-12 12:22:22
B
20
S
5
G
4
Posts: 39
Reputation: 3,898

Post » Wed Mar 14, 2012 10:03 pm

+ some condition
-> Sprite: Set angle to Sprite.Value('xx')

if you want to set a private variable you can do it like this:

+ some condition
-> Sprite: Set 'xx' to Sprite.Angle

Or you can do the same in python

Sprite.SetValue('xx', Sprite.Angle)
and
Sprite.SetAngle(Sprite.Value('xx'))
B
10
S
6
G
3
Posts: 127
Reputation: 2,481

Post » Thu Mar 15, 2012 5:16 pm

[QUOTE=Pecek] + some condition
-> Sprite: Set angle to Sprite.Value('xx')

if you want to set a private variable you can do it like this:

+ some condition
-> Sprite: Set 'xx' to Sprite.Angle

Or you can do the same in python

Sprite.SetValue('xx', Sprite.Angle)
and
Sprite.SetAngle(Sprite.Value('xx'))[/QUOTE]
Thanks alot !
B
20
S
5
G
4
Posts: 39
Reputation: 3,898


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests