Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / how to change story paths using variables, help with libs game "mad libs"

Author
Message
xX TOXIC Xx
15
Years of Service
User Offline
Joined: 13th May 2009
Location: cyberspace
Posted: 22nd May 2011 19:03
hello i have a question on how to change the outcome of the story using the players input this is the script i currently have



i would realy like to know how to like the players answer to the variables yes and no thank you, ps if im totally wrong, please totally correct me

If you saw what was to be seen then you wouldent look.- xX TOXIC Xx
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 23rd May 2011 04:17 Edited at: 23rd May 2011 04:17
Check out the last message I wrote in the following thread. There's code snip too thats probably what you're looking for... if not let me know and I'll show you only Yes/No input.

http://forum.thegamecreators.com/?m=forum_view&t=185186&b=7

xX TOXIC Xx
15
Years of Service
User Offline
Joined: 13th May 2009
Location: cyberspace
Posted: 23rd May 2011 19:06
sorry that was not if you have time could you show me only the yes/no input thats most inportant to me right now. thanks

If you saw what was to be seen then you wouldent look.- xX TOXIC Xx
xX TOXIC Xx
15
Years of Service
User Offline
Joined: 13th May 2009
Location: cyberspace
Posted: 23rd May 2011 19:06 Edited at: 23rd May 2011 19:07
sorry that was not if you have time could you show me only the yes/no input thats most important to me right now. thanks
sorry for double post my computer lagged.

If you saw what was to be seen then you wouldent look.- xX TOXIC Xx
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 23rd May 2011 20:52
The quick way for a Yes/No question is to look at the KEYSTATE() for the Y and N keys only. The following has a Yes/No function that returns a 1 if the user hits Y or a 0 if the user hits N.



But I'd recommend you use arrays if you're wanting to do a whole bunch of questions with answers. Check out TDKs Tutorials to learn the basics of Darkbasic:

http://forum.thegamecreators.com/?m=forum_view&t=99497&b=10

What makes you think he's automatically hungry anway? He may of just ate a pizza when he sees the banana.

Takis76
19
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 25th May 2011 16:08
@Grog Grueslayer
Wow , how did you made your code color? I want and my code color in my posts
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 25th May 2011 20:44
Instead of doing this (without spaces):
[ code ]
Your code here.
[ /code ]

Do this instead (without spaces by the brackets):
[ code lang=dbp ]
Your code here.
[ /code ]

It was added to the forms about a year ago I think.

Takis76
19
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 27th May 2011 19:33 Edited at: 27th May 2011 19:34
Let's make a test.



This is not spam , this is my test

Login to post a reply

Server time is: 2024-11-22 22:51:42
Your offset time is: 2024-11-22 22:51:42