Just Adventure News : Press Release: Divines of the East Class Spotlight: Sword Saint Press Release: Green Man Gaming Signs Up Award-Winning Telltale Games Gold: 'Reus' released Press Release: The Swapper Steam Release Date and New Trailer Press Release: Lost Spirits of Kael Game: Magicka - Wizard Wars First-Ever Screenshots Revealed Game: Dutch designers break new ground with audio game Remembering Press Release: Gamebook Fans Unite! Beta: Start of the Second WildStar Closed Beta Game: Jack Haunt - Old Haunting Grounds
Home - Forum Home
Welcome Guest, please Login or Register!
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register or login before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Topic: Inform 7 Newbie Help

    Page 1

23 MAY 2010 at 6:21am

Sweet Potato Vines

Intergalactic Janitor
Intergalactic Janitor



Posts : 1
Joined: 23 MAY 2010

Status : Online
Sorry if this isn't in the right section. I'm new to I7, and will most likely need help with a few things.

First things first. The player starts in a dark room, and he has a lighter in his inventory. What I'm stuck on is how to make the lighter a useable (i.e switchable) object that will make the room light or dark when it's on or off respectively. I'm at a loss on how to do it, and Can't seem to find anything on the internet.

Thanks

Profile Search


23 AUG 2010 at 7:35am

Elvashi

Intergalactic Janitor
Intergalactic Janitor



Posts : 1
Joined: 23 AUG 2010

Status : Online
I doubt you are still around (and this just might qualify as thread necromancy, but...)

Short version, you declare the lighter as a device (so it can be turned on and off), then you add rules that make a lighter give light when on, and stop when off.
For bonus points, I added a "flick" command for favor. This should get you started.


"lighter" by Elvashi

a lighter is a device held by the player.

understand "flick [something]" as toggling.
toggling is an action applying to one carried thing.

Carry out toggling:
     if the noun is switched on begin;
           try silently switching off the noun;
     otherwise;
           try silently switching on the noun;
     end if.

report toggling:
     say "[if the noun is switched on][the noun] lights up.[otherwise][the noun] goes out."

Carry out switching on a lighter:
     now the lighter is lit.

Carry out switching off a lighter:
     now the lighter is not lit.

The Alcove is a dark room. "This small alcove is devoid of features or exits. You are trapped!"
The player is in the alcove.


Profile Search

    Page 1

Jump to:
0 Members Subscribed To This Topic