StendhalScripting/Lua: Difference between revisions
Content deleted Content added
imported>AntumDeluge →NPCs: adding transitions |
imported>AntumDeluge →Adding Transitions: nested tables |
||
Line 367:
In this scenario, the NPC will respond if the player has money & is not naked.
Nested tables are supported as well:
<pre>
local conditions = {
newCondition("PlayerHasItemWithHimCondition", "money"),
{
newNotCondition(newCondition("NakedCondition")),
},
}
frank:add(ConversationStates.IDLE,
ConversationPhrases.GREETING_MESSAGES,
conditions,
ConversationStates.ATTENDING,
nil,
{
newAction("SayTextAction", "Hello."),
newAction("NPCEmoteAction", "looks greedily at your pouch of money.", false),
})
</pre>
==== Adding Merchant Behavior ====
| |||