The Dink Network

Reply to Re: Sound limit in DinkHD versus YOD

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:
 
 
February 18th, 06:18 AM
peasantmb.gif
yeoldetoast
Peasant They/Them Australia
Oh, NOW YOU'VE DONE IT! 
Looking through how missile_target works;

If a missile hits a sprite, and that destination sprite is set hard and has a script, missile_target will be set to 1 along with the enemy_sprite var. Then, if the missile sprite has a script, missile_target is set to the destination sprite, with enemy_sprite var set to 1 (player sprite), and then damage() is run in the missile script if it exists. If damage() runs, the default thwack, or a sprite's attack hit sound will not be played and the missile sprite won't be culled.

If the destination sprite is not set hard, missile_target will be set to zero, but the rest will be as above in terms of attack sounds and culling of missile sprite.

There's some more to it but I can't be bothered unravelling it right now. The main take-away is that a missile with a script that runs damage() prevents sprite attack hit sounds from being played, and that missile_target is often set to 1 or 0, and doesn't necessarily represent the most recent sprite on the receiving end of a missile.