The Dink Network

death

June 7th 2003, 08:58 AM
pillbug.gif
How can I check if a int's hitpoints are equal to a certain amount?

maybe:
if(&hitpoints==&int, 0);?

Thanks!
June 7th 2003, 09:13 AM
old.gif
uhhh... ... ...

Do you mean this:

int &clife = sp_hitpoints(&current_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(&current_sprite, -1);
June 7th 2003, 09:14 AM
knightg.gif
WC
Peasant He/Him United States
Destroying noobs since 1999. 
It is now painfully obvious you do not know a thing about programming. Download this it will help.
June 7th 2003, 09:15 AM
pillbug.gif
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.
June 7th 2003, 10:54 AM
old.gif
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
June 7th 2003, 11:23 AM
pillbug.gif
Thanks!