So I've got my map all finnished and I'm working on the whole player getting killed and spawnpoints and such... but heres my problem:
I expect my player to die (healthbar reaches zero) and as a destroy actor event a "dying player" actor is created to fall to the ground (stop at animation finnish).
What actually happens is:
When my player dies, the "dying actor" is created, but you only see it for a split second because the view follows destroyed player actor back to x0y0 of the map in a quick swooshing motion. I realize that this happens because the view is parented to a nondrawn object that is set to match the players movement (with a controlled weight for smoother transitions).
So, I figured (trying things before I ask here based on my limited understanding of GE coding) I would make a variable(actor) called "Alive"
and on my player create-actor script would have "Alive = 1" and the destory actor event would have "Alive = 0". Easy enough? So then my actor that smoothly follows the player (which the view is parented to) would have a draw-actor script as:
-------------------
int weight = 10;
if(Alive=1)
{
x = ((weight -1)*x + player.x)/weight;
y = ((weight -1)*y + player.y -25)/weight;
}
if(Alive=0)
{
x = ((weight -1)*x + player_die.x)/weight;
y = ((weight -1)*y + player_die.y -25)/weight;
}
-------------------
"player_die" is the dead player actor btw... But this does nothing in changing which actor the "smoothly following non-drawn actor" follows. So, here I am again asking any of you smart people for help. Please.