HomeIndex

Yack Commands

TBD
isYacking()
Returns true if a yack conversation is happening.
yackActor1()
Returns the first party in a yack conversation.
Within a .yack file it's better to use player.
yackActor2()
Returns the second party in a yack conversation.
Within a .yack file it's better to use other.
defineYack(name)
Call once from defineYacks.dinky
Runs a pre-test on syntax plus runs the === init === code.
yackChoices()
Returns the number of yack choices showing
This is the number of choices at the moment it is called. Most common use for the yackChoices() is to see how many choices are showing while building a choice list. It is not the total choices to be shown, just the number up to that point.
It is most commonly called from .yack scripts to find out if there are no active choices.
areChoicesShowing()
Returns true if yack choices are showing and waiting for input.
onKeyYack(key, flags)
Called when a key is pressed while yack choices are showing.
_startYack(actor1, actor2)
Called when a yack conversation is started.
actor1 or actor2 can be null if there is no actor, or only one actor involved in the conversation.
_endYack()
Called when a yack conversation is ending.
_beginYackChoices()
Called before choices are displayed.
_endYackChoices()
Called when yack choices need to be cleaned up.
_showYackChoices()
Called after all the choices have been added and when they are ready to be displayed.
_addYackChoice(index, text, label)
Called for each yack choice.
index is 1, 2, 3, ..., and can is passed back to the engine when selected.
text is the text to be displayed. label is the label to jump to if selected (no longer used)
startYack(actor1,actor1,filename)
Starts a .yack file conversation between 2 actors.
The filename is a .yack file and can also include a label to jump to.
startYack(currentActor, willy, "Willy:want_dime")
will start the conversation and jump to the want_dime node. If no label is given, it will jump to start. The start node is required.
By convention, there should be a init and a start node. init is called by the system at the beginning of the game for every .yack file. This is useful for setting variables.
endYack()
Ends a .yack file conversation.
Conversations naturally end, but there might be a need to end it outside the conversation .yack file.
yackChoice()
Call when the player makes a choice in a .yack file.