The Dink Network

Problems With Tree Burning Sequence

December 25th 2009, 06:10 PM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
Something's messing up, I'm not quite sure what it is, even though I've investigated thouroughly, but here's the problem:
Frames 1 and 2 of the Burning Tree sequence are messing up. Instead of a partially-burned tree, it shows frame 4 of the dink/sword/hit dir8 sequence, which is frame 4 of seq 108. The thing is, it doesn't show it if I haven't armed a sword. But as soon as I arm one, from then on, despite whether or not I disarm it, frames 1 and 2 of the burning tree sequence, show frame 4 of seq 108, rather than frames 1 and 2 of seq 20.
I'm pretty sure it's not in the dink.ini, as I've tried backing mine up and replacing it with the original. I don't think it's in any of my sword item scripts, as I've tried simply using the original sword item scripts as well, but it does it there too.

I'm sorry if I haven't given much info for you all to try and decipher my problem, but this is seriously pissing me off. So if anyone's had this problem before, or if it's common and you know how to fix it, help would be much appreciated.
December 25th 2009, 06:28 PM
burntree.gif
Fireball5
Peasant He/Him Australia
Let me heat that up for you... 
Seems to me like a graphic loading problem... Maybe the burning trees load their graphics, then the sword loads its own graphics over the top without the trees reloading? I don't know, but it could be worth checking out how the tree gets the burning graphics.
December 25th 2009, 06:35 PM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
Dink.ini line for burning trees:
load_sequence_now graphics\lands\trees\treefire\tree-f 20 35 81 196 -14 -4 16 17

that's all i found that the ini had to do with it.

Ini lines for sword:
load_sequence_now graphics\dink\sword\hit\d-sa2- 102 75 52 92 -23 -12 24 11
load_sequence_now graphics\dink\sword\hit\d-sa4- 104 75 74 90 -23 -13 23 14
load_sequence_now graphics\dink\sword\hit\d-sa6- 106 75 33 92 -18 -14 18 10
load_sequence_now graphics\dink\sword\hit\d-sa8- 108 75 46 109 -17 -16 17 10
set_frame_special 102 3 1
set_frame_special 104 3 1
set_frame_special 106 3 1
set_frame_special 108 3 1

set_frame_delay 102 2 100
set_frame_delay 104 2 100
set_frame_delay 106 2 100
set_frame_delay 108 2 100


arm() procedure from my sword script:
void arm(void)
{
//sword range
sp_distance(1, 50);
sp_range(1, 40);
//sword strength added
&strength += 5;

sp_attack_hit_sound(1, 10);
sp_attack_hit_sound_speed(1, 8000);
init("load_sequence_now graphics\dink\sword\walk\d-sw1- 71 43 64 69 -14 -10 14 10");
init("load_sequence_now graphics\dink\sword\walk\d-sw2- 72 43 35 70 -21 -10 19 10");
init("load_sequence_now graphics\dink\sword\walk\d-sw3- 73 43 28 69 -13 -9 13 9");
init("load_sequence_now graphics\dink\sword\walk\d-sw4- 74 43 66 75 -14 -12 20 12");

init("load_sequence_now graphics\dink\sword\walk\d-sw6- 76 43 27 69 -23 -10 23 10");
init("load_sequence_now graphics\dink\sword\walk\d-sw7- 77 43 38 94 -20 -10 20 10");
init("load_sequence_now graphics\dink\sword\walk\d-sw8- 78 43 30 96 -15 -12 15 12");
init("load_sequence_now graphics\dink\sword\walk\d-sw9- 79 43 31 80 -13 -9 13 9");

init("load_sequence_now graphics\dink\sword\idle\d-si2- 12 250 74 73 -17 -12 16 9");
init("load_sequence_now graphics\dink\sword\idle\d-si4- 14 250 57 103 -11 -12 16 10");
init("load_sequence_now graphics\dink\sword\idle\d-si6- 16 250 30 92 -15 -9 11 9");
init("load_sequence_now graphics\dink\sword\idle\d-si8- 18 250 35 106 -15 -12 15 9");

init("load_sequence_now graphics\dink\sword\hit\d-sa2- 102 75 52 92 -23 -12 24 11");
init("load_sequence_now graphics\dink\sword\hit\d-sa4- 104 75 74 90 -23 -13 23 14");
init("load_sequence_now graphics\dink\sword\hit\d-sa6- 106 75 33 92 -18 -14 18 10");
init("load_sequence_now graphics\dink\sword\hit\d-sa8- 108 75 46 109 -17 -16 17 10");
int &basehit;
}


It all looks fine to me, from what my limited knowledge can tell, it should work.
December 25th 2009, 06:39 PM
spike.gif
This sounds like the classic init() bug... The graphic that has the most frames should be loaded first in dink.ini, or weirdness like that may occur.
December 25th 2009, 06:42 PM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
So what exactly do you propose I do? Load the burning trees first?

EDIT: Aha!! It's fixed! Thank you, scratcher, I realised you meant I should place the sword loading lines before the burning trees.
December 25th 2009, 06:55 PM
spike.gif
The burning tree is probably not really related... Are the sword graphics loaded first in dink.ini? The original code looks like this:
load_sequence_now graphics\dink\sword\hit\d-sa2- 102 75 52 92 -23 -12 24 11
load_sequence_now graphics\dink\sword\hit\d-sa4- 104 75 74 90 -23 -13 23 14
load_sequence_now graphics\dink\sword\hit\d-sa6- 106 75 33 92 -18 -14 18 10
load_sequence_now graphics\dink\sword\hit\d-sa8- 108 75 46 109 -17 -16 17 10

load_sequence_now graphics\dink\hit\normal\ds-h2- 102 75 60 72 -19 -9 19 9
load_sequence_now graphics\dink\hit\normal\ds-h4- 104 75 61 73 -19 -10 19 10
load_sequence_now graphics\dink\hit\normal\ds-h6- 106 75 58 71 -18 -10 18 10
load_sequence_now graphics\dink\hit\normal\ds-h8- 108 75 61 71 -19 -10 19 10

Switching their places might seem insignificant, but it's really not.
December 26th 2009, 08:38 PM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
Beforehand, the burning tree was loaded first, I've switched them around, and now it works perfectly.