Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

[Sugarcube, Twine 2x] Random conversations, Conversations and the perameter.

$
0
0
Greetings,

So I'm trying to create a system which calls on randomly selected, predetermined dialogue.

The current system rolls a 1 - 22, and for the number that is true, the corresponding message shows, like this:
<<if $NPC1Talk eq 1>>

'We all scrape by, just some more than others.'

<<set $NPC1TalkLimit +=1>>

<<elseif $NPC1Talk eq 2>>

'I wish my doctor could see me now.'

<<set $NPC1TalkLimit +=1>>

<<elseif $NPC1Talk eq 3>>

'So many things we took for granted.'

<<set $NPC1TalkLimit +=2>>

<<elseif $NPC1Talk eq 4>>

"Extraneous message."

<<set $NPC1TalkLimit +=1>>

<</if>>


And the code for the limit:
<<if $NPC1TalkLimit gte 3>>

<<set $NPC1TalkLimitRANDOM to random(1, 10)>>
<<set $NPC1TalkLimitFull to true>>

<<if $NPC1TalkLimitRANDOM eq 1>>
'Sorry, I have things to do.'
<<elseif $NPC1TalkLimitRANDOM eq 2>>

'Can't stand around here chatting all day I'm afraid.. I best be off.'
<</if>>

And so on, so forth.

The $NPC1TalkLimit was part of my plan to ensure that no more than 1-3 comments (depending upon which ones) could surface from any given character, at any time. Once the discussion has been finished, and the npc has left, the number would be reset so that another conversation could take place should the player and any npc meet.

This is still a WIP but I was making good progress and had a few more ideas I wished to implement today. *Unfortunately*, this was not to be true in this circumstance.

I have set various <<if>> integers to determine whether the limit has been reached, and all of my attempts have ultimately resulted in failure. The text will *never* appear when set under *any* of my <<if>> perameters, and I truly have no idea why.

I truly hope that someone can shed some light on the situation. Much obliged, and thank you in advance.


Viewing all articles
Browse latest Browse all 1844

Trending Articles