Instance Variable not showing up in Scope

Bugs will be moved here once resolved.

Post » Mon Feb 13, 2012 3:19 pm

I want to use the instance variable in the set value action.

Add action
-> Family
-> Set Value
-> Can't type in the Family instance variable.

ex
Family variable health
Set value
Health - 1

I know I can just use the subtract but there are other things I might have to use this for.

Thanks.

On another note, perhaps it might be better use a different family icon.
B
69
S
11
G
6
Posts: 324
Reputation: 8,321

Post » Mon Feb 13, 2012 3:37 pm

Also I just found another related bug.

Add action
-> Family
-> Subtract from variable

Unfortunately it doesn't work.
B
69
S
11
G
6
Posts: 324
Reputation: 8,321

Post » Mon Feb 13, 2012 9:52 pm

Can you provide a .capx? Last I checked these were working OK.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Tue Feb 14, 2012 3:44 pm

http://dl.dropbox.com/u/49979009/Variable.capx

Add action
Set value
Heath + 1

**Health not recognized in scope**
B
69
S
11
G
6
Posts: 324
Reputation: 8,321

Post » Tue Feb 14, 2012 3:52 pm

Are you literally typing in: Health + 1 ?
You know instance variables have to be accessed with a dot?
These all work:
Self.Health
Sprite.Health
Family1.Health
if you just type in "Health" it will look for an event variable by that name, and none exists, so the error is correct.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Tue Feb 14, 2012 4:36 pm

Wow... I feel sheepish...

You might want to put a bubble around that if I got confused other people might too.
B
69
S
11
G
6
Posts: 324
Reputation: 8,321


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests