I'm having trouble making a choice box....

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

Post Reply
User avatar
sheamkennedy
Liquid Metal Slime
Posts: 1110
Joined: Mon Sep 16, 2013 9:29 pm
Location: Tama-shi, Tokyo, Japan
Contact:

I'm having trouble making a choice box....

Post by sheamkennedy »

I'm trying to make a choice box. So far I have created textbox #19 which make an NPC ask a question, to which your character can reply "yes" or "no." If yes, the NPC will reply with textbox #20. If no, the NPC will reply
with textbox #21. Currently under the choice menu I have the choice "yes" set tag #1 to ON, and "no" does nothing. Therefore I believe the code below should result in either the "yes" or the "no" case.... So far only the "no" case comes up when testing either choice answer. Can anyone point out my flaw? Or perhaps show me a more systematic way of coding choices.

Code: Select all

  show text box (19)
  wait for text box
  If (check tag (1) == true) then(
    show text box (20)
    )
    else(
    show text box (21)
  )
  set tag (1, off)
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
TMC
Metal King Slime
Posts: 4101
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Tags 0 and 1 can't be changed. It says so. Obviously, it's bad UI to even let you select that tag; I'll look at fixing that.
User avatar
sheamkennedy
Liquid Metal Slime
Posts: 1110
Joined: Mon Sep 16, 2013 9:29 pm
Location: Tama-shi, Tokyo, Japan
Contact:

Post by sheamkennedy »

TMC wrote:Tags 0 and 1 can't be changed. It says so. Obviously, it's bad UI to even let you select that tag; I'll look at fixing that.
Got it. Thanks. So what exactly are tags 1 and 0 used for? Is one just defaulted to "on" and the other to "off" both unchangeable? I just want to know if they're ever used for anything in coding.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7460
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Tag 0 was meant to really be just "no tag here at all"

Tag 1 was meant as a way to be able to test for something that was always true or always false... but that isn't really a useful or important feature, because then why use a tag at all?

I think it was just bad planning on my part, but now we are stuck with it (because changing it now could break any games that actually do check tag 1 expecting it always be off)
TMC
Metal King Slime
Posts: 4101
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

There is however the possibility of just hiding tag 1 everywhere using some incomprehensible z/xintgrabber magic
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7460
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

I just remembered the place where it always gets used. Text box conditionals. Those default to unused, so tag 1 is used for all the "Always" text boxes.

I think we should leave it how it is for tag checks, but hiding it from any place that does tag-setting sounds great.
User avatar
Sparoku
Metal Slime
Posts: 308
Joined: Tue Jun 18, 2013 3:19 pm
Location: Dairy Queen
Contact:

Post by Sparoku »

Try using a different tag. Like 2 or 3, if they're not already used.

If they are, make a new tag and use it instead. Problem solved! :v:
"One can never improve enough nor should one stop trying to improve."
Post Reply