Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Some days you just can't get rid of a bomb.

So... There's a bomb my player has. It's counting up - because of a reason - when it reaches 10 it goes off. The player doesn't know the count, but can tell that the bomb is glowing brighter and brighter as it builds power. That's what bombs do, okay? 

What I'd like is to display a specific message when the count reaches certain points. My origional try would display every message below the count - so if the count was 8, the message for 6, 4 and 2, would display.

I tried to correct that with this: 

<<if $Build gte 10>> display 'BOOM'>>

<<if $Build gt 8 and lte 9 >> The bomb is glowing white hot!  <<endif>>

<<if $Build gt 6 and lte 8>>  The bomb is getting very hot now <<endif>> 

<<if $Build gt 4 and lte 6>>  This isn't good, the bomb is getting uncomfortably warm to the touch. <<endif>>

<<if $Build gt 2 and lte 4>> You're sure the bomb is warmer now than it was when you first got it. <<endif>>

What I get now is " <<if>> bad condition: Unexpected token <= " messages.

Also, putting that big block in there screws up my formatting, so huge gaps appear between the text, options and this line. Using <<silently>> won't help, because that hides the text too.

Any ideas?

Comments

  • Kay wrote:

    So... There's a bomb my player has. It's counting up - because of a reason - when it reaches 10 it goes off. The player doesn't know the count, but can tell that the bomb is glowing brighter and brighter as it builds power. That's what bombs do, okay?


    We're not stupid. We  know that's exactly how realistic bombs operate.

    See if this dog will hunt:
    <<set $Build = 7>>
    <<print $Build>><br><br>
    <<if $Build gte 10>>
    'BOOM'<br><br>
    <<elseif $Build gt 8 or $Build eq 9>>
    The bomb is glowing white hot!<br><br>
    <<elseif $Build gt 6 or $Build eq 8>>
    The bomb is getting very hot now!<br><br>
    <<elseif $Build gt 4 or $Build eq 6>>
    This isn't good, the bomb is getting uncomfortably warm to the touch.<br><br>
    <<elseif $Build gt 2 or $Build eq 4>>
    You're sure the bomb is warmer now than it was when you first got it.<br><br>
    <<else>>
    ERROR! (<<print $Build>>)<br><br>
    <<endif>>

    More text here.
    Put a "nobr" tag on the passage (under the title with no quotations). That will remove all white space except for what you force with the HTML <br> tags.

    If you don't want to use nobr and force white space, you can remove it with a backslash ("\") like so:
    <<set $Build = 7>>\
    <<print $Build>>

    <<if $Build gte 10>>
    'BOOM'
    <<elseif $Build gt 8 or $Build eq 9>>\
    The bomb is glowing white hot!
    <<elseif $Build gt 6 or $Build eq 8>>\
    The bomb is getting very hot now!
    <<elseif $Build gt 4 or $Build eq 6>>\
    This isn't good, the bomb is getting uncomfortably warm to the touch.
    <<elseif $Build gt 2 or $Build eq 4>>\
    You're sure the bomb is warmer now than it was when you first got it.
    <<else>>\
    ERROR! (<<print $Build>>)
    <<endif>>\

    More text here.
    Hope that helps! :)
  • Kay wrote:

    I tried to correct that with this: 

    <<if $Build gte 10>> display 'BOOM'>>

    <<if $Build gt 8 and lte 9 >> The bomb is glowing white hot!  <<endif>>

    <<if $Build gt 6 and lte 8>>  The bomb is getting very hot now <<endif>> 

    <<if $Build gt 4 and lte 6>>  This isn't good, the bomb is getting uncomfortably warm to the touch. <<endif>>

    <<if $Build gt 2 and lte 4>> You're sure the bomb is warmer now than it was when you first got it. <<endif>>

    What I get now is " <<if>> bad condition: Unexpected token <= " messages.

    Please see this "invalid usage" section.


    This feels like another common gotcha that should be reported by the 1.4.2 passage checker.
Sign In or Register to comment.