Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

My friend wants this in his storygame.....

10 years ago

Hi. 

So my friend (known as MadSETIResearcher on the site) is making a storygame and he asked me to help him with the coding. So basically that means I do all the coding and script and he does the story. I'm cool with that, no problem there.

But he wants a particular feature that I'm not even sure is able to be put into a storygame.

Ratio changes.

So what he wants is:

IF VARIABLE = # Then the player will have a higher chance of encountering a particular enemy using the random encounters feature.

Is this possible and if so, HOW IN THE NAME OF FRICK DO I DO IT???????

Please help me! 

My friend wants this in his storygame.....

10 years ago
So... are there two steps here?

If variable is x, then they have a y percent chance of a random encounter?

My friend wants this in his storygame.....

10 years ago

With a particular enemy, yes.

My friend wants this in his storygame.....

10 years ago
IF %VARIABLE > 0 THEN
IF %VARIABLE < 5 THEN
%RANDVAR := 1D5

That's the gist.

My friend wants this in his storygame.....

10 years ago

Thanks James. You've been a big help! My friend will be very happy! 

:)

My friend wants this in his storygame.....

10 years ago
You're welcome. Just break the numbers into intervals (1 to 5, 6 to 10, 11 to 15, etc.) and use IF-Then statements. Also, if your friend has an account, why couldn't he or she ask?

My friend wants this in his storygame.....

10 years ago

Didn't see this post until a lot later. He is very very very new to the site and needs my help on EVERYTHING! Also, he doesn't have internet access at home, and at school he is loaded with homework (while I'm not for some reason O_o) so I had to ask for him. And I'll try that, thanks again!