Double hide_reuse


#1

Sorry if this question has already been answered, I couldn’t find it.

I know how to use hide_reuse and disable_reuse, but is there a way to hide_reuse after it has been clicked twice, instead of just once? So the third time visiting the choice would make that option disappear?
Thanks to anyone who can help!


#2

Nah it’d be easier to use a standard choice in conjunction with an if, e.g:


*choice
   #You can click me loads of times
      *goto wherever
   *selectable_if (variable < 3) #You can only click me twice
      *set variable + 1
      *goto wherever


#3

Ok thanks!


#4

Wow! I get to correct a bit of @CJW’s code! :stuck_out_tongue:

@ojpolarbearlvr To do precisely what you want it to do, it needs to be (spot the difference!):


*choice
   #You can click me loads of times
      *goto wherever
   *selectable_if (variable < 2) #You can only click me twice
      *set variable + 1
      *goto wherever

(Yes, I thoroughly enjoyed that spot of one-upmanship - a rare treat. :smiley: )


#5

@Vendetta
That depends entirely on the initial value of ‘variable’, I was assuming it would be ‘1’ :stuck_out_tongue:


#6

@CJW Pah! Just piss all over my fireworks, why don’t you!

:smiley:


#7

@Vendetta
You’re right in a sense of good practice, most computer systems and programming languages use a zero-based numbering system, so you could argue that I should have assumed that it would have started at 0.

How’s that? :smiley:

But damn, memo-to-self: Triple and quadruple check sample code before postin’ to avoid a’roastin’!


#8

*relights damp, slightly squidgy fireworks*

Edit: memo-to-self: Next time, don’t give him any wriggle room!


#9

lol @CJW and @Vendetta :stuck_out_tongue: