i create an actor, it can move by left n right key, but i dunno how to make background follow the actor

i try to use wire frame region actor and add collision event to them but still not work, i dunno why

phyzix5761 wrote:If you just want a basic follow you have to parent the background to your actor. Go into the actor control menu for the background and change parent to the actor you want the background to follow.
xscreen=view.width/2; // this will center the background actor to the view
yscreen=view.height/2;
switch(STATE)
{
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
if(yvelocity>0)
{
// ChangeAnimation("Event Actor", "r_fall", NO_CHANGE);
// STATE=6;
}
break;
case 5:
if(yvelocity>0)
{
// ChangeAnimation("Event Actor", "l_fall", NO_CHANGE);
// STATE=7;
}
break;
case 6:
break;
case 7:
break;
// turning animation
}
if(yvelocity>3)
{
if(STATE%2==1)
{
ChangeAnimation("Event Actor", "l_fall", NO_CHANGE);
STATE=7;
}
else
{
ChangeAnimation("Event Actor", "r_fall", NO_CHANGE);
STATE=6;
}
}
yvelocity++;
dzuncoi wrote:arrrrrrrrr thank u guy, i got itjust need to parent 2,3 actor, so simple
can i ask some more questions![]()
anyone help me explain these code plz
- Code: Select all
switch(STATE)
{
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
if(yvelocity>0)
{
// ChangeAnimation("Event Actor", "r_fall", NO_CHANGE);
// STATE=6;
}
break;
case 5:
if(yvelocity>0)
{
// ChangeAnimation("Event Actor", "l_fall", NO_CHANGE);
// STATE=7;
}
break;
case 6:
break;
case 7:
break;
// turning animation
}
if(yvelocity>3)
{
if(STATE%2==1)
{
ChangeAnimation("Event Actor", "l_fall", NO_CHANGE);
STATE=7;
}
else
{
ChangeAnimation("Event Actor", "r_fall", NO_CHANGE);
STATE=6;
}
}
yvelocity++;
explain me what it's for n meaning of the commands clearly, thank very much
switch(STATE)
case 0:
break;
case 1:
break;
case 0: // switch r value to 0
r=0;
state=1;
break;
case 0: // Right Stand to Right Run
ChangeAnimation("Event Actor", "Right Run", FORWARD);
state=2;
break;
case 1: // Left Stand to Left Run
ChangeAnimation("Event Actor", "Left Run", FORWARD);
state=3;
break;
case 4:
if(yvelocity>0)
{
// ChangeAnimation("Event Actor", "r_fall", NO_CHANGE);
// STATE=6;
}
break;
case 5:
if(yvelocity>0)
{
// ChangeAnimation("Event Actor", "l_fall", NO_CHANGE);
// STATE=7;
}
break;
if(yvelocity>3)
{
if(STATE%2==1)
{
ChangeAnimation("Event Actor", "l_fall", NO_CHANGE);
STATE=7;
}
else
{
ChangeAnimation("Event Actor", "r_fall", NO_CHANGE);
STATE=6;
}
}
yvelocity++;
but it doesn't work, there r some positions that make my player fall through the ground, anyone can help me fix itPhysicalRespons(MOVE_EVENT_ACTOR_ONLY, USE_CALCULATED_MASS, 1.00, 1.00, 0.00, 0.00);
Users browsing this forum: No registered users and 1 guest