Travelling within the game.

icfspectre
Hi, I am writing my first ever game using quest... Basically I am stuck with a travelling set up. I have a jeep set up as a useable object in the game. When I use it, I want it to ask the question "Where would you like to go?". If the player gives the correct response, for eg. "station" (found in puzzles beforehand) then the Jeep will move the player to a new location (the station) where the second part of the story can begin. I have seen similar things done in other people's games but I can't work it out.

I have battled with this for the best part of an hour now and I am stumped. I have read and re-read the sections about scripts for questions and for inputs, but honestly I am raw new to this and really need some help... If anyone could help me I would appreciate it as I'm very excited to get my adventure out there for you all to play and this is a necessary part!

Thanks in advance for any help you guys can give!

iCFspectre

HegemonKhan
in code, it'll look like this, as an example:

// within~added to~for: your 'use' script~function for your 'jeep' Object:

msg ("Where would you like to go?")
get input {
// the 'get input' script~function automatically sets: result = your_typed_in_input_during_game_play
if (result = "station") {
MoveObject (player, station) // 'player.parent = station' also does the same thing as 'MoveObject' script~function
} else if (result = "blah") {
MoveObject (player, blah)
// etc 'else ifs' for each location you want to be able to go to
} else {
msg ("Sorry, wrong input, try again.")
}
}


This is a very simplistic code example, as for example, there should be a check on whether you're already at the location should you type in that location to go to, so if you want this greater code-accounting, let me know, and I can add in the code lines for you.

----------

see if you can do~find the scripts within the GUI~Editor's 'add a script', but if you can't figure it out how to do it on your own, let me know, and I'll help you do this via the GUI~Editor.

-----------

code ~~~ GUI-Editor

msg ("XXX") ~~~ add a script -> output -> print a message -> print [MESSAGE] -> (type in your message)
get input { X } ~~~ add a script -> output -> get input
if (X) { X } else if (X) {X} else { X} ~~~ add a script -> scripts -> if -> [EXPRESSION] -> (type in what I have in my example above)
MoveObject (X, X) ~~~ add a script -> Objects -> MoveObject -> (set it up)

It is VITALLY IMPORTANT that you click on the correct 'add a script' circle buttons, as this determines 'order of operations' (in code terminology it's called 'nesting', aka indentation; a good analogy is an outline format) for the scripts~actions, which must be correct, or you'll have issues~errors.

icfspectre
Thank you man so much, yeah that makes sense... I did find this out with a bit of fiddling, but inserting the script manually proved to be harder than expected, I would prefer to do it with the GUI, simply because it keeps it neat and the same as the rest of the game. As the game I'm planning is going to be enormous and long, my plan is to release the game as "episodes" so in this case, travelling to the station will actually end the game...

This can only work if I can add a message AFTER the game ends to inform players that the following episode is imminent... the reason for this is that I would quite like my game to be practically endless and also give you the option to play the story in different ways, so certain choices you make will give you multiple out comes and push you in different directions... As a survival horror game, I think the element of free will and good vs bad will be a decent factor... Hopefully people will agree. Spent the best part of 13 hours straight on Sunday with Nathan working on the build for episode 1 and am probably around 75% complete with it. :/

This game making malarkey is hard lol... If anyone is free to help me ever I have skype if it's easier to help me directly rather than on here. I will try and finish the rest of the areas and pad them out before implementing your script. I want the game to be insanely detailed, I have written paragraph descriptions for like a toilet. Also another feature we've added in is "easter eggs", one per episode... So when you interact with a certain object in a certain way, something completely absurd will occur which will hopefully make the more investigative players laugh. It will also keep people looking through the items, as I've added like 50 interactive items per room.

I'd love some feedback on the ideas I've just laid out if you have the time to read all my babbling!

iCFspectre

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums