Update to
1.7!
~ Fixes/Changes ~
- Mail was doubling when loading a previously saved game (let me know if this continues to be a problem! Thanks to @solaris1111 for helping me find the issue!)
- Mail is now considered "read" when you press W(default) to move the cursor to the mail window, as opposed to placing the cursor over the mail title.
- JK Mail Editor Updates:
JK Mail Editor will now automatically find the Mail.json file in your game project, or create one if it's not there.
- The editor must be placed in your project's root directory, or else it will give you a message saying it can't open!
- Removed the options to "Open" and "Save As" as a result
~ New Feature - Mail Triggers~
Now, you can trigger "events" upon reading a message! You can use triggers to turn a switch on upon reading a message, set a variable, call a common event, or even perform a script call! Each message can only have 1 trigger at a time.
Your messages in the Mail.json file must be edited as follows (this is done for you if you use the JK Mail Editor tool):
"trigger":"1,2,3"
Where
1 is the type of trigger you want to perform:
s to set a switch. If the switch is off, it will turn on, and vice versa.
v to set a variable. It will OVERWRITE the previous value.
c to run a common event.
j to run a script call.
Put any other value to have no trigger.
And
2 will have a different function depending on
1:
For switches, variables, or common events,
2 will be the index
(FOR VARIABLES,
3 represents the value to set the variable at index
2,
and is NOT used for any other value of
1)
For a script call,
2 will be the script itself
EXAMPLE:
"trigger":"j,$gameVariables.setValue(1,4);" <- This is using the script call to set variable 1 to the value 4
"trigger":"v,1,4" <- this is doing the same as above
"trigger":"s,45" <- this is setting switch 45. If it was OFF, it will now be ON. If it was ON, it will now be OFF.
"trigger":"c, 9" <- this calls common event 9. Note that it will NOT run until you exit the mail window.
"trigger":"0" <- this does nothing
NOTE: If you add the same mail more than once, or are in a situation where
the same message will be in the "unread" state more than once, the trigger
WILL run again! This might be addressed in a future update if needed.
In addition, triggers will NOT activate until you exit the mail scene!
The mail editor has been updated to allow for trigger-setting by placing a new tab in the bottom-right hand side of the editor window.
As always, please keep the feedback coming!