The Dink Network

Reply to Re: Mkbul's code error thread

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:
 
 
March 25th 2010, 01:45 PM
knightgl.gif
castman
Peasant He/Him Brazil
Some day I'll finish my mod... Some day... 
It plays the sound, however dink is not inwater!

Once the script reaches line 14 it goes to line 21, and then &splashing becomes 1

At line 41 the sound is played and after line 46 it returns to 37.

Unless you place a sprite with a script changing &splashing 1 into 0, the loop will keep running, and the sound playing.

I hope I'm not saying crap, I think you should surround the water with sprites scripted to change the &splashing varial, or this script will never reach line 48 and call the external procedure

EDIT: Sparrowhawk already said that and made an example script

void main (void)
{
  sp_nodraw(&current_sprite, 1);
  sp_touch_damage(&current_sprite, -1);
}
void touch (void)
{
  &splashing = 0;
}


I've just add the sp_nodraw, so this sprite will be invisible without setting 'invible' on editor.