TAB - thinBasic Adventure Builder
Would you like to react to this message? Create an account in a few clicks or log in to continue.

TAB - thinBasic Adventure Builder

T.A.B. is an interactive fiction/text adventure program for Windows and made with thinBasic.
 
HomeLatest imagesSearchRegisterLog in
Latest topics
» Happy New Year 2024!
Timeout in script 2 not reponding normally I_icon_minitimeSun Dec 31, 2023 4:04 pm by catventure

» TAB Version 71
Timeout in script 2 not reponding normally I_icon_minitimeMon Aug 21, 2023 12:17 pm by catventure

» TAB Version 70
Timeout in script 2 not reponding normally I_icon_minitimeSun Oct 02, 2022 1:49 pm by catventure

» TAB Version 70
Timeout in script 2 not reponding normally I_icon_minitimeFri Sep 30, 2022 10:23 pm by catventure

» TAB Version 70
Timeout in script 2 not reponding normally I_icon_minitimeMon May 23, 2022 4:08 pm by catventure

» TAB Version 70
Timeout in script 2 not reponding normally I_icon_minitimeSat Apr 30, 2022 11:15 am by catventure

» TAB Version 70
Timeout in script 2 not reponding normally I_icon_minitimeSat Apr 23, 2022 2:32 pm by catventure

» TAB Version 68 Update
Timeout in script 2 not reponding normally I_icon_minitimeTue Mar 15, 2022 4:18 pm by catventure

» TAB Version 68 Update
Timeout in script 2 not reponding normally I_icon_minitimeFri Mar 11, 2022 8:47 pm 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 : 66
Location : Wales
Humor : Nothing like having a good laugh - oh and a pint!
Adventure Points : 53
Registration date : 2009-09-28

Timeout in script 2 not reponding normally Empty
PostSubject: Timeout in script 2 not reponding normally   Timeout in script 2 not reponding normally I_icon_minitimeSun 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
catventure
Admin Adventurer
catventure

Male
Number of posts : 404
Age : 71
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 77
Registration date : 2008-06-08

Timeout in script 2 not reponding normally Empty
PostSubject: Re: Timeout in script 2 not reponding normally   Timeout in script 2 not reponding normally I_icon_minitimeSun 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.
Back to top Go down
https://adventure.forumotion.com
garethfx
Experienced Adventurer


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

Timeout in script 2 not reponding normally Empty
PostSubject: Re: Timeout in script 2 not reponding normally   Timeout in script 2 not reponding normally I_icon_minitimeMon 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
catventure
Admin Adventurer
catventure

Male
Number of posts : 404
Age : 71
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 77
Registration date : 2008-06-08

Timeout in script 2 not reponding normally Empty
PostSubject: Re: Timeout in script 2 not reponding normally   Timeout in script 2 not reponding normally I_icon_minitimeMon 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.
Back to top Go down
https://adventure.forumotion.com
garethfx
Experienced Adventurer


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

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

That great - Thanks phil.

Ill get scribbling immeadiatley

G
Back to top Go down
Sponsored content




Timeout in script 2 not reponding normally Empty
PostSubject: Re: Timeout in script 2 not reponding normally   Timeout in script 2 not reponding normally I_icon_minitime

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: