Need command to reset *disable_reuse and very strange issue with IDE and compiled file


#1

Hi guys, I desperately need a command that can reset the disable reuse within the same scene, just like *allow reuse resets *hide reuse. It’s too much work for me to export all of the options into a different scene file now (which is the only way to reset the disable reuse at the moment)…

Please implement this in the future, thanks.


#2

I do not not of such a command I use a boolean to set true or false

*label death
*comment if dead true
*if (dead)
  *goto grave
*else
 You feel a spinning in your head and want to puck but you stand on this side of the grave now.
 *goto something else

*label drink
You are offord to drink a strange drink by a dark figure standing over your grave.
*choice
 #Drink
 *set dead false
 *goto death

#3

I know using boolean can solve this, but i have something like 30+ disable reuse to change, and i just wish theres a command to reset it directly, thx for the help tho


#4

I do the same as LordIrish. Add a variable set to true as default. For the option you want, start with *selectable_if (your_variable) #Your choice.
Then, before displaying the choice, type *set your_variable false

When you want the option to be selectable again, type *set your_variable true


#5

Just to play the devil… Do you really need the unselectable options to show? Seems to me that with one click of the replace all button and you could switch to hide reuse and all your problems would go away…


#6

some of them can use hide reuse yes, but others are meant to be shown as disable reuse so the player knows they can select it if they made different choices previously, so it does have a purpose. if i just hide reuse everything, it may take away the players curiousity to find how to access those disabled options. coz they never knew it existed


#7

But don’t the “_reuse” functions only affect choices the players have already made – and hence seen?

“*selectable_if” is what you want to use if you want players to get curious about an option they can’t (yet) select. I don’t think disable_reuse will do that.


#8

This.
Though you can as previously said emulate both reuse commands with *if and *selectable_if.


#9

yes, i understand the selectable if, i used it quite a bit, but what i was asking is when a player dies and go back to the checkpoint, all the choices are gone the second time because he already picked them previously, disable reuse does not have a reset like allow reuse for hide reuse, yes a boolean can fix that using selectable if, i just wish theres a reset for disable reuse to make things easier.

Anyway, i want to ask a more stranger matter, im finding this weird problem where the game works perfectly in IDE, but when i compile and run the html file, the user input is broken… i recompiled the startup again and again and it still doesnt work with the same startup and stat files working in IDE…

I’m going to cut that part out and show you guys this strange problem later


#10

Here is the very strange problem I’m having guys, this startup.txt file works perfectly in CS-IDE with user input values into the bet amount, but the same file when compiled, does not read the user input value at all and only inputs 200 into bet regardless. 200 comes from the addition of the default variable amount of 100 player bet and 100 AI bet amount.

This startup.txt, works flawlessly in CS-IDE:

Yet when this same file compiled into html, the user bet input value is completely broken:

To test the fail input, just enter any value other than 100, and the bet pool still goes to 200 (100 each from both player and AI). It’s like the input value is never even there, but in IDE, it works perfect… so weird.

I noticed on the wiki it says:

Note that there is a known *input_number related game-stopping bug when playing a ChoiceScript game using Microsoft’s Internet Explorer. It does not occur in any other browsers, and there is no known workaround.

I’m not using explorer in any of my tests, I’m using FireFox with all necessary plugins installed.

any help on this is greatly appreciated.

Thanks


#11

Sorry wish I had time to work on this, but put it in IDE and ran the program. Only lets me max bet 200. If I get time tonight will take a closer look.

*taking a real quick look I would say it is the way the var are setup. Will try and work on it when I get home.


#12

Thanks for the help @Lordirish, I ran it again in my CS-IDE and I can still input all the correct values, i put in 600 or 345, it takes all of it and deducts the correct amount, as soon as i compile it, it’s gone but ya, please test it out when you get a chance, thanks again.


#13

Where are you compiling it from? The CS-IDE’s export might be out of date, not that it should really make all that much of a difference, but it’s worth trying a new copy of CS and using the compile.html file included with that, if you haven’t already.


#14

I made a few changes to the code and running perfect now for me. Hope this helps.

I cnahanged: *create potpile 0
Then I added the following right below
How many chips do you wager ?

    *temp playerbet 0

    *input_number playerbet 1 1000 
    
    *set playwager playerbet
    
    
    Your wager ${playwager} total

#15

@CJW sorry, I forgot to mention, I’m compiling it from the compile.html in the CS folder, never tried to compile from CS-IDE, probably never will.

@Lordirish Thanks so much Lord, I tried it out, and it works great now after compiled too.


#16

Sorry for butting in but uh, is this still a thing? Where did it say that?


#17

I think I fixed that a while ago.


#18

Just happy I could help. :wink: