intfiction.org

The Interactive Fiction Community Forum
It is currently Fri Feb 22, 2019 12:12 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Tue Nov 27, 2018 7:43 am 
Offline

Joined: Tue Nov 27, 2018 7:24 am
Posts: 1
So my text based rpg is Fallout based

I want to set up the S.P.E.C.I.A.L perk bonuses

Lets say i want my set up to look like this, with just the basic points before you add or subtract.
I know a bit about how to use buttons to add and subtract, but whenever i do, and i tell it to go back to adding or subtracting a point, with a maximum of 10 points to spend, the counter resets!

Quote:
Strength: - 3 +
Perception: - 3 +
Endurance: - 3 +
Charisma: -3 +
Intelligence: - 3 +
Agillity: - 3 +
Luck: - 3 +


And yes i want each button click to alter the $playerstr (strength variable) for example!


Code:
<<if $statpoints == 0>> [[next|storypoint]]<<else>>Use your points you dummy<</if>> 

wich i learned from a old twine forum post, still learning a lot obviously! But how do i prevent a loop?? If anyone can show me how to set it up so it works! (i also want the $stat 's to be remembered so i can use things like

You have <<print $stat>> strength points! Veronica shakes her head, that wont be enough.

far down the line in the story!

[appended by mod]

So i want to set up the S.P.E.C.I.A.L system in sugarcube 2.21.0

Lets say the base stat, before you either add or subtract, look something like this:
Quote:
Str: - 3 +
Per: - 3 +
End: - 3 +
Char: - 3 +
Int: - 3 +
Agil: - 3 +
Luc: - 3 +


and yes i want the $playerstr for example, to be able to be used later on in the game!

Code:
The door is locked down tight, you could brute force it, you have <<print $playerluc>>
<<If $playerluc >6>><<print with some luck [[You open it|hallway]]!>><<else>><<print you attempt to pry it open, but you fail, breaking a finger nail in the attempt!

I have no idea if this code is correct, just using what i know so far from trying to learn it, started yesterday :oops:


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group