Home Community Mys-Script Creative Off-Topic |
|
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
Dialogue/choice branch system
Have you ever wanted to add a CYOA (choose your own adventure) game to your site? Maybe you wanted to make a quiz or some sort of branching dialogue? Well, this will help you do that. Here's how it looks in action:
-Pros-
-Cons-
-The Process- How this basically works is using multiple forms and buttons to link to each other and show different content depending on what choice you pick. For example... PHP Code:
"choice handling" is where all of the following choices and such go. It always goes above "adventure start"! If you want to have a choice lead to yet another branch, then simply add a form within one of the statements. So... PHP Code:
Since this purely uses PHP, you are free to use conditions, use database info, use variables, etc. For example, what if the user could only do this once a day? You could make a column in the database that holds whether or not the user has been on this adventure already. In whatever choice counts as a "dead end", update the database. That way, the user will be unable to do it again if they refresh or leave and return.
__________________
|
#2
|
||||
|
||||
This looks like a neat idea for whoever wishes to make an exploration/quest system on his/her adoptables site, good job with the tutorial.
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
|
|
What's New? |
What's Hot? |
What's Popular? |