intfiction.org

The Interactive Fiction Community Forum
It is currently Sat Jan 19, 2019 7:10 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Mon Jan 14, 2019 6:13 am 
Offline

Joined: Fri Oct 06, 2017 8:19 am
Posts: 31
Hi,

Struggling to learn how to command first time actions.

In my game the first time you sing in a specific location one thing happens (specific text and item added to inventory).

Singing again in same location should generate different text and no other action.

So far I have:

Singing is an action applying to nothing.

Understand "sing" as singing.

Instead of singing when the location is not the town square:
say "non town square response".

Instead of singing when location is the town square:
INSERT FIRST TIME THINGS HERE SOMEHOW
Otherwise - XXXXXXXXX


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Jan 14, 2019 2:05 pm 
Offline

Joined: Mon Dec 15, 2014 9:15 am
Posts: 404
Code:
Instead of singing:
       say "This doesn't seem like an appropriate place for it."

Instead of singing in the Town Square for the first time:
      say "A man comes up and gives you a salami.";
      move the salami to the player.

Instead of singing in the Town Square:
       say "No more salami is forthcoming."


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Jan 14, 2019 3:02 pm 
Offline

Joined: Fri Oct 06, 2017 8:19 am
Posts: 31
Perfect. Thank you.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Jan 14, 2019 4:30 pm 
Offline

Joined: Tue Jan 26, 2016 9:35 am
Posts: 67
You can also use [one of] [or] [or] [stopping] in a say statement if you need to seperate between different attempts.

This will cycle trough the "or" options one by one and repeat the last one ad infinitum.

[pseudo code!]
instead of asking the woman about her name:
Say "[one of]My name is Mary![or]I already told you my name![or]The woman just glares at you.[stopping]";


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

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], GiannisG and 16 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