Help with trigger

A forum to discuss custom scenarios, campaigns and modding in general.

Moderator: Panzer Corps 2 Moderators

Post Reply
Ezequiel1996
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 231
Joined: Sat Jun 13, 2020 6:58 am

Help with trigger

Post by Ezequiel1996 »

hi guys i need to have a trigger where in a certain turn, especific units of the AI change their behavior and starts moving towards an specific hex.
I need help with the lua scripting, i didn't found a trigger like that in the dlc's, how i should achieve that? what would be the script for this?
dalfrede
Colonel - Ju 88A
Colonel - Ju 88A
Posts: 1503
Joined: Wed Mar 15, 2017 7:48 pm

Re: Help with trigger

Post by dalfrede »

AIScrpt1.jpg
AIScrpt1.jpg (256.51 KiB) Viewed 744 times
There comes a time on every project when it is time to shoot the engineer and ship the damn thing.
dalfrede
Colonel - Ju 88A
Colonel - Ju 88A
Posts: 1503
Joined: Wed Mar 15, 2017 7:48 pm

Re: Help with trigger

Post by dalfrede »

AIScrpt2.jpg
AIScrpt2.jpg (208.47 KiB) Viewed 742 times
It appears the triggers can be done without using LUA at all.
There comes a time on every project when it is time to shoot the engineer and ship the damn thing.
Ezequiel1996
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 231
Joined: Sat Jun 13, 2020 6:58 am

Re: Help with trigger

Post by Ezequiel1996 »

thanks dalfrede, what tolerance means? its the turns that have to pass for that unit to start moving?
dalfrede
Colonel - Ju 88A
Colonel - Ju 88A
Posts: 1503
Joined: Wed Mar 15, 2017 7:48 pm

Re: Help with trigger

Post by dalfrede »

Duration is the number of turns the command will run.
Such as 'Patrol' for 5 turns, then goto next command.

Tolerance is for 'Base'.
ie if you are within 'Tolerance' you are at the Base, and will reinforce [assuming Harasser mode].

Base may have some additional uses.

Some things will have to be tested to get right, such as does 'Duration=5' mean mean next command starts on turn 5 or turn 6.
There comes a time on every project when it is time to shoot the engineer and ship the damn thing.
Post Reply

Return to “Panzer Corps 2 Scenario Design”