The Dink Network

Reply to Re: damage

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
January 18th 2006, 04:00 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
It's a random number between 1/2 * &str and &str, where &str is the strenght.

int &damage;
int &crap;
&crap = sp_strength(&sprite, -1);
//use &strength if &sprite = 1
&crap / 2;
&damage = random(&crap, &crap);

Would be the DinkC code.

LATE ADDITION: In earlier versions of Dink (1.06 and 1.07) you can't use &str as a variable, becuase it would conflict with &strength. Just to warn you for the consequences.