The Dink Network

Reply to Re: exploding barrel trouble

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:
 
 
October 30th 2006, 09:13 PM
goblinm.gif
I had thought that the problem might be that the fireball changes sequences (goes to sequence 70) when it hits the thing. This is very, very odd. It looks as if &missle_source (lol, missle) "reverts" to -1. The whole system of variables having certain values in certain contexts is rather prone to bugs, especially if you try to do anything complicated.

Anyways, to improve upon cypry's idea, if the barrel sequence is XXX, you could add the following to the damage procedure of the fireball:

&target_pseq = sp_pseq(&missile_target, -1);
if (&target_pseq == XXX)
{
&target_pseq = sp_script(&missile_target, -1);
//You should probably use a custom variable for the following:
&target_gold = sp_gold(&missile_target, -1);
//^ if target's gold is 1, we will blow it up.
if (&target_gold == 1)
{
run_script_by_number(&target_pseq, "kaboom");
}
}

Then, in the barrel script, you would have a kaboom procedure to blow it up and add sp_gold(&current_sprite, 1) in the main procedure. There's probably a simpler way to do this, but I think this is the redink way.

There is a similar bug with the fireplace in VDC, but way more bizzare. This idea did not (entirely) fix it.