The Dink Network

Reply to 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 29th 2006, 04:38 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
Ive made a script for an exploding barrel. This is as in you lite it and it explodes. I've come across some trouble regarding coordinates of the spark though. The first coordinate works. That's the one where the sprite is made btw, but after that, it jumps far to the left. I think I've done my coordinates right, so I can't find the problem. Here's the part of my script that's causing trouble:

Edit: By far left, I do not mean off screen.

//Excerpt from script

int &fsave_x = sp_x(&current_sprite, -1);
int &fsave_y = sp_y(&current_sprite, -1);

//frame 1 -------------------------------------------------------------------------------------------------]
&fsave_x -= 13 ;
&fsave_y -= 30;

//create the spark
int &spark = create_sprite(&fsave_x, &fsave_y, 6, 166, 1);
sp_seq(&spark, 166);
sp_que(&spark, 10001);

//reset the variable
&fsave_x += 13 ;
&fsave_y += 30;

wait(500);

//frame 2 -------------------------------------------------------------------------------------------------]
sp_pframe(&current_sprite, 2);
&fsave_x -= 13;
&fsave_y -= 35;

//move spark
sp_x(&spark, &fsave_x);
sp_x(&spark, &fsave_y);

//reset the variable
&fsave_x += 13;
&fsave_y += 35;

wait(500);

//frame 3 -------------------------------------------------------------------------------------------------]
sp_pframe(&current_sprite, 3);
&fsave_x -= 10;
&fsave_y -= 35;

//move spark
sp_x(&spark, &fsave_x);
sp_x(&spark, &fsave_y);

//reset the variable
&fsave_x += 10;
&fsave_y += 35;

wait(500);

//frame 4 -------------------------------------------------------------------------------------------------]
sp_pframe(&current_sprite, 4);
&fsave_x -= 6;
&fsave_y -= 32;

//move spark
sp_x(&spark, &fsave_x);
sp_x(&spark, &fsave_y);

//reset the variable
&fsave_x += 6;
&fsave_y += 32;

wait(500);

//frame 5 -------------------------------------------------------------------------------------------------]
sp_pframe(&current_sprite, 5);
&fsave_x -= 3;
&fsave_y -= 33;

//move spark
sp_x(&spark, &fsave_x);
sp_x(&spark, &fsave_y);
wait(500);

//blow up time !!
goto blowup;