📧 Message Board Archive

My choice is buggy
No, I don't want a horse and carrige. I mean this script has a choice with title just like any other, but in play it only allows the first choice. Pressing down the arrow flickers on lower choice then returns up. What would cause that. The contents of 2nd choice?
Talk only?
Can choices be in talk proc. only or can choices be in main? and what others????????? thanks ric
Re: Talk only?
: Can choices be in talk proc. only or can choices be in main? and what others????????? thanks ric



Well, choices can be in talk and in main, this is an example for a person:



void main(void)

{

    if (&story == 1)

         {

         choice_start()

         "Choice 1"

         "Choice 2"

         "Leave"

         choice_end()



         if (&result == 1)

              {

              //code here

              }



         if (&result == 2)

              {

              //code here

              }

         }

}



void talk(void)

{

freeze(1)

freeze(&current_sprite)

    if (&story == 1)

         {

         choice_start()

         "Choice 1"

         "Choice 2"

         "Leave"

         choice_end()



         if (&result == 1)

              {

              //code here

              }



         if (&result == 2)

              {

              //code here

              }

         }

unfreeze(1)

unfreeze(&current_sprite)

}



Simeon
Re: My choice is buggy
: No, I don't want a horse and carrige. I mean this script has a choice with title just like any other, but in play it only allows the first choice. Pressing down the arrow flickers on lower choice then returns up. What would cause that. The contents of 2nd choice?



You need to set sp_touch_damage to 0 first. ;)
Re: My choice is buggy
: : No, I don't want a horse and carrige. I mean this script has a choice with title just like any other, but in play it only allows the first choice. Pressing down the arrow flickers on lower choice then returns up. What would cause that. The contents of 2nd choice?



: You need to set sp_touch_damage to 0 first. ;)



but it is the 2nd choice that makes the gold untouchable.( Take the gold)

           (leave the gold)

Should I make that the 1st. choice?
Doesn't it look o.k.?
( within "1gold")



void touch (void)

{

choice start()

"Take the gold"

"leave the gold"

choice end()

if (&result == 1)

 {

 //the 1gold stuff here and it work o.k.

 }

if (&result == 2)

 {

 sp_touch_damage(&current_sprite,0);

 return;

 }

}

like I say, the choice arrow  won't go down to the second choice. Any idea why?
Re: Doesn't it look o.k.?
Why don't you try the following?



( within "1gold")

void touch (void)

{

sp_touch_damage(&current_sprite,0);

freeze(1);

wait(1);

choice start()

 "Take the gold"

 "leave the gold"

choice end()



if (&result == 1)

{

// the original 1gold stuff here and it work o.k.

 unfreeze(1);

 return;

}

say("I'll leave the gold alone.", 1);

unfreeze(1);

return;

}



It should work this way. And I believe that the reason that it won't work in touch is because the script runs touch(void) procedure over and over...



freeze(1) might not be needed, but I'm not so sure...
Thanks
:That was a good insight about why touch won't work. I'm not sure if i'll use Talk or the idea you listed, but at least I can work around it.
i got it !
choice won't work in  void touch...........but it worked with void talk