The Dink Network

Random Bug with sp_base_idle

May 12th, 06:45 PM
anon.gif
Bugs_Kill_Me
Ghost
 
Hello,

I've come upon this strange problem when trying to code a cutscene. I had to set Dink's Base_Idle to -1, so I can control his pseq frame by frame, manually:

 sp_dir(1, 2);
 say_stop("Ugh, I'm not feeling very well..", 1);

 wait(500);
 sp_base_idle(1, -1);
 wait(1);
 sp_pseq(1, 436);
 sp_pframe(1, 1);

 wait(100);
 sp_pframe(1, 2);
 wait(100);
 sp_pframe(1, 3);
 wait(100);


That worked. Then I added new things down the script (not related at all with that bit above), tested the cutscene again to see the new bits I had added, but this time the game 'ignored' the sp_base_idle(1, -1) line, and applied all the pframe commands to the sequence 12 (Dink's Idle Seq). I tried it again, same thing. Didn't work

I've tried removing the wait(1), no changes.

I've then flipped the base_idle and pseq lines, like this, cuz that's similar to how it is on dinfo.c :
 wait(500);
 sp_pseq(1, 436);
 sp_base_idle(1, -1);
 sp_pframe(1, 1);


It worked.
Not trusting the result, I closed the game, restarted it (without touching the script) and it wouldn't work anymore.

Does anyone know anything about this?

I can come up with alternative ways to do the same cutscene, that's not the point. If this had never worked, I'd just ignore the issue and use an alternative, but since it works sometimes and doesn't work at others, it really is bugging me. I just want to know what is happening there.

May 13th, 12:08 AM
pq_knight.gif
ExDeathEvn
Peasant Male New Zealand xbox steam
Don't look at me, I'm a ghost 
Are you only changing Dink's base idle during the cutscene or consistently afterwards?
If not you could always do something like this.

//Get Dink's coordinates
int &getx = sp_x(1, -1);
int &gety = sp_y(1, -1);

//And spawn a fake Dink for the cutscene that you can control instead
sp_nodraw(1, 1);
int &manualdink = create_sprite(&getx, &gety, 0, 436, 1)
sp_pframe(&manualdink, 1);


Then proceed as you have done, and to kill it off
//Kill the fake and redraw the real
sp_nodraw(1, 0);
sp_active(&manualdink, 0);


Edit: thinking further, it might be best if you do it this way considering Dink is consistently Brain 1, whereas you can use a different brain on a fake that you control the frame or sequence for manually.
May 14th, 06:52 AM
dinkdead.gif
I vaguely remember coming across something similar before so (if I remember!) I'll see if I can find some record of it later. Can't remember if I sorted it or just did it in a different way.

Anyway as to the general issue of things working, then not working, then working again with seemingly no rhyme nor reason to it, then all I can say is welcome to the world of DinkC I'm having exactly the same thing in a different context and it's driving me mad.

As ExD says, if you're playing with Dink's animations during a cutscene, just hide him and use a fake instead.