Stat based outcomes


#1

Basically, I want the player to have a different outcome of a choice depending on the stat.

I found a way to do this by…
*if (Strength > 40) #Knock him out`

You knock him out.
*finish

*if (Strength < 40) #Knock him out

You fail at knocking him out
*finish

(These are just examples btw. Not from my game)
Once I quicktest it, it says
"Invalid expression, couldn’t extract another token"
Help


#2

I changed your title for if others get the same problem,also wouldnt this work.

*choice
 #Knock them out
  *if (strength<40)
           Blank
  *if (strength>40)
           Other Blank

#3

You don’t need to make multiple choices. Change it to something like this:

 #Knock him out
    *if (Strength >= 40)
         You knock him out.
         *finish
    *else
         You fail at knocking him out.
         *finish

#4

Is your suggestion and faewkless’s basically the same thing


#5

There are always more then one to code it, but they both have the same effect.


#6

I think that if you us feawkless way you have no option when you have the value of 40. You only got the higher and lower symbol < and >.
The = is equal,
so either >40 and <= 40
or >=40 and <40.


#7

Which would you use?


#8

Well, if the question was directed towards me, I am mostly writing as feawkless wrote, but both are possible, especially if you are working with two options.

Also, just wondering, in what program do you write it? Only asking because when I started writing I wrote in notepad, but I should have been using notepad++ because it’s a lot easier. (just a friendly tip)


#9

I use notepad. I don’t have an option to use notepad++ when I click, open with…


#10

True, you need to download notepad++ first, but it’s a free source program, so you can download it for free.

Biggest plus of it I found was that it was spell check and lining so you can see if you spacing is correct, which will come in handy (also, it’s easier to use the tab instead of space bar, you can’t use both or it will give an error).


#11

Just installed it and it looks awesome. Btw, I thought you said it had spell check?


#12

Yeah, should be. If it doesn’t start automatically try alt + A

Or go to plugins, dspellcheck

If it’s not installed go to plugins, plugin manager, and install dspellcheck


#13

Okay, I got it. Thanks for the help.


#14

Your very welcome, and good luck with your writing. Also, ctrl + f and ctrl + g are handy to know.