private variables for families

For questions about using Classic.

Post » Sun Dec 16, 2007 7:22 pm

apparently, private variables for families can't be called in the expression editor

i have a family called "[color=green:1t84io06]player[/color:1t84io06]"

and i'm trying to run a loop as such

[color=green:1t84io06]System: Start loop "positiveDisplacement" and run player.Value('speed') times[/color:1t84io06]

the result is this error

[color=green:1t84io06]Error in parameter 2:

'speed' is not a private variable in 'Value' (parameter 1)[/color:1t84io06]
B
2
S
2
G
5
Posts: 293
Reputation: 2,236

Post » Mon Dec 17, 2007 2:46 am

but if the players have diffrent speeds... guess that's why.
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Mon Dec 17, 2007 2:45 pm

yeah, i figures as much lol
but if that's the case then i've hit a road block in coding universal events :(
B
2
S
2
G
5
Posts: 293
Reputation: 2,236

Post » Mon Dec 17, 2007 4:39 pm

This shouldn't be a problem. Does the shortcut player('speed') work?
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Tue Dec 18, 2007 10:29 am

[quote="Ashley":3i5t0cjs]This shouldn't be a problem. Does the shortcut player('speed') work?[/quote:3i5t0cjs]

I've got the same problem. I have a family called "Routes", and I can't access private variables.

[code:3i5t0cjs]Routes('NextPointUID')[/code:3i5t0cjs]

This does not work, it says it is not a private variable in Routes (it has no problems accessing it from an action).
B
2
S
1
G
5
Posts: 15
Reputation: 1,430

Post » Tue Dec 18, 2007 10:37 am

Another related thing, I have an event, "right click on the Routes family", and in that Routes.UID always returns the same ID. Shouldn't it refer to the Routes just clicked (the subject of the event), or don't families work that way?
B
2
S
1
G
5
Posts: 15
Reputation: 1,430

Post » Tue Dec 18, 2007 11:00 am

Ah, private variables don't work in families yet. Got some work to do there... sorry!
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests