Page 1 of 1
Following parents, again!
Posted:
Tue Nov 01, 2005 5:52 pm
by CdaMarinersFan
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?)
Posted:
Thu Nov 03, 2005 12:06 pm
by makslane
move too slowly
How do you move the parent?
Posted:
Thu Nov 03, 2005 5:39 pm
by CdaMarinersFan
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...
Posted:
Fri Nov 04, 2005 7:43 pm
by makslane
Sorry, I didn't understand the problem
Posted:
Mon Nov 07, 2005 1:07 am
by CdaMarinersFan
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.
Posted:
Mon Nov 07, 2005 5:02 pm
by makslane
Your x, y position will be relative to the parent.
Posted:
Tue Nov 08, 2005 4:35 am
by CdaMarinersFan
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.