Reply to Re: how to script dead men
If you don't have an account, just leave the password field blank.
You could always you the editor_seq trick.
Something like this:
void main ( void )
{
int &ed = sp_editor_num(¤t_sprite);
int &dead = editor_seq(&ed, -1);
if (&dead == 1)
{
//be dead
} else
{
//be alive
}
}
void die ( void )
{
editor_seq(&ed, 1);
}
The only catch is that the corpse would warp back to the place the guy started. You could use editor_seq and editor_frame to store the X and Y he was killed at if you think it's worth the trouble, btu be aware that editor_frame onyl goes up to 255, so even if that's Y, you'd have to cut the number in half before storing it and double it before using it.
Something like this:
void main ( void )
{
int &ed = sp_editor_num(¤t_sprite);
int &dead = editor_seq(&ed, -1);
if (&dead == 1)
{
//be dead
} else
{
//be alive
}
}
void die ( void )
{
editor_seq(&ed, 1);
}
The only catch is that the corpse would warp back to the place the guy started. You could use editor_seq and editor_frame to store the X and Y he was killed at if you think it's worth the trouble, btu be aware that editor_frame onyl goes up to 255, so even if that's Y, you'd have to cut the number in half before storing it and double it before using it.