Posted By: DAVIDMORETON
player problem - 09/25/09 11:16
Can anyone help please?
I need to 'call' the player in a function such that it will follow the platform it is standing on, simple example below:-
Function moveit
{
while (platform.x<200)
{
platform.x+=2*time;
player.x+=2*time;
wait(1);
}}
Result:- empty pointer in moveit: player.x+=2*time;
I can't seem to find a way to call the player in a function as it has already had it's action assigned, so I can't use 'entity* player'
Is there a way to do this?
yours hopefully, David
Top
I need to 'call' the player in a function such that it will follow the platform it is standing on, simple example below:-
Function moveit
{
while (platform.x<200)
{
platform.x+=2*time;
player.x+=2*time;
wait(1);
}}
Result:- empty pointer in moveit: player.x+=2*time;
I can't seem to find a way to call the player in a function as it has already had it's action assigned, so I can't use 'entity* player'
Is there a way to do this?
yours hopefully, David
Top