Page 1 of 1

Help with my game

PostPosted: Fri Aug 10, 2007 10:22 pm
by Astro Lemur
Sorry about the subject title.

In my game i want the charecter to be able to pick up and carry objects like rocks, but my code isnt working for me. I want the player to pick up the rock, and be able to set it down when there in the "base" region. Heres the code i have:

if (canpick == 1);
{
ChangeParent("Event Actor", "player");
MoveTo("Event Actor", 0.000000, -5.000000, 9999.000000, "player");
ChangeAnimation("player", "GuyCarry", FORWARD);
carry = 1;
}

if (canpick == 1 && incamp == 1);
{
MoveTo("Event Actor", 20.000000, 20.000000, 10.000000, "camp_region");
canpick=0;
}


Thanks!

PostPosted: Fri Aug 10, 2007 11:14 pm
by DilloDude
What is it doing?

PostPosted: Sat Aug 11, 2007 1:22 am
by pixelpoop
don't use a ";" until after the stuff in the if statement.

if (canpick == 1);
should be
if (canpick == 1)

I don't know if that will solve your problem but it is a start.

PostPosted: Sat Aug 11, 2007 4:01 am
by Astro Lemur
Thanks pixelpoop, it worked!