Is there an invasion script I can use? I've seen invasions in MB mods like SoD and I want to make an invasion in my mod
Lumos said:module_party_templates:
module_triggers:Code:("invaders","Invaders",icon_khergit|carries_goods(2)|pf_show_faction,0,fac_outlaws,bandit_personality,[(trp_swadian_knight,100,320),]), # I hate the evil swadians... :)
Code:(8765,0,ti_once,[],[ (set_spawn_radius, 4), (try_for_range, ":i", 0, 251), # 251 = number of invaders to spawn + 1 (spawn_around_party, "p_town_1", "pt_invaders"), (val_add, ":i", 1), # i++, so no "unused local var" message (try_end),
This will make 250 Invader parties spawn after a year passes. Change the "ti_once" to 0 if you want it every year.
tip>>Lumos said:(try_for_range, ":i", 0, 251), # 251 = number of invaders to spawn + 1
(val_add, ":i", 1), # i++, so no "unused local var" message
Excuse me, but the following statement was on the previous post:Maxim Suvorov said:tip>>Lumos said:(try_for_range, ":i", 0, 251), # 251 = number of invaders to spawn + 1
(val_add, ":i", 1), # i++, so no "unused local var" message
(try_for_range, ":unused", 0, 251),
Yeah, I'd been programming mostly on C# before I started learning the ModSys.Lumos said:I wrote that code a long, long time ago, I was almost a newbie back then. And in that same topic, dunde told me the same about the :unused var.
Lumos said:module_party_templates:
module_triggers:Code:("invaders","Invaders",icon_khergit|carries_goods(2)|pf_show_faction,0,fac_outlaws,bandit_personality,[(trp_swadian_knight,100,320),]), # I hate the evil swadians... :)
Code:(8765,0,ti_once,[],[ (set_spawn_radius, 4), (try_for_range, ":i", 0, 251), # 251 = number of invaders to spawn + 1 (spawn_around_party, "p_town_1", "pt_invaders"), (val_add, ":i", 1), # i++, so no "unused local var" message (try_end),
This will make 250 Invader parties spawn after a year passes. Change the "ti_once" to 0 if you want it every year.
CutContent said:but where does it state for it to be 250 days i dont see it in the module triggers
(8765,0,ti_once,[],[