Atrummixer 说:
I also wish to make that certain village as foggy and as "dark" as possible with the weather 24/7, while the rest of the maps weather remains unaltered.
You'll need to set up a trigger to go into the various village mission templates.
In that trigger, you would use:
get_global_cloud_amount = 90 # (get_global_cloud_amount, <destination>), #returns a value between 0-100
set_global_cloud_amount = 91 # (set_global_cloud_amount, <value>), #value is clamped to 0-100
get_global_haze_amount = 92 # (get_global_haze_amount, <destination>), #returns a value between 0-100
set_global_haze_amount = 93 # (set_global_haze_amount, <value>), #value is clamped to 0-100
And then you'd need another trigger to re-set the cloud and fog after the mission is over.
So the first trigger would look something like:
插入代码块:
(ti_before_mission_start, 0, ti_once, [(eq, "$current_town", "p_village_##")] ,
[
(get_global_cloud_amount, "$cloud"),
(get_global_haze_amount, "$haze"), #need to be global variables so you can re-set to the same level after
(set_global_cloud_amount, 100),
(set_global_haze_amount, 80), #100 may be a bit much
]),
The re-set to normal trigger, unfortunately cannot be in mission templates as there is no "on_mission_end" trigger. (Very strange, but true.) Thus, you should use simple_triggers with something like this:
插入代码块:
(0,
[
(neq, "$cloud", -1),
(neq, "$haze", -1),
(set_global_cloud_amount, "$cloud"),
(set_global_haze_amount, "$haze"),
(assign, "$cloud", -1),
(assign, "$haze", -1),
]),