Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

Interacting Variables

3 years ago
I'm trying to implement a gambling minigame in my storygame. Basically, I'm going for a dice roll situation, where different rolled numbers effect the currency variable (i.e. 1-3 subtracts from the currency variable, while 4-6 adds to it). How would I go about that (I apologize if I haven't presented my dilemma clearly)?

Interacting Variables

3 years ago
%ROLL := 1D6
IF %ROLL = 1
THEN
BEGIN
%CASH := %CASH - 5
END

IF %ROLL = 2
THEN
etc

Or something close to that anyway. I'm very tired.
Important detail is that := always means "change to", while without the colon it's just checking what the number is.

Interacting Variables

3 years ago
Thank you.