death
How can I check if a int's hitpoints are equal to a certain amount?
maybe:
if(&hitpoints==&int, 0);?
Thanks!
maybe:
if(&hitpoints==&int, 0);?
Thanks!
uhhh... ... ...
Do you mean this:
int &clife = sp_hitpoints(¤t_sprite, -1);
if (&clife == 10);
{
//the sprite with this script has 10 hp
}
Note: You can return values when using -1.
int &dinkhp = sp_hitpoints(1, -1);
int &spritespeed = sp_speed(¤t_sprite, -1);
Do you mean this:
int &clife = sp_hitpoints(¤t_sprite, -1);
if (&clife == 10);
{
//the sprite with this script has 10 hp
}
Note: You can return values when using -1.
int &dinkhp = sp_hitpoints(1, -1);
int &spritespeed = sp_speed(¤t_sprite, -1);
It is now painfully obvious you do not know a thing about programming. Download this it will help.
I already did. It didn't cover how to do an action if a sprite created by variables is not busy, or it's hp is 0. I know how to set the hp of the sprite, I just don't know how to freeze Dink or something when the sprite is dead. Also, I mean a sprite made by a local.
int &creature = create_sprite(0,0,0,0,0);
// sprite is created
sp_script(&creature, "creature");
creature.c :
void die(void)
{
//what happens when he is dead
}
You've got more procedures than talk / use / main
// sprite is created
sp_script(&creature, "creature");
creature.c :
void die(void)
{
//what happens when he is dead
}
You've got more procedures than talk / use / main