Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1075932 Posts in 44152 Topics- by 36119 Members - Latest Member: Royalhandstudios

December 29, 2014, 04:14:05 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)Little Inform 7 Problem!
Pages: [1]
Print
Author Topic: Little Inform 7 Problem!  (Read 394 times)
namragog
Guest
« on: May 01, 2012, 01:17:32 PM »

I'm trying to make a good player creation system in Inform 7 while I'm waiting to get my new computer, and I was wondering if you TIGers could help me with it. You don't really have to know Inform all that well, because the code is very simple. I have a working hair color model script, but I need help figuring out how to allow the player to choose multiple traits. Hair color is not enough.

So far I have this:


-------------------


Getting Started is a room.

Haircolor is a kind of value. The haircolors are red, white, blonde, black, brown, and unknown. Understand "red" or "redhead" or "redheaded" as red. Understand "white" as white. Understand "blonde" or "yellow" or "sandy" as blonde. Understand "black" or "raven" or "dark" as black. Understand "brunette" or "brown" as brown.

A person has a haircolor. The haircolor of the player is unknown.

When play begins:
   now the command prompt is "What is the color of your hair?".

After reading a command when the haircolor of the player is unknown:
   if the player's command includes "[haircolor]":
      now the haircolor of the player is the haircolor understood;
      if the haircolor of the player is unknown:
         say "You need a hair color. [run paragraph on]";
         reject the player's command;
      say "[line break]Thank you. We now begin...";
      now the command prompt is ">";
      move the player to Ivory Lobby;
      reject the player's command;
   otherwise:
      say "Sorry, we're not ready to go on yet. [run paragraph on]";
      reject the player's command.

Ivory Lobby is a room.

Instead of examining the player when the haircolor of the player is red:
   say "TESTING TESTING"

------

And the Documentation says that
Quote
If we had a whole series of things to ask the player about, we might define a whole series of kinds of value

The vocal ranges are soprano, mezzosoprano, contralto...
and use a "construction stage" variable to keep track of the current stage of character-construction, as in

After reading a command when the current construction stage is choosing a vocal range:
    ...

So if anyone could help with this, it would be fantastic!
Logged
johnki
Level 9
****


Invisi-wizard


View Profile WWW
« Reply #1 on: May 01, 2012, 01:21:52 PM »

Can't you just say something like "After reading a command when the haircolor of the player is unknown and the <insert trait here> of the player is unknown:"?


EDIT: Or maybe...

Quote
When play begins:
   now the command prompt is "What is the color of your hair?".

After reading a command when the haircolor of the player is unknown:
   if the player's command includes "[haircolor]":
      //blah
      now the command prompt is "What is the ____ of your ___?".
   otherwise:
      say "Sorry, we're not ready to go on yet. [run paragraph on]";
      reject the player's command.

After reading a command when the <insert trait here> of the player is unknown:
   //blah

Ivory Lobby is a room.

I'm not really versed in Inform (I've only attempted to use it a few times), but that seems like it makes sense.
Logged

namragog
Guest
« Reply #2 on: May 01, 2012, 02:29:47 PM »

YOU ARE A HOLY MAN.  Kiss

Thanks so much!!

PROBLEM SOLVED BY: JOHNKI
Logged
BorisTheBrave
Level 10
*****


View Profile WWW
« Reply #3 on: May 02, 2012, 01:39:59 PM »

Probably easiest just to have a series of getting started rooms, one for each choice, and you must make a choice to move to the next room. Then you can just repeat the hair color block several times, just have each one only apply when you enter a specific room, rather than start of game.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic