How to Apply LUA file to campaign scenario
Posted: Tue Apr 19, 2022 3:11 am
Hello,
I am making a custom campaign. I have made several scenarios and am using >my documents >campaigns to have them appear in the game as a custom campaign. All is working fine, including the campaign script tree and campaign LUA file.
Problem is, individual LUA trigger files (ex: Wlodawa.Lua in same campaigns folder directory as Wlodawa.pzc2) does not seem to apply to levels when played in the game, despite applying to them when run from the editor.
Example: I have a Lua trigger file for a map, I run the map from the editor and all the custom triggers work (ex: player gets notifications and rewards for certain tasks). However, I run the level from selecting the custom campaign in the game menu and the triggers do not fire (the rest of the map works as intended).
Do the Lua files for triggers need to be placed somewhere other than within the same directory as the map files with the same name? Or is there a certain function/Lua script that I need to add/remove from the files to have them apply when played from the game?
I am using edited versions of script from the DLC and main campaign as a base, as I am new to LUA.
Any suggestions are appreciated.
I am making a custom campaign. I have made several scenarios and am using >my documents >campaigns to have them appear in the game as a custom campaign. All is working fine, including the campaign script tree and campaign LUA file.
Problem is, individual LUA trigger files (ex: Wlodawa.Lua in same campaigns folder directory as Wlodawa.pzc2) does not seem to apply to levels when played in the game, despite applying to them when run from the editor.
Example: I have a Lua trigger file for a map, I run the map from the editor and all the custom triggers work (ex: player gets notifications and rewards for certain tasks). However, I run the level from selecting the custom campaign in the game menu and the triggers do not fire (the rest of the map works as intended).
Do the Lua files for triggers need to be placed somewhere other than within the same directory as the map files with the same name? Or is there a certain function/Lua script that I need to add/remove from the files to have them apply when played from the game?
I am using edited versions of script from the DLC and main campaign as a base, as I am new to LUA.
Any suggestions are appreciated.