Prowler Productions
  Dink Smallwood Forum
  Script problem...

Post New Topic  
profile | register | faq

Author Topic:   Script problem...
EP posted 01-22- 09:22 PM CT (US)   Click Here to See the Profile for EP   Click Here to Email EP  
A small problem which probably has a simple solution, but I'm too tired/lazy to work it out myself. Okay, I attach script#1 to sprite#1, and want sprite#2, which already has script#2 for it, to interrupt my conversation with sprite#1 with words of it's own. I would just spawn a script for sprite#2 in script#1 for sprite#1, but I don't know how to do this if sprite#2 already has a script. Any help (after you read this confusing post over a couple of times) would be appreciated. Thanks.
bdjnk posted 01-23- 12:43 AM CT (US)     Click Here to See the Profile for bdjnk  Click Here to Email bdjnk     
I had a similar problem and solved it by placing the following code it script#1:

int &sprite#2

&sprite#2 = create_sprite(368, 342, 0, 251, 1);
sp_brain(&sprite#2, 6);
sp_speed(&sprite#2, 1);
sp_timing(&sprite#2, 0);
//set starting pic
sp_pseq(&sprite#2, 251);
sp_script(&sprite#2, "script#2");

this way sprite#2 and is generated by script#1 whenever you want, you can also place it's use of the script whenever you want. the only prob will be that you are stopping script#1 by playing script#2 but i suppose you could have:

sp_script(¤t_sprite, "script#1")

at the end of script#2 and bypass the start of it by making it only occure once using a globial...

i am rambling. got to get some sleep.

Drakeman posted 01-23- 04:15 AM CT (US)     Click Here to See the Profile for Drakeman  Click Here to Email Drakeman     
use a global to store the sprite no. of sprite#2 so you can refer to it in sprite#1's script.

Check out the bar script in original Dink in Story 2, The one which has two dudes talking at the same time that Dink is talking to the bartender. And then they join in the conversation... (if I remember correctly).

Anyway I've used this method... I like it.

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.