The Dink Network

Reply to Damage Spell

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:
 
 
April 1st 2003, 07:05 PM
custom_odd.gif
Alright, I have this spell, it's really pretty simple, but I can't perfect it. It searches for things with the propper brain, then on them creates a sprite, a giant earth spike. Now, this all works fine, the problem is the damage. Right now, the script of the spike is as follows:

void main(void )
{
sp_range(&current_sprite, 30);
sp_brain(&current_sprite, 17);
playsound(6, 22050, 0,0,0);
sp_seq(&current_sprite, 37);
int &str = 5;
&str * &spell_level-earth;
sp_strength(&current_sprite, &str);
}

&spell_level-earth is a global, obviously it is the level of the spell, used to determine the damage.

Now, it'll do the propper damage, only problem, it does the propper damage EVERY FRAME. In Dink.ini I used the set_frame_special command to set the correct frame to damage. This works.. sorta.. Now it plays the hitting sound on that frame.. but all frames still damage. Now, is this just the brain of it? Because I like the brain, it makes it just loop then kills it. I don't want to just manually hurt the sprite with a hurt command line, because it's a radius thing, so I'd like it to also hit nearby things.

Does anyone see a reasonable solution to this? It is absolutely driving me insane...