Welcome to GameHourz.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Testing what a player is holding

 
   Game Forums (Home) -> Interactive Fiction Games RSS
Related Topics:
Graphics in IF - How many people like some kind of graphics in their IF? Do you like the graphics and text to be in resizable frames?

Stuck in Chancellor - Help! S P O I L E R S P A C E .. .. .. .. .. .. .. .. I'm stuck on the I think I'm near the end. The lowest storey has perhaps because the real world has managed to partly reassert itself. There's a lot of wind - can't make..

"Computer Games" Article on IF - Just an FYI: The latest issue of Computer Games magazine (April 2006) contains a piece on IF. It covers the and comes all the way to the present, with on Inform, TADS, and Hugo; the Annual IF Comp, Baf's Guide, and a bunch more. ..

Dean Kamen and the Ginger Project - A tale. In 1999, Dean Kamen took a lot of the money he had earned inventing things and started a new project called Ginger. He spent several years working on it in very hush-hush he told a few people, mostly..

Damnatio Memoriae & Bronze: brief evaluations - Yay for the new version of Windows Frotz 2002 that allowed me to play these games! :) I just want to make note of them here from a player's ignoring all the stuff about the language they're written in. Somewhere in the..
Next:  Problem:Only old game in Mortal combat deception  
Author Message
ceraphim13

External


Since: Mar 27, 2006
Posts: 2



(Msg. 1) Posted: Mon Mar 27, 2006 2:04 am
Post subject: Testing what a player is holding
Archived from groups: rec>games>int-fiction (more info?)

How do you test to see if a player is holding something directly, or
indirectly? I have seen posts how to do this in tads, but how do I
acomplish this in Inform? I am designing a game and have a room that
you can't leave if you are holding a specific object, even if it is
closed up in a container you are holding. Any help would be
appreciated!

 >> Stay informed about: Testing what a player is holding 
Back to top
Login to vote
ceraphim13

External


Since: Mar 27, 2006
Posts: 2



(Msg. 2) Posted: Mon Mar 27, 2006 5:02 am
Post subject: Re: Testing what a player is holding [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks so much for the reply, this helps a lot!!!

(Sorry about posting in the wrong place. I thought I did post there,
but I was searching through other posts and must have hopped into this
one without noticing.)

 >> Stay informed about: Testing what a player is holding 
Back to top
Login to vote
Eric Eve

External


Since: Jul 25, 2004
Posts: 28



(Msg. 3) Posted: Mon Mar 27, 2006 7:55 am
Post subject: Re: [Inform] Testing what a player is holding [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

<ceraphim13.DeleteThis@bresnan.net> wrote in message
news:1143453886.832161.97500@z34g2000cwc.googlegroups.com...
> How do you test to see if a player is holding something directly,
> or
> indirectly? I have seen posts how to do this in tads, but how do I
> acomplish this in Inform? I am designing a game and have a room
> that
> you can't leave if you are holding a specific object, even if it
> is
> closed up in a container you are holding. Any help would be
> appreciated!

For direct containment, test:

if(obj in player) ...

Where obj is the object in question. If by "directly held" you mean
you want to exclude objects that are currently being worn then use:

if(obj in player && obj hasnt worn) ...

To test whether obj is either directly or indirectly in the player's
inventory, use:

if(IndirectlyContains(player, obj))...

BTW, for future reference, this type of query might get a better
response if it's posted to rec.arts.int-fiction, which is the list
for discussing *writing* games; rec.games.int-fiction is intended
for the discussion of *playing* interactive fiction.

HTH,

Eric
 >> Stay informed about: Testing what a player is holding 
Back to top
Login to vote
Display posts from previous:   
   Game Forums (Home) -> Interactive Fiction Games All times are: Ekaterinburg, Islamabad, Karachi, Tashkent (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]