Brain 9 creature slots
I'm running short of sequences and I can't swap them ingame with init() for various reasons.
So, I have a few creature graphics I would like to use as brain 9 creatures, think pillbugs and slimes. They have the same graphics for each direction.
I would like to know if there's any way I can pull off only using 1 sequence slot instead of 10 for this.
Any help or tips or suggestions are welcome
So, I have a few creature graphics I would like to use as brain 9 creatures, think pillbugs and slimes. They have the same graphics for each direction.
I would like to know if there's any way I can pull off only using 1 sequence slot instead of 10 for this.
Any help or tips or suggestions are welcome

Erm... the only way that comes to mind is to fake a brain in their script with some sort of loop, and make them brain 6 while moving or something. If you have several loops running at once though it might slow everything down, plus you'd have a bit of trouble working in the fighting.
I did it once for a duck but that had several sequences and used sp_base_walk, not sure how it would work for this.
Not very helpful I guess, but can't think of an easy way right now
I did it once for a duck but that had several sequences and used sp_base_walk, not sure how it would work for this.
Not very helpful I guess, but can't think of an easy way right now

Well I actually worked on a loop in the main procedure to swap the frames manually and this works well. It gives a tad bit of slowdown, but it's manageable. The only thing that I can't figure out now is how to play the death sequence when it dies. The main procedure still continues looping during the death sequence that I start manually in the die procedure so the whole thing looks wacky :/
What about this?
EDIT: I don't know if if(sp_hitpoints(¤t_sprite, -1) < 1), works. xD
If it doesn't just set a local int to sp_hitpoints and check the variable in the if-statement.
void main(void) { loop: if(sp_hitpoints(¤t_sprite, -1) < 1) { itdied(); } //do stuff for movement and seq goto loop; } void itdied(void) { //play death animation and give exp return(); }
EDIT: I don't know if if(sp_hitpoints(¤t_sprite, -1) < 1), works. xD
If it doesn't just set a local int to sp_hitpoints and check the variable in the if-statement.
I am unable to test it at the moment, but at first sight there's 2 problems with that script.
1) With a frame delay in the loop it's possible the creature will die before the loop repeats, killing the sprite and thus the main procedure won't run.
2) Even if it does run, there could be a strange delay after you hit something that is supposed to die. Granted, this would be small
And as a final point, everything in the main procedure would have to be put in a seperate script to work around the known script interruption bug
I decided to cut a few of the normal Dink NPCs that I will most likely not use anyway to free up some ini space
Thanks for the suggestions though and if there are more, keep them coming^^
1) With a frame delay in the loop it's possible the creature will die before the loop repeats, killing the sprite and thus the main procedure won't run.
2) Even if it does run, there could be a strange delay after you hit something that is supposed to die. Granted, this would be small

And as a final point, everything in the main procedure would have to be put in a seperate script to work around the known script interruption bug

I decided to cut a few of the normal Dink NPCs that I will most likely not use anyway to free up some ini space

Alright, I've devised a plan to work with seq loading packages in the game. In other words, I'll be using a script to load graphics in and out as I need them, where I need them.
Now, I have one serious question about this. As some of you know the init() command needs to be used to replace sequences that have MORE frames than the one you're going to load with the command. Now, I can easily figure out which to load first in this way and that will work. But what I'm interested in knowing is, what happens when I change it back to the original sequence with the init() command? Will it work without issues, or will this lead to the init() problem because I'm now loading a sequence with less frames into one with more?
It's annoying that I'm scripting blindly atm because I don't have a compatible computer to test it with for the next few days. I would be forever grateful if someone took a minute to try this out
Now, I have one serious question about this. As some of you know the init() command needs to be used to replace sequences that have MORE frames than the one you're going to load with the command. Now, I can easily figure out which to load first in this way and that will work. But what I'm interested in knowing is, what happens when I change it back to the original sequence with the init() command? Will it work without issues, or will this lead to the init() problem because I'm now loading a sequence with less frames into one with more?
It's annoying that I'm scripting blindly atm because I don't have a compatible computer to test it with for the next few days. I would be forever grateful if someone took a minute to try this out

This goes right with attack-sequences of varying length, and they all use init(). I'm not sure why it would go wrong in other cases, as long as the first sequence that ever gets loaded (in dink.ini) has the most frames. As far as I know, things only break when you load something with Lots Of Frames into a sequence which was initially loaded with Fewer Frames.