Page 1 of 1
change parent bug

Posted:
Sun Dec 02, 2007 3:30 pm
by j2graves
for making the screen follow the player I'm using the "centerview" way of doing it. however, when I make the player jump on a moving platform and use a "change parent" action, the view moves back to the place it was created until the player jumps off and the parent changes back to none. what can I do?
Re: change parent bug

Posted:
Tue Dec 04, 2007 5:46 pm
by speckford123
well i dont know that bug, but instead of centerview you could use a function on the view in draw actor like:
if(x<player.x)xvelocity=distace(x,y,player.x,player.y)*0.5;
if(x>player.x)xvelocity=-distace(x,y,player.x,player.y)*0.5; // I use * because / can cause errors when dividing 0
if i find an answer to your problem ill let you know
if not someone else will most likely help you soon.
Re: change parent bug

Posted:
Sat Dec 15, 2007 9:38 am
by j2graves
well thanx anyway. +1.
can anyone answer my original question?
Re: change parent bug

Posted:
Sat Dec 15, 2007 10:00 am
by Bee-Ant
Why you dont use StopRight,StopLeft,StopTop,StopBottom???like in caveman???
Re: change parent bug

Posted:
Sat Dec 15, 2007 10:34 am
by j2graves
because once the player gets too far out of the view, it will stop following.
Re: change parent bug

Posted:
Sat Dec 15, 2007 10:42 am
by Bee-Ant
Did you make it like this...
Re: change parent bug

Posted:
Sat Dec 15, 2007 10:44 am
by j2graves
no but I'll try it.