📧 Message Board Archive

&Story and visions
I'm trying to use the visions correct but it never seems to work. As the DINKC Reference v2.5 says, the command force_vision(); doesn't work. Here's what I want to do: there's a script named s1-cave.c (on vision 0) and vision 1 and 2 with objects. When Dink enters the screen, it should look to &story and then use the correct vision. If &story is lower of equal to 2, it should use vision 2, if &story is 3, it should use vision 1. What's the code I should place in s1-cave.c?



Simeon
Re: &Story and visions
: I'm trying to use the visions correct but it never seems to work. As the DINKC Reference v2.5 says, the command force_vision(); doesn't work. Here's what I want to do: there's a script named s1-cave.c (on vision 0) and vision 1 and 2 with objects. When Dink enters the screen, it should look to &story and then use the correct vision. If &story is lower of equal to 2, it should use vision 2, if &story is 3, it should use vision 1. What's the code I should place in s1-cave.c?

: Simeon



First of all, is s1-cave.c attached to the room itself? If it's on a sprite this won't work. But anyway, here's what it should say.



void main( void )

{

   if (&story == 3)

       &vision = 1;

   else

       &vision = 2;

}



Also, if the script needs to do anything else, just make sure not put put anything that causes a delay (such as [i]say_stop[/i] or [i]wait[/i])before setting &vision.
Re: &Story and visions
: First of all, is s1-cave.c attached to the room itself? If it's on a sprite this won't work. But anyway, here's what it should say.

: void main( void )

: {

:   if (&story == 3)

:   &vision = 1;

:   else

:   &vision = 2;

: }

: Also, if the script needs to do anything else, just make sure not put put anything that causes a delay (such as [i]say_stop[/i] or [i]wait[/i])before setting &vision.



So that's the problem! I had the script attached to a bush on the screen, the script wasn't really the problem but I just asked it here to see if I did it correct, heh, guess not ;)



Simeon