Automatically moving player to another room not working
chellkafka
10 Jun 2014, 12:37So, my problem is, I got two rooms where the player has to listen to something from start to finish, the player can't move before that. And whilst the player can still interact. And after the sound is done, the player should be moved to the next room. It worked fine before, but I continued working on the game and now the player only gets moved when it types in something.
Any ideas what's wrong?
I attached the game file. If you need the sound files, tell me and I'll load them up seperately, they're too big to load up now.
the rooms are from r4despair to r5donecrying and from r5donecrying to end.
Any ideas what's wrong?
I attached the game file. If you need the sound files, tell me and I'll load them up seperately, they're too big to load up now.
the rooms are from r4despair to r5donecrying and from r5donecrying to end.

jaynabonne
10 Jun 2014, 13:47In r4despair, you have this (text truncated):
This sets up the timeouts but then enters a "get input" which will cause it to pause until the player presses a key. I suspect you did that to try to capture any input from the player? But it forces them to hit a key.
If you just want them to not be able to type, you can use "request" to hide and show the command line. I believe it's:
to hide the command line and
to show it again. (Notice there are no quotes aroound Hide and Show.)
msg ("Thank you. ...")
play sound ("hb.mp3", false, true)
SetTimeout (20) {
play sound ("cry.mp3", false, false)
SetTimeout (95) {
MoveObject (player, r5donecrying)
}
}
get input {
msg ("No! Don't touch me!")
}
This sets up the timeouts but then enters a "get input" which will cause it to pause until the player presses a key. I suspect you did that to try to capture any input from the player? But it forces them to hit a key.
If you just want them to not be able to type, you can use "request" to hide and show the command line. I believe it's:
request(Hide, "Command")
to hide the command line and
request(Show, "Command")
to show it again. (Notice there are no quotes aroound Hide and Show.)
chellkafka
10 Jun 2014, 14:54Well, the thought behind this game is that simply entering anything counts as interaction.
and in that particular room, I want that still to keep going.
So, is there a way to take any input from the player in account, but still move the player after a certain amount of time?
and in that particular room, I want that still to keep going.
So, is there a way to take any input from the player in account, but still move the player after a certain amount of time?

jaynabonne
10 Jun 2014, 15:05I'm not sure what "take any input from the player into account" means.
Do you just wish to have the code note they've done something, or should things still behave as before? If the latter, then you can just get rid of the "get input" and let things happen as they always do. If you want it to not do what happens normally, then I'd need to know what you would like to have happen, both from the player and game's point of view.

chellkafka
11 Jun 2014, 09:12ok, so, the thing is, I don't use any verbs or commands in this game, it's hardly a game, more like a conversation with philosophical thoughts.
so, I don't want any default responses, In this room, I want the text responses, I wrote in the code, anytime the player types in anything, really anything, from look or jump to gfsdhjfkgfdj. and I want the player to move to the next room after the amount of time that I already set and the amount of input the player wrote shouldn't affect that.
so, I don't want any default responses, In this room, I want the text responses, I wrote in the code, anytime the player types in anything, really anything, from look or jump to gfsdhjfkgfdj. and I want the player to move to the next room after the amount of time that I already set and the amount of input the player wrote shouldn't affect that.

jaynabonne
11 Jun 2014, 11:16I'm not in a spot where I can test this, but I'll throw it out there anyway.
Create a command in that room with pattern
Then have the command output the text you want. If I understand it correctly, "#text#" should match anything, and being in the room, it should take precedence over other verbs and commands.
Create a command in that room with pattern
#text#
Then have the command output the text you want. If I understand it correctly, "#text#" should match anything, and being in the room, it should take precedence over other verbs and commands.
chellkafka
11 Jun 2014, 22:19nope. does not take precedence over other verbs and commands.

jaynabonne
12 Jun 2014, 06:38Rats, ok. (I see now that the "local room override" only kicks in for identically matching commands - that is, you can override an existing command in your room by giving it the same name, but you can't override all of them, because they match with a higher score. Ok, a tangent...)
Looking at your code in more depth, you seem to have some patterns already for capturing input. I don't have the mp3's, so I don't know how well that works (using get input in a turnscript), but I assume it is working for you! So perhaps something similar might work for you here.
Since you aren't using any standard commands at all, one way to disable them all would be to override HandleCommand and either have it do nothing or whatever other behavior you wish that isn't the standard one.
Looking at your code in more depth, you seem to have some patterns already for capturing input. I don't have the mp3's, so I don't know how well that works (using get input in a turnscript), but I assume it is working for you! So perhaps something similar might work for you here.
Since you aren't using any standard commands at all, one way to disable them all would be to override HandleCommand and either have it do nothing or whatever other behavior you wish that isn't the standard one.

chellkafka
14 Jun 2014, 21:37Ok, it seems that it's working now for the first room movement. The weird thing about the second one is, that the time scripts are working, but the movement is not. Because a text appears when the player should move to the next room. The text appears, but the movement does not happen.
The time scripts are working weirdly, I guess. Sometimes they work sometimes they dont. sometimes not right. Is that a common issue?
The time scripts are working weirdly, I guess. Sometimes they work sometimes they dont. sometimes not right. Is that a common issue?