The Dink Network

add_exp display issue

August 23rd 2006, 12:41 PM
fairy.gif
Arik
Peasant He/Him
 
O.K, I'm using add_exp in the die sequence for my monsters for my monsters because the spells I'm using use the hurt command. For my slimes and pillbugs the experience number displays appear above the monster. For the boncas, however, it seems to show up at a seemingly random place on the screen whenever I kill one. Anyone know what might be causing this? I can post the scripts up if anyone thinks it might help.
August 23rd 2006, 04:17 PM
fairy.gif
Arik
Peasant He/Him
 
Addendum - on closer inspection, it isn't even granting the amount of experience it's supposed to (30), instead pulling a seemingly random number between 4 and 20 out of the air. On even closer inspection, I have a strong suspicion that this number may actually be the number of active sprites on screen. I get the feeling this ought to tell me more about what is causing the bug than it does.
August 24th 2006, 06:13 AM
fairy.gif
Arik
Peasant He/Him
 
Apologies - i hadn't used the command properly. Argh.

Now if only I can figure out what the hell's going on with my magic then I'll be rocking.
August 24th 2006, 12:49 PM
girl.gif
joshriot
Peasant They/Them United States
keep it real 
i dont know if it will help you at all or not but i used the hurt command to deal damage with my barbeque flamethrower thing
August 25th 2006, 01:45 PM
knightg.gif
cypry
Peasant He/Him Romania
Chop your own wood, and it will warm you twice. 
I don't know if this will help, but you could use a small trick, to avoid using the sp_exp command.

int &monsterx = sp_x(&missile_target,-1);
int &monstery = sp_y(&missile_target,-1);
int &bang = create_sprite(&monsterx,&monstery,0,0,0);
sp_nodraw(&bang,1);
sp_strength(&bang,20);//set here the damage
sp_brain(&bang,17);

This will create an invisible projectile, that will hurt the monster, and if the monster is hurt by this, he will know dink hit him.
August 25th 2006, 06:06 PM
fairy.gif
Arik
Peasant He/Him
 
Sorry I didn't make it clear in my last post - I fixed the experience error, it was a pretty dumb typo.

Of course, if anyone is able to think of why a fireball would detonate right next to you without apparently hitting anything if you, say, map it to the attack button and start chucking them all over the place (generally it happens after killing something), let me know! I'm going to be AFK for about a week though.
August 25th 2006, 06:11 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
A screw-up with &save_x, &save_y, &missle_source and &missile_target, maybe?

&enemy_sprite is 1 if a monster is hit by a missile. You'll want &missle_source to get the missile number.

Beh, that's everything I can think of right now.