Prowler Productions
  Dink Smallwood Forum
  Preload_seq(WON'T WORK!!);

Post New Topic  
profile | register | faq

Author Topic:   Preload_seq(WON'T WORK!!);
FF4LIFE posted 07-11- 01:20 AM CT (US)   Click Here to See the Profile for FF4LIFE   Click Here to Email FF4LIFE  
I have an intro right after the loading screen and its real cool and only takes like 5 seconds...if it works. As is, when it goes it takes about a minute. Its 50 frames or so...i figure, i'll use that famous preload_seq command. But bah, it doesn't work. Is there some special way to use it or what? Here's what i have:

int &logo = create_sprite(98, 23, 0, 35, 1);
sp_que(&logo, 1500);
sp_noclip(&logo, 1);

Say_xy("`%PRELOADING...", 0, 390);
preload_seq(35);
Say_xy("`%DONE.", 0, 390);


sp_pframe(&logo, 2);
wait(150);
sp_pframe(&logo, 3);
wait(150);

It goes on. I had to do it this way because for some reason it wouldn't work when i gave it a brain....oh well, this way i can make it take longer on some frames, making it cooler. But it doesn't preload, so each frame is about a second. Please help! Its annoying as hell!

FF4LIFE posted 07-11- 02:45 AM CT (US)     Click Here to See the Profile for FF4LIFE  Click Here to Email FF4LIFE     
And another thing. I can't remember who the nice fella was that gave me that supervariable script, but i'm trying to use it, and it worked at first, but now whenever i put it somewhere it ends up spewing out random numbers. Did you ever experience problems like this?
Drakeman posted 07-11- 07:45 AM CT (US)     Click Here to See the Profile for Drakeman  Click Here to Email Drakeman     
It wouldn't work with brain 7? Strange. It sounds like what you're trying to do is something like the exploding loading screen in SOB.

I preloaded the graphics before loading all the sounds in the Start.c file... then ran

playsound(84, 11025, 0, 0, 0);
int &burst = create_sprite(320, 240, 7, 929, 1);
sp_que(&burst,20000);
sp_noclip(&burst, 1);
sp_seq(&burst, 929);
sp_timing(&burst, 33);

Because the sprite is so big (the size of the screen) it can be clunky on some computers, but it wasn't too bad. 30 odd frames (by memory??) in the sequence.

redink1 posted 07-11- 08:25 AM CT (US)     Click Here to See the Profile for redink1  Click Here to Email redink1     
"But it doesn't preload..."

I always thought that once you viewed any sprite in a sequence, it would automatically load the sequence. So the create_sprite command effectively already loaded the sequence, right? (I may be completely wrong this this concept, so beware :)

As for the supervariable script, yeah I've had plenty of problems like that. I got around them somehow... though I forget now of course (and I'm not at the computer with my code). I think the problems stem from constantly re-writing local variables, and it gets confused somehow (I implemented kill_this_task() or something like that). Hopefully, I'll have time tonight to take a look at my code tonight and post another reply. Though the supervars are used at least 3 times in fiat, and I haven't had any problems recently (except once, which I hope is a fluke), so I should be able to find out how. I even built in error-protection somewhat, where a dialog box will pop-up if the supervar is messed up.

Oh, in your D-Mod (from what I've read in these forums, it will need a lot of variables and such), you might find some value in coupling supervars with Paul's Script Trick (download Red Shield Unfinished to see Paul's Script Trick in use). That way, you have a possible 76032 (map screens * sprites per screen) supervars you can use. And considering you can store 10 minivars in each supervar, thats 760320, add the 200 globals (possible supervars of 10 minvars each = 2000), and you get 762320 total possible variables :) Even without the supervars (which have proven difficult) you could still have 76232 variables.

FF4LIFE posted 07-11- 02:15 PM CT (US)     Click Here to See the Profile for FF4LIFE  Click Here to Email FF4LIFE     
Wow, thats a lot..hehe. Hrm, i'll look at it, but i don't think i'll need it. I'm going to end up using about 10 supervariables and then after that base it mostly off of story, so it won't be too bad. So, is 9 digets the max you can have on a global or what?

I'll try to use kill_this_task and see if it works..

Hrm, about the intro, yeah, i guess it is like in sob :) But maybe then what the preload seq needs is time, so if i put it before the sounds... And i have no idea why brain 7 wouldn't work, but i don't mind too much. What i hate is having to test it, because my game takes like 10 minutes to load!

Phoenix posted 07-11- 05:08 PM CT (US)     Click Here to See the Profile for Phoenix  Click Here to Email Phoenix     
I see one thing you've done wrong...

You used the preload_seq(blah);
after the create_sprite(blah);
and then it's no use. You must preload BEFORE making a sprite, not after. Get it? :)

And another thing to keep in mind, if you load a sequence with the "load_sequence_now" function, it will automatically preload during the loading of dink. :)

I hope that helps.

-Phoenix :)

FF4LIFE posted 07-12- 11:05 PM CT (US)     Click Here to See the Profile for FF4LIFE  Click Here to Email FF4LIFE     
Load_sequence_now eh? What's that usualy used for?
FF4LIFE posted 07-13- 01:14 AM CT (US)     Click Here to See the Profile for FF4LIFE  Click Here to Email FF4LIFE     
Oh, the ini file thingies. Preload when dinks loaded eh? I'll try that. I'll also try putting my preload WAY infront of the actual sprite creation

Post New Topic  Post Reply
Hop to:


Contact Us | Prowler Productions

Powered by: Ultimate Bulletin Board, Freeware Version 5.10a
Purchase our Licensed Version- which adds many more features!
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 2000.