How to check something that repeatedly comes up


#1

New question and probably one of the most important things to have in a story where you hold a gun. Can someone create a script for me that tells the reader that they are out of ammo? I want the script to where if the ammo equals zero then set a boolean false and then if it is false it tells the reader that they are out of ammo and takes them to a different path or something like that. And do stat numbers go negative?


#2

You can turn off the auto intendentation if you go into PREFERENCES and then pick MISC. That way you can do spaces on your own instead.


#3

Okay cool, thanks alot!


#4

I personally go for Tab instead of Space, tho.

Anyway, if you have another coding-related questions, I think it’ll be best if you PM someone instead of creating new threads, considering the number of questions you might have.

Like me! For example.
\(._.)/


#5

Good point, I made more than 3 threads today asking questions… 0__0


#6

Nah, 3 is a charm.
Mandatory 20 chars.


#7

We’ll just rename this thread: MightyMaddness’ New Writer/Coder Questions and you can keep asking your questions here.


#8

You spelled my username wrong but that is okay. I will use this thread for all my questions for now on.


#9

It should be fixed now :smile:

Sorry for the extra letter there.


#10

I tried to edit my post but no one answered, I prefer creating new threads because people
answer faster.


#11

Every time you enter a new post, it pushes the thread to the top of the active list, the same as starting a new thread - so, I’m not understanding your issue.

By creating multiple threads that populate the active list you push other threads off - WiP threads and other question threads included.


#12

Nah, just make a new comment on your thread. It’ll automatically bumped up, and we’ll know it immediately.


And about your question (from the edited 1st post, ofc), practically most, if not all, commands can be placed anywhere on your story.
*if, *choice, *goto_scene, *gosub_scene, whatever. Heck, even *stat_chart can be placed on your story, outside the stat_screen.txt! The only commands that can only be placed on particular spot are *create, *achievement, *title, and *author.
CMIIW.

The trick is try it yourself.
If it produces a bug, doesn’t mean it can’t be done. You just need to find another creative ways to code 'em in.


#17

Ah, I see.

But I tested your code, and it works fine on my end. Are you sure you coded it right?
Perhaps you can show me how does your code looks like, if you don’t mind copy-pasting it here.


#19

Hmm… that looks good :eyeglasses:
Doesn’t seems to have any problems.

Just to clarify, you don’t want the text nine shows up when the *if ninefalse is false, right?


#21

I’m not sure exactly what it is you want to do, but I am guessing you want the 9mm ammo thing to just show up if you actually have ammo?

If so, the issue might be that you have it in two places. If the ‘ninefalse’ flag is that if it is ‘ninefalse true’ you have ammo, the code should look like this.

*stat_chart
  text Name
  text Age
  text Water
  text Food
  text Filters
*if ninefalse
   *stat_chart
      text nine

#22

IfeelsofuckingretardedthatiamlaughingatmyselfrightnowAHAHAthankyou.


#23

It’s often the obvious things that are SO HARD to see because you’ve been staring at it for too long :slight_smile:


#24

Oh, I see.
Me too.

Oddly mandatory 20 chars


#26

Well, it’ll be great for others to learn from our mistake, tho.

But as you wish.


#29

New and important question can someone please answer it.