Following parents, again!

Talk about making games.

Following parents, again!

Postby CdaMarinersFan » Tue Nov 01, 2005 5:52 pm

Uh oh, I've tried to fix my glitch on following a parent after being destroyed. I've decided to destroy my parent actor once the child actor was destroyed, instead of moving the parent actor to the correct spot once the child was destroyed, but sometimes the parent would move too slowly, and move the child off of it's correct spot. So, could anyone help me with this problem (again?)
Image
User avatar
CdaMarinersFan
 
Posts: 109
Joined: Wed May 11, 2005 11:20 pm
Score: 0 Give a positive score

Postby makslane » Thu Nov 03, 2005 12:06 pm

move too slowly


How do you move the parent?
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby CdaMarinersFan » Thu Nov 03, 2005 5:39 pm

On key down (P1-a)(P2-k)(P3-[left])(P4-4)-Script

Code: Select all
x = x - 6;


On key down (P1-d)(P2-;)P3-[right](P4-6)-Script
Code: Select all
x = x + 6;

Okay, that's it...
Image
User avatar
CdaMarinersFan
 
Posts: 109
Joined: Wed May 11, 2005 11:20 pm
Score: 0 Give a positive score

Postby makslane » Fri Nov 04, 2005 7:43 pm

Sorry, I didn't understand the problem
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby CdaMarinersFan » Mon Nov 07, 2005 1:07 am

Alright, in my game, IonSkiff Tournament, I have 4 ships & a docking station for each ship that looks like they move with their ship, but in my programming, I want the docking stations to move, and the ships would be the child actors to them. So when I'm talking about P1, I am talking about docking station for Player 1.
Image
User avatar
CdaMarinersFan
 
Posts: 109
Joined: Wed May 11, 2005 11:20 pm
Score: 0 Give a positive score

Postby makslane » Mon Nov 07, 2005 5:02 pm

Your x, y position will be relative to the parent.
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby CdaMarinersFan » Tue Nov 08, 2005 4:35 am

Okay, I put in some coding:

Code: Select all
On KeyDown (P1refueling)
x = x + 6;
Player1.x = Player1.x + 6;

Player1 no longer child of P1refueling


It follows now, but when the game starts up, it now wants to follow, but twice as fast, susceptible to being destroyed from hitting the ground.
Image
User avatar
CdaMarinersFan
 
Posts: 109
Joined: Wed May 11, 2005 11:20 pm
Score: 0 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest