ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

object article question

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.

object article question

Postby razor77 » Sat Jul 23, 2016 2:14 pm

Hi i have a question about articles. how do you get adrift to display the actual article instead of "the" or "a" I have searched forum topics but just became more confused.

What i am trying to achieve is I have objects that have the article your such as your car. I want adrift to display that a character is sitting in "your" car instead of "the" car. I no i could use text overrides but i'd like to avoid that.

any help is appreciated thanks.
razor77
 
Posts: 86
Joined: Mon Sep 05, 2011 8:18 pm
Points: 10

Re: object article question

Postby ElliotM » Sat Jul 23, 2016 6:16 pm

Did you replace the articles in the object itself? When you create an object there is a three part field for article adjective and noun that help the game know how to refer to the object you are creating. If your car was a red car, then the three fields could 'your' 'red' 'car'.
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Re: object article question

Postby razor77 » Sat Jul 23, 2016 8:55 pm

yes the article is your but adrift is changing it to the.
razor77
 
Posts: 86
Joined: Mon Sep 05, 2011 8:18 pm
Points: 10

Re: object article question

Postby ElliotM » Sun Jul 24, 2016 3:13 am

Hopefully Campbell can come weigh in on this then as that isn't the behavior I would expect.
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Re: object article question

Postby saabie » Sun Jul 24, 2016 7:02 am

In any restriction or text box that you want to change so that it prints "your red car" instead of "the red car", you need to find all the "%object%.Name" and "%TheObject[%object%]%" functions and change them to "%object%.Article %object%.Name(None)"
saabie
 
Posts: 922
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 25

Re: object article question

Postby razor77 » Sun Jul 24, 2016 11:31 am

thanks saabie :)
razor77
 
Posts: 86
Joined: Mon Sep 05, 2011 8:18 pm
Points: 10

Re: object article question

Postby razor77 » Sun Jul 24, 2016 11:44 am

which one do i use? %object%.Name(none) or %object%.Article. I am slightly confused. lol
razor77
 
Posts: 86
Joined: Mon Sep 05, 2011 8:18 pm
Points: 10

Re: object article question

Postby saabie » Sun Jul 24, 2016 11:52 am

%object%.Article prints your article "your".
%object%.Name(none) prints the adjectives and noun without any articles at all, ie "red car".
Hence if you use both of them together you get "your red car".
saabie
 
Posts: 922
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 25

Re: object article question

Postby razor77 » Sun Jul 24, 2016 12:02 pm

oh gotcha sorry... feel silly now lol.
razor77
 
Posts: 86
Joined: Mon Sep 05, 2011 8:18 pm
Points: 10

Re: object article question

Postby razor77 » Sun Jul 24, 2016 12:39 pm

What if you are also using the charInsidewhat function? do i still use the above code?
razor77
 
Posts: 86
Joined: Mon Sep 05, 2011 8:18 pm
Points: 10

Re: object article question

Postby saabie » Sun Jul 24, 2016 12:54 pm

Yes, anything that returns an object key can be used in place of %object%.
saabie
 
Posts: 922
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 25

Re: object article question

Postby razor77 » Sun Jul 24, 2016 1:11 pm

got it thanks again saabie
razor77
 
Posts: 86
Joined: Mon Sep 05, 2011 8:18 pm
Points: 10

Re: object article question

Postby Campbell » Wed Jul 27, 2016 7:25 pm

%object%.Name(Indefinite) prints the object name with the indefinite (i.e. your) article, rather than the default which displays the definite (i.e. the) article.
ADRIFT Developer developer.
User avatar
Campbell
Site Admin
 
Posts: 4619
Joined: Sun Jun 23, 2002 11:05 am
Location: Edinburgh, Scotland

Re: object article question

Postby razor77 » Wed Jul 27, 2016 7:40 pm

thanks Campbell that simplifies things. lol
razor77
 
Posts: 86
Joined: Mon Sep 05, 2011 8:18 pm
Points: 10


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 4 guests

cron