Pac-man like Lives System

Game Editor comments and discussion.

Re: Pac-man like Lives System

Postby GuybrushThreepwood » Sun Dec 25, 2011 12:25 am

Ok, for the random choice picking part, I just directly copied that code. Now my ghost moves to the node, with the sw_intersection animation, but when the ghost gets there, he still goes in any direction. What am I doing wrong?
Pirate: You fight like a diary farmer!
Guybrush: How appropriate, you fight like a cow!
User avatar
GuybrushThreepwood
 
Posts: 94
Joined: Sun Jul 06, 2008 12:23 pm
Location: Melee Island
Score: 2 Give a positive score

Re: Pac-man like Lives System

Postby skydereign » Sun Dec 25, 2011 12:32 am

Two possible things. One, you need to make sure the direction that the ghost is moving is set with dir. I forgot to add that, but essentially something like this.
ghost -> Create Actor -> Script Editor
Code: Select all
dir=0;
directional_velocity=2;
angle=0;

That way the intersection code will know what direction the ghost was actually moving in. Another possible problem is that the speed of the actor does not align the nodes but the symptoms would be slightly different. One other adjustment you need to do is make dir an actor variable, instead of a global variable. That way you can have clones, instead of just a single ghost.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Pac-man like Lives System

Postby GuybrushThreepwood » Sun Dec 25, 2011 3:22 am

Yup. That did it. I changed the velocity to 2, and it worked just fine :mrgreen:
Thanks for all your help!
Pirate: You fight like a diary farmer!
Guybrush: How appropriate, you fight like a cow!
User avatar
GuybrushThreepwood
 
Posts: 94
Joined: Sun Jul 06, 2008 12:23 pm
Location: Melee Island
Score: 2 Give a positive score

Previous

Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest