Events by variable value within family

Post your own tutorials, guides and demos.

Post » Fri Jan 30, 2009 7:00 am

I'm not sure why this doesn't work.

In the attached cap, the grey skeletons have MoveType=1, while the red skeletons have MoveType=2. MoveType=1 means they'll walk till they reach the end of the platform, then turn around. MoveType=2 means that it'll only turn around once it hits a wall (I've given the red skeleton gravity=0 for floating purposes).

Use "Destroy on startup" to delete all the grey skeletons, and the red ones work perfectly. Do the same for the red skeletons, and the grey ones work perfectly. Have both in the same sheet, and they start glitching out.

Help?
B
2
G
3
Posts: 71
Reputation: 992

Post » Fri Jan 30, 2009 10:18 am

+Pick FamilyName by FamilyName.Value('MoveType')=1
> Do unspeakable horrors to family members with MoveType set to 1
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Fri Jan 30, 2009 4:03 pm

Thank you for pointing out the "Pick" condition, I hadn't realized its existence.

Unfortunately, it does not fix the problem. Exactly the same behavior occurs.
B
2
G
3
Posts: 71
Reputation: 992

Post » Fri Jan 30, 2009 4:23 pm

I think there might be a bug with remembering picked objects in sub-events. Maybe. I changed the events to this and it works fine:



Those events do exactly the same thing as yours do, just without sub-events. I can't quite tell if it's a bug or not though, it's early and I haven't had my coffee yet :P
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Fri Jan 30, 2009 5:19 pm

If you have to do all that, it's got to be a bug somehow... sheesh!
B
2
G
3
Posts: 71
Reputation: 992

Post » Fri Jan 30, 2009 6:17 pm

This is odd. Making the above changes, to the walkers only, does fix the problem in the example cap I uploaded. Exporting those changes to my main project does NOT fix the problem. Exact same code. I also converted the sub-events of the floater group (not needed in the cap above) and it still doesn't work.
B
2
G
3
Posts: 71
Reputation: 992

Post » Fri Jan 30, 2009 7:59 pm

Bah. Swapping the order so that the floater group is above the walker group fixes it in my main project, yet in the test cap the order makes no difference. I don't get this. At least it's working... for now.
B
2
G
3
Posts: 71
Reputation: 992


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 0 guests