I would like to start my game with a yes no question and have it move player to 1 of 2 locations. could someone show me an example? Thanks
5 Likes
Lol, this is what I’ve become? The kid that gets a bone thrown to him time to time?? (Couldn’t find original in quick search!)
IAC, here’s how I’d do that:
gameMain : GameMainDef
showIntro() {
"\bDo you want to start in the bathroom? (Yes or No)";
if(yesOrNo()) {
gPlayerChar.moveIntoForTravel(altStartRoom);
}
cls();
// rest of Intro work...
}
// etc
And of course give PC the primary location by default. Worked in a sample game for me!
#charset "us-ascii"
#include <adv3.h>
#include <en_us.h>
startRoom: OutdoorRoom 'Front Yard'
"This is a featureless front yard. A house is to the north. "
north = house
in asExit(north)
vocabWords = 'outside'
;
+me: Person;
+rock: Thing 'ordinary rock' 'rock' "An ordinary rock. Only visible outside. ";
house : Room 'Inside House'
"This is the one room house (apparently with no door).
The front yard lies to the south. "
vocabWords = 'inside/house'
south = startRoom
out asExit(south)
;
+pebble: Thing 'small round pebble' 'pebble' "A small, round pebble. "
remoteDesc(pov) { "A small, round pebble, visible through doorway. "; }
;
gameMain : GameMainDef
initialPlayerChar = me
showIntro() {
"\bDo you want to start in the house? (Yes or No)";
if(yesOrNo()) {
gPlayerChar.moveIntoForTravel(house);
}
cls();
// rest of Intro work...
}
;
6 Likes
I can’t win! But seriously, I have fun solving/answering questions so I don’t want to hog ‘‘em all if someone feels the same way…
3 Likes
Thank you. I can do the basics but that’s about it.
2 Likes
=) don’t worry my friend I am not good. . . I’ll have more.
3 Likes