intfiction.org

The Interactive Fiction Community Forum
It is currently Thu Nov 23, 2017 10:52 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sat Sep 02, 2017 10:26 am 
Offline

Joined: Fri Apr 08, 2011 6:38 am
Posts: 246
Location: Hamburg
Dear all,

how can I switch an NPC from non-proper to proper? Like, unless you found out something about an NPC, he's "a guy", and then he's "John". I have a variable "known_john" that I use for the initial[] routine, that covers some of it. But I need to use (The)npc for a lot of things, and that's where I get into trouble. Any recommendations?

Thanks and kind regards,
Grues

_________________
Nofretete ist nicht aus Freude am Kneten entstanden.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Sep 02, 2017 2:18 pm 
Offline

Joined: Sat Jan 23, 2010 4:56 pm
Posts: 5489
You can write

give obj proper;
give obj ~proper;


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sun Sep 03, 2017 2:04 am 
Offline

Joined: Fri Apr 08, 2011 6:38 am
Posts: 246
Location: Hamburg
Almost perfect. Only problem: The name is

Object npc "John" location

Means when he's ~proper he will be doing things as "The John". Any ideas?

_________________
Nofretete ist nicht aus Freude am Kneten entstanden.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Sep 04, 2017 2:34 am 
Offline

Joined: Fri Jul 23, 2010 5:20 pm
Posts: 257
How about (not tested)

Code:
Object npc
  with found_in location,
      short_name [; if (self has proper) { return "John"; } else { return "guy"; } ],
     ...

_________________
http://hlabrande.fr/if


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Sep 04, 2017 3:27 pm 
Offline

Joined: Fri Apr 08, 2011 6:38 am
Posts: 246
Location: Hamburg
Works! Thanks a lot!!

_________________
Nofretete ist nicht aus Freude am Kneten entstanden.


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

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: Baidu [Spider] and 5 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