intfiction.org

The Interactive Fiction Community Forum
It is currently Wed Jun 19, 2013 6:11 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: matchObj properties
PostPosted: Sat Apr 21, 2012 11:07 am 
Offline

Joined: Thu Mar 01, 2012 9:08 pm
Posts: 31
Hi,

I have the following code:

Code:
++ TellTopic [obj1, obj2, obj3, obj4]
    "A generic response. "
;


I would like to reference the matchObj name property that triggered this, can someone point me in the right direction?

Thanks,
-- Mike


Top
 Profile Send private message  
 
 Post subject: Re: matchObj properties
PostPosted: Sat Apr 21, 2012 11:40 am 
Offline
User avatar

Joined: Tue Apr 20, 2010 2:48 pm
Posts: 695
Maybe gAction.getDobj(), or probably gAction.getIobj()? (They also have convenience macros in adv3.h: gDobj and gIobj.) They return the current action's (gAction) direct and indirect object.


Top
 Profile Send private message  
 
 Post subject: Re: matchObj properties
PostPosted: Sat Apr 21, 2012 11:54 am 
Offline

Joined: Thu Mar 01, 2012 9:08 pm
Posts: 31
RealNC wrote:
Maybe gAction.getDobj(), or probably gAction.getIobj()? (They also have convenience macros in adv3.h: gDobj and gIobj.) They return the current action's (gAction) direct and indirect object.


I had tried gDobj (that returned the NPC) and gIobj crashed the terp' with a null reference so I gave up on that and came looking here.

I just searched adv3.h for those convenience macros and I found gTopicText -- that did the trick...

Thanks, Nikos!

-- Mike


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: Eric Eve and 2 guests


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