intfiction.org

The Interactive Fiction Community Forum
It is currently Wed Jun 19, 2013 5:03 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Apr 12, 2011 9:09 pm 
Offline
User avatar

Joined: Tue Mar 15, 2011 10:14 pm
Posts: 120
I have a new problem. Imagine that. ;)

There is an item, that when taken, causes a reaction. Basically changes the scene (player gets knocked out... etc). Everything works well... until I tried to take that item when the players hands were full.

I am using "After taking the electric lantern for the first time:" then the reaction... that works fine.

But if the players hands are full, I get the usual message. After dropping something, or placing it in the players holdall, I can take the item, but the reaction does not trigger.

Is there a way of saying "After taking the electric lantern for the first time and it succeeds:"?

I have tried that, and other variations, but with no luck.

"After holding the electric lantern for the first time:" is what I am trying to do. Until actually held, I don't want the trigger to occur. But I can not find the right combination of events to cause the trigger to occur.

And of course first time is important, they will have to pick it up later, and I don't want the reaction to trigger again at that point.

Any ideas?

Oh, and the reason I called this subject "Containers" is because I was trying to make it automatic that a player put things in his holdall to take another item if hands are full. But that messes up the "Take all". Well, it works, but also takes all from the holdall or exchanges items from it to hands. Very confusing with the inventory. And if I make the holdall closed, then I have the original problem. Player opens, puts another item in, then takes the lantern with no reaction.

_________________
"I am free, no matter what rules surround me. If I find them tolerable, I tolerate them; if I find them too obnoxious, I break them. I am free because I know that I alone am morally responsible for everything I do." - Robert A. Heinlein


Top
 Profile Send private message  
 
PostPosted: Wed Apr 13, 2011 1:21 am 
Offline

Joined: Sun Mar 01, 2009 8:02 pm
Posts: 904
Try it this way:

Code:
After taking the electric lantern:
   if the player carries the electric lantern for the first time:
      say "Bingo!";
   otherwise:
      continue the action.

Substitute whatever you like for the say Bingo line.


Top
 Profile Send private message  
 
PostPosted: Wed Apr 13, 2011 11:38 am 
Offline
User avatar

Joined: Tue Mar 15, 2011 10:14 pm
Posts: 120
Jim Aikin wrote:
Try it this way:

Code:
After taking the electric lantern:
   if the player carries the electric lantern for the first time:
      say "Bingo!";
   otherwise:
      continue the action.

Substitute whatever you like for the say Bingo line.


That seems to do it! I have a VERY long "Bingo" statement, containing several paragraphs and a half dozen actions, so I had to play with the punctuation a bit... but I am getting used to that.


I am going to test it a bit more to see if I can break it, but like I said, it seems to work.

Thanks!

_________________
"I am free, no matter what rules surround me. If I find them tolerable, I tolerate them; if I find them too obnoxious, I break them. I am free because I know that I alone am morally responsible for everything I do." - Robert A. Heinlein


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group