Using triggers not specific situations
Problems this article is helping with:
- Running out of specific event triggers
- Complex logic to fire triggers
- Repeating triggers
With the update for 'Specific situation' trigger events in IW being set at 10 you may run out of these trigger situations quickly. This guide shows you how to use trigger events instead of the specific situations. This will be even more helpful for triggers and situations you want to repeat.
For this you'll need a tracked item, a trigger event and of course, your situation
Situation for this example "When the player character talks to Charlotte" - Result "Charlotte gives the player character a cookie"
Tracked item:-[edit]
Data type: Text
Description: Meeting Charlotte
Visibility: One of the AI options
Automatically update tracked item - Yes
Update Instructions: Whenever I meet Charlotte inperson set the value of this tracked item to Yes
Initial value: No
Trigger event:-[edit]
Trigger based on tracked item value: Meeting Charlotte - Contains specific string - Yes
Effects - Whatever it is you're trying to do - "Charlotte gives the player character a cookie"
More advanced uses[edit]
Ok, that's the basics of this, But it's quite a powerful tool so we can make it work harder for us. Lets say we want this event to trigger every time we meet charlotte, but only once every time we meet her. We can use the same trigger to reset the value back to No, But this will create another problem, the AI will probably keep setting the tracked item back to Yes while we're talking to her - Not what we want.
It's worth remembering at this stage that the outcomes can be very complex, this guide is keeping to basic out comes so that you can fill in the blanks. Because this particular example is checking 3 states of tracked items, each of which could have their own complex triggers.
So for this one we're going to use a couple of extra triggers and tracked items
The Tracked items are now tracking when we meet her - Yes/No, cookie given- Yes/No and leave her - Yes/No
Tracked item 1:-[edit]
Name: Meeting Charlotte
Data type: Text
Description: An indicator of weather I have met Charlotte
Visibility: One of the AI options
Automatically update tracked item - Yes
Update Instructions: Whenever I meet Charlotte inperson set the value of this tracked item to Yes
Initial value: No
Tracked item 2:-[edit]
Name: Cookie Charlotte
Data type: Text
Description: Has charlotte given the player character a cookie
Visibility: One of the AI options
Automatically update tracked item - Yes
Update Instructions: None
Initial value: No
Tracked item 3:-[edit]
Name: Leaving Charlotte
Data type: Text
Description: Has charlotte given the player character a cookie
Visibility: One of the AI options
Automatically update tracked item - Yes
Update Instructions: Whenever the player character and Charlotte part ways, or physically separate set this tracked item to Yes
Initial value: No
Trigger event 1:-[edit]
Name: Charlotte Gives cookies
Trigger based on tracked item value: Meeting Charlotte - Contains specific string - Yes
Trigger based on tracked item value: Cookie Charlotte - Contains specific string - No
Allow event to trigger more than once - Yes
Effects - Whatever it is you're trying to do - "Charlotte gives the player character a cookie"
Effects - Set the Value of a tracked item: Cookie Charlotte - Yes
Trigger event 2:-[edit]
Name: Charlotte reset
Trigger based on tracked item value: Meeting Charlotte - Contains specific string - Yes
Trigger based on tracked item value: Cookie Charlotte - Contains specific string - Yes
Trigger based on tracked item value: Leaving Charlotte - Contains specific string - Yes
Allow event to trigger more than once - Yes
Effects - Whatever it is you're trying to do - "Charlotte returns home to begin baking another batch"
Effects - Set the Value of a tracked item: Cookie Charlotte - No
Effects - Set the Value of a tracked item: Cookie Charlotte - No
Effects - Set the Value of a tracked item: Cookie Charlotte - No
Effects - Change the Value of a tracked item: Timer - Increase by 1
Further thoughts[edit]
You'll see in the final tracked item I have included Increase timer by 1. This means that we could have another trigger that is triggered when that counter reaches 7 - Maybe charlotte brings round a cake? You could use this to ensure a character does chores for 7 days in a row, eats 3 meals a day. basically anything.
Yes/No statements can be chained together to make quite dramatic logic checks. This is also useful since you could have a tracked item that records the last trigger that fired, meaning you can make ladder like increments to logic chans based on the last trigger that fired. Note this is different to "Fire only when another trigger has fired" this would be specifically "Fire only if the last trigger that fired was [Specific trigger]"