Page 1 of 1

How to commence hostilities

Posted: Sun Mar 19, 2017 3:26 pm
by spriksprak
Hi there, I'm trying to create a mission that has some faction fighting. I'd like to be able though to have their ai/faction parameter trigger on the character reaching a certain point (hotspot?) or after a dialogue piece.

Does this exist/is doable yet or should I look at redesigning?

Any help appreciated!

Re: How to commence hostilities

Posted: Sun Mar 19, 2017 5:30 pm
by merlyn
A simple way to do it might be to have a faction added to the player and enemies on spawn, then add a custom hotspot. In the script for that hotspot, when you enter it, check that the character that entered is the player. If it is the player, then remove that faction.

If you are using the Overgrowth campaign hotspot, it may be possible to mod that to add a "goal_N_post" event of "remove_faction <id1>, <id2>" etc, and have a whole group of NPCs have their faction removed. That way you could have a bunch of NPCs on your team, and have them fight a bunch of NPCs on another team, triggered after a dialog finishes.

Re: How to commence hostilities

Posted: Sun Mar 19, 2017 11:37 pm
by Constance
You can put this at the end of your dialogue file:
send_level_message "make_participants_aware"
Also set their Focus and Peripheral FOVs to 0 using the parametre menu (U while a character is selected).
This way, once the dialogue is finished, all participants in the dialogue will be aware and combative of each other.

Alternatively, I have this custom hotspot script:
https://hastebin.com/sulacuhani.cs
Upon entry, the characters inside will have their teams changed to whatever the parametre says. The 'Play for NPCs' checkbox decides whether or not this'll work for NPCs. If checked, it'll work for both players and NPCs.

Re: How to commence hostilities

Posted: Mon Mar 20, 2017 2:48 pm
by spriksprak
Thanks for the responses, appreciate it! Will give them a go