Examples
Item: item1
Item: item2
Item: chest {
items: [item1, item2]
trapped: true
Event: "Take Content" {
// It is required to open the chest in order to take the content
// So if the "Open" event is enabled, it should trigger first
if (isEnabled("Open")
trigger("Open)
// Gives every item in the items list to the player
foreach(Item in items as item)
player.giveItem(item)
}
Event: "Open" {
if (trapped)
display("You sprung a trap when you opened the chest!")
disableEvent("Open")
// Disables the "Open" event because the chest is now open
}
}