TAB - thinBasic Adventure Builder

T.A.B. is an interactive fiction/text adventure program for Windows and made with thinBasic.
 
HomeFAQSearchUsergroupsRegisterLog in
Latest topics
» TAB Version 66 Available
Mon Sep 26, 2016 12:02 pm by catventure

» TAB Version 65 Available
Mon Feb 23, 2015 12:04 pm by catventure

» Incubation pt 1
Wed Apr 24, 2013 9:24 am by Kabrinski

» Charecter movements - doors
Wed Mar 20, 2013 2:55 pm by garethfx

» Member feedback on game planning
Sun Mar 03, 2013 1:47 pm by garethfx

» Still alive - just!
Thu Feb 28, 2013 11:34 am by catventure

» TAB 64 crashes ...
Mon Aug 20, 2012 11:31 am by acko

» Idea on addition to object being container
Sat Aug 18, 2012 3:49 pm by catventure

» sizex=y action ...
Thu Aug 09, 2012 11:29 am by catventure


Share | 
 

 Timeout in script 2 not reponding normally

View previous topic View next topic Go down 
AuthorMessage
garethfx
Experienced Adventurer


Male
Number of posts : 85
Age : 59
Location : Wales
Humor : Nothing like having a good laugh - oh and a pint!
Adventure Points : 53
Registration date : 2009-09-28

PostSubject: Timeout in script 2 not reponding normally   Sun Jun 06, 2010 4:28 pm

Hi guys

Just decided to use the "timeout" command in script 2 to drop subtle hints to the player in the early stages of a game. However, I've hit on an issue with the timeout actually functioning but cannot see why as it appears correct and in context

Room 16 - no issue there
flag 20 incriments by 1 each room visited from room 12 so that the player gets a "feeeling" of approaching menace.
when it hits 5 it stops the menace during revisits as the play is confronted by the charector. Once Ive stopped the flag increase Ive made the charector turn up in the room with the player and Ive announced it. - I set the time out to 20 initialy to allow for testing but its to give the player some time to check out their environment and to make the right choice. In this case to attack the charector. That will be in the Response of course. But I wanted to get the timer providing a small subtle hint if they are not getting anywhere. Ive used the cmess opppsss to just flag up the time out for now in the test. I planed to use a second flag (21) to trigger the next time out and hint . The flag 21=1 will be after the last cmess

Heres the issue (at long last) The timer, although set to 20 (seconds) is showing the cmess immeadiatley - there is no delay in the message - Ive used it like this before and its fine - I cannot see what ive done here - any ideas?

G...

Below is the code



-----------Creepy Appears at loc 16----------------
[start]room=16#flag20=4#[acts]cmessA small, funny little creature suddenly appears carrying a little leather bag, He looks shocked to see you standing there. He freezes and clasps the bag tightly to his small bent frame as he fixes his cruel green eyes on you.#flag20=5#charloc1=room#timeout=20#cmessOPPPSSSS#[end]
Back to top Go down
View user profile
catventure
Admin Adventurer
avatar

Male
Number of posts : 376
Age : 65
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 52
Registration date : 2008-06-08

PostSubject: Re: Timeout in script 2 not reponding normally   Sun Jun 06, 2010 10:16 pm

Hi Gareth,

I think you're confusing the two action commands:

pauseX (secs) - pause game for X secs

timeout=X (secs) - set input to be timed out for X seconds

[start]room=16#flag20=4[acts]cmessA small, funny little creature suddenly appears carrying a little leather bag, He looks shocked to see you standing there. He freezes and clasps the bag tightly to his small bent frame as he fixes his cruel green eyes on you.#flag20=5#charloc1=room#timeout=20#cmessOPPPSSSS[end]

Yes that cmess will appear straight away. That is correct. If you want it to appear after a delay ,say 10 secs then use the pause command like so:

[start]room=16#flag20=4#[acts]cmessA small, funny little creature suddenly appears carrying a little leather bag, He looks shocked to see you standing there. He freezes and clasps the bag tightly to his small bent frame as he fixes his cruel green eyes on you.#flag20=5#charloc1=room#pause10#cmessOPPPSSSS#[end]

However, I think you are looking to use the timeout=X action here like so:

[start]room=16#flag20=4#[acts]cmessA small, funny little creature suddenly appears carrying a little leather bag, He looks shocked to see you standing there. He freezes and clasps the bag tightly to his small bent frame as he fixes his cruel green eyes on you.#flag20=5#charloc1=room#timeout=20[end]

You're nearly there. You just need another entry into Script 2 BEFORE that last one like this:

[start]flag20=5[acts]cmessOOppss!#etc..etc..[end]

That would trigger after the timeout expires because flag 20 equals 5.

And in your RESPONSE entry for when the player attacks the character you can reset the timeout to its normal value but more importantly change the value of flag 20 to a value greater than 5 so the "ooppss" entry never triggers in Script 2.

Hope you understand all of that. That is how I would it.
Good Luck.

Phil.

_________________
http://tab.thinbasic.com ; Home of the TAB I.F. project.
Back to top Go down
View user profile http://adventure.rpgdynasty.com
garethfx
Experienced Adventurer


Male
Number of posts : 85
Age : 59
Location : Wales
Humor : Nothing like having a good laugh - oh and a pint!
Adventure Points : 53
Registration date : 2009-09-28

PostSubject: Re: Timeout in script 2 not reponding normally   Mon Jun 07, 2010 3:44 pm

Your assumption was right Phil. I did want to use the "timeout" as in the second scenario code. Because some players will not think of how to deal with a problem I wanted to make a system which would expect an input. If that was to be correct game play continues if not it will give subtle hints after so many seconds continually until it got to the point where the plays is actually told what to do.Am I to assume I need to make an input for each of the flag20 incriments in script 2 for flag20=5 then again for flag20=6 etc etc so that if an input is not recieved in each it will incriment the flag from scrpit2 as below

[start]room=16#flag20=4#[acts]cmessA small, funny little creature suddenly appears carrying a little leather bag, He looks shocked to see you standing there. He freezes and clasps the bag tightly to his small bent frame as he fixes his cruel green eyes on you.#flag20=5#charloc1=room#timeout=20#flag20=6[end]

with the code below preeding it
[start]flag20=6[acts]cmessyet another hint!#etc..etc..[end]
[start]flag20=7[acts]cmessyet another simplar hint!#etc..etc..[end]
and so on?
Back to top Go down
View user profile
catventure
Admin Adventurer
avatar

Male
Number of posts : 376
Age : 65
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 52
Registration date : 2008-06-08

PostSubject: Re: Timeout in script 2 not reponding normally   Mon Jun 07, 2010 5:00 pm

garethfx wrote:

Because some players will not think of how to deal with a problem I wanted to make a system which would expect an input. If that was to be correct game play continues if not it will give subtle hints after so many seconds continually until it got to the point where the plays is actually told what to do. Am I to assume I need to make an input for each of the flag20 incriments in script 2 for flag20=5 then again for flag20=6 etc etc so that if an input is not recieved in each it will incriment the flag from scrpit2 as below

[start]room=16#flag20=4#[acts]cmessA small, funny little creature suddenly appears carrying a little leather bag, He looks shocked to see you standing there. He freezes and clasps the bag tightly to his small bent frame as he fixes his cruel green eyes on you.#flag20=5#charloc1=room#timeout=20#flag20=6[end]

with the code below preeding it
[start]flag20=6[acts]cmessyet another hint!#etc..etc..[end]
[start]flag20=7[acts]cmessyet another simplar hint!#etc..etc..[end]
and so on?

Hi Gareth.
Well the easiest way is to do something like this; just put the entries in reverse order like so and arrange your entries something like this:

[start]flag20=8#room=16[acts]cmessFinal Sledgehammer Hint!!#timeout=0#flag20=9[end]
[start]flag20=7#room=16[acts]cmessyet another simplar hint!#etc..etc..#flag20=8[end]
[start]flag20=6#room=16[acts]cmessyet another hint!#etc..etc..#flag20=7[end]
[start]flag20=5#room=16[acts]cmessThis is the first hint.#flag20=6[end]

[start]room=16#flag20=4#[acts]cmessA small, funny little creature suddenly appears carrying a little leather bag, He looks shocked to see you standing there. He freezes and clasps the bag tightly to his small bent frame as he fixes his cruel green eyes on you.#flag20=5#charloc1=room#timeout=20[end]


A problem that might need covering is if the player decides to leave that room without dealing with the character... The timeout will still be in operation... but you could make it so the player can't leave the room until they've solved the puzzle with an entry in RESPONSE (before the standard default entry dealing with player movement) like:

[start]go %directn1%#room=16#flag20>4#flag20<9[acts]cmessThe small creature moves to block your attempts to exit the room![end]

Phil.

_________________
http://tab.thinbasic.com ; Home of the TAB I.F. project.
Back to top Go down
View user profile http://adventure.rpgdynasty.com
garethfx
Experienced Adventurer


Male
Number of posts : 85
Age : 59
Location : Wales
Humor : Nothing like having a good laugh - oh and a pint!
Adventure Points : 53
Registration date : 2009-09-28

PostSubject: Re: Timeout in script 2 not reponding normally   Mon Jun 07, 2010 6:11 pm

That great - Thanks phil.

Ill get scribbling immeadiatley

G
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: Timeout in script 2 not reponding normally   

Back to top Go down
 

Timeout in script 2 not reponding normally

View previous topic View next topic Back to top 

 Similar topics

+
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
TAB - thinBasic Adventure Builder :: TAB FORUMS :: General Forum-
Jump to: