FAQ Search Memberlist Usergroups
Jolt Country Forum Index
Register Profile Log in to check your private messages Log in
Log in Log in

Possible bug in DoAsk

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors
View previous topic :: View next topic  
Author Message
Bainespal



Joined: 09 Jul 2010
Posts: 151

PostPosted: Mon Aug 08, 2011 1:14 pm    Post subject: Possible bug in DoAsk Reply with quote

I noticed this code in DoAsk:

Code:
elseif xobject = player
   {
      if not object.after
         VMessage(&DoAsk, 3)     ! asking about yourself
   }
   elseif xobject = object
   {
      if not object.after
         VMessage(&DoAsk, 4)     ! asking about him/herself
   }

I hadn't known that default messages provide for the PC asking about himself or for the PC asking an NPC about that same NPC. I didn't test the second condition, but when I try asking an NPC about the player object, I just get a blank line. Note that if the NPC's after property has a default DoAsk response, that response is displayed. I get the blank line when asking an NPC that doesn't have a default condition.

The corresponding code in VMessage doesn't look like it should cause any problems:
Code:
case 3:  print "Hopefully "; The(player); " know"; \
         MatchSubject(player); " as much as anyone."
case 4
{
  print CThe(object); " would probably rather not talk about "; object.pronoun #4; "."
}
Back to top
View user's profile Send private message
Roody_Yogurt



Joined: 29 Apr 2002
Posts: 1993
Location: Milwaukee

PostPosted: Mon Aug 08, 2011 5:37 pm    Post subject: Reply with quote

Yeah, it's not really a bug; it's just an all-or-nothing dealie. If you have any character.after code, you're going to have to add make DoAsk responses for every feasible subject (going the normal 'select xobject/ case [object name]' route). The DoAsk routine only prints those defaults if there is no character.after code at all.
Back to top
View user's profile Send private message AIM Address
Roody_Yogurt



Joined: 29 Apr 2002
Posts: 1993
Location: Milwaukee

PostPosted: Tue Aug 09, 2011 3:37 pm    Post subject: Reply with quote

Actually, Johnny points out that you could just return false from asking about the player or character object, like:

Code:

select xobject
      case player : return false
      case object : return false


So yeah.
Back to top
View user's profile Send private message AIM Address
Bainespal



Joined: 09 Jul 2010
Posts: 151

PostPosted: Wed Aug 10, 2011 5:55 am    Post subject: Reply with quote

Roody_Yogurt wrote:
Yeah, it's not really a bug; it's just an all-or-nothing dealie. If you have any character.after code, you're going to have to add make DoAsk responses for every feasible subject (going the normal 'select xobject/ case [object name]' route). The DoAsk routine only prints those defaults if there is no character.after code at all.

Somebody should make a game some day with a bunch of Hugo-standard NPCs. Maybe if I get too frustrated, I'll do just that! ;)

But I think it's good to work with the defaults of an IF system, not against them, so I generally try to use the default library behavior when it's appropriate.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001 phpBB Group

Theme by Kage Musha - RPG Garden

Copyrights and trademarks are all of the belonging company. No copyright Infringement intended