Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+2)

I'm assuming you only want the dialog to appear one time when the player gets to the card.


One way to do it is to put the "one time only" part of the script into an If statement, which checks some condition to see whether or not to play the scene and then modifies the condition once it's done.

In this case, I'm using a checkbox on the card named 'arriving' -- You can set a button to be a 'checkbox' in it's properties menu. Checkboxes either have a value (marked/True) or nothing (unmarked/False).

on view do
 if arriving.value # looks to see if the checkbox is True #
   dd.open[deck]
   dd.say["The first message."]
   dd.say["The second message."]
   dd.close[]
   arriving.value:0 #sets the checkbox to False so the scene doesn't repeat #
 end # the 'end' for the If statement #
play["bus sound" "loop"]
zazz.wave[card wave_bus 0.002]
go[card]
end

But we also need to make sure the checkbox is True when it needs to be.

On the script (whether in a button or not) that led to this card you can add

NameOfBusWaveCard.widgets.arriving.value:1

before the

go["NameOfBusWaveCard"]

to make sure the checkbox is marked True before the player gets there. Replace "NameOfBusWaveCard" with the actual name. :) And if you like how everything works, you can set this "arriving" widget's visibility to "None" to hide it from your user.

Hopefully this gives you a tool for setting things up how you want them! Please let me know if you need something else and I'll make a different example.