ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Change of object name

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.

Change of object name

Postby Po. Prune » Mon Apr 16, 2012 7:19 am

Is it possible to change the name of an object?
For instance, if the player examines a skull and finds a loose tooth. If s/he takes it it will look silly to still have it named the loose tooth.
I know it can be done by creating two objects and swapping them the first time the player take the tooth, but I'm just wondering if there's an easier way. :anyone:
D-Day V.5 in progress 79Kb so far (slowly getting there)
The Inheritance (Annual Adrift Comp. entry) in progress
User avatar
Po. Prune
Moderator
 
Posts: 3428
Joined: Mon Jun 24, 2002 8:18 am
Location: Denmark

Re: Change of object name

Postby adriftste » Mon Apr 16, 2012 7:46 am

Is it possible to change the name of an object?

This isn't possible, I thing swapping two objects is your best solution.
adriftste
 
Posts: 455
Joined: Fri Aug 22, 2008 12:43 pm
Location: England

Re: Change of object name

Postby Po. Prune » Mon Apr 16, 2012 8:50 am

Thanks, that's what I thought...
I've created two objects and it works fine. I had just hoped there was an easier way.
D-Day V.5 in progress 79Kb so far (slowly getting there)
The Inheritance (Annual Adrift Comp. entry) in progress
User avatar
Po. Prune
Moderator
 
Posts: 3428
Joined: Mon Jun 24, 2002 8:18 am
Location: Denmark

Re: Change of object name

Postby Duncan_B » Mon Apr 16, 2012 2:30 pm

Why not have a variable as part of the name (the %loose% tooth) that changes when the player picks it up?
See my IF stuff on IFWiki.
Check out my blog for other writing related stuff.
User avatar
Duncan_B
 
Posts: 1208
Joined: Fri Apr 01, 2005 8:26 pm
Location: Santa Cruz, California

Re: Change of object name

Postby adriftste » Mon Apr 16, 2012 3:05 pm

This certainly works for the displayed name of the object, however it is not possible to refer to the tooth by the variable.

x tooth is fine however x loose tooth or x pulled tooth or x whatever tooth could only be refered to by the player as x tooth or x %loose% tooth. (assuming that %loose% is the adjective and tooth is the noun).
adriftste
 
Posts: 455
Joined: Fri Aug 22, 2008 12:43 pm
Location: England

Re: Change of object name

Postby ralphmerridew » Mon Apr 16, 2012 9:53 pm

Just have "loose" and "pulled" as synonyms. The player will be able to refer to it as "pulled tooth" before extracting it, but so what?

(In Inform or TADS, it would be possible to have a single object and adjust whether "loose" or "pulled" is a valid synonym at runtime, but that's probably overkill for this problem.)
Bloodhounds can make you laugh and cuss in the same breath. They are endearing, faithful, and can sling drool ten feet in any direction. -- Virginia Lanier
User avatar
ralphmerridew
 
Posts: 2199
Joined: Fri Dec 13, 2002 11:56 pm
Location: Missouri

Re: Change of object name

Postby Po. Prune » Tue Apr 17, 2012 6:59 am

Thanks to all for the replies.
I went with the swapping of objects and it works ok.
:Thanks:
D-Day V.5 in progress 79Kb so far (slowly getting there)
The Inheritance (Annual Adrift Comp. entry) in progress
User avatar
Po. Prune
Moderator
 
Posts: 3428
Joined: Mon Jun 24, 2002 8:18 am
Location: Denmark


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 1 guest