Reinforcements have arrived

RenoRocks

First time out of the vault
OK fun stuff

The attempt to solve mid mission squad management by putting in a recruits master (you can make an APC a recruit master) leads to some interesting effects. You can actually send KIA squaddies back to the recruits pool. Back at the base you can recruit them where they show up still completely eviscerated in the barracks. They are nonetheless removed from your squad when you exit the base. You can repeat this over a couple of missions and the recruits master will stand in an ever growing mountain of goop, corpses and giblets.



An interesting spectacle but it is not really helpful to my project which started out as an attempt to have a temporary doctor join up, heal up and then return to duty.

As noted in another post placing squad members in a mission prior to entry can screw up the squad organisation as your usual guys get displaced by the additions. Troops added by trigger do not displace regulars but when switching from a computer controlled player the sentry mode is messed up and enemies have to be manually targeted.

The best solution I have found is to start them off as player one, switch them to another player to sort out squad organisation and when changed back the sentry mode works fine.

The trigger format is as follows.


START TRIGGER
set descending timer extras to five seconds.

condition timer extras is four seconds

change unit bosbaby to player extras

NEW TRIGGER
condition timer extras is one second

change unit bosbaby to player one.



Omit the last part to add troop from a speech event or whatever you want.

You can also remove troops that are KIA without waiting for the usual mission end, which I find helps keep things tidy.

Unit bosbaby has 1 deaths at anywhere

change unit bosbaby to player scenery.



Units that are to be removed or worked with in other ways have to be individually tagged. The units that were given the same tag were not removed upon being exploded even when the trigger was set to be preserved. This may be because the condition of 1 deaths has already been satisfied. Unfortunately triggers are not a programming language so there doesn't seem to be a way to reset the count.



There are interesting possibilities to this which include having temporary companions on a mission or on the flip side one of your squad could turn traitor in the middle of a map. Maybe allowing raiders to join is a bit too inclusive of the brotherhood.
 
I think I have an idea of what is going on inside the game when new squad members added by a trigger lose sentry mode behaviors, and those which are removed lose AI scripting.

There are two special entity types attached to Actor entities. One, BaseAI, controls the typical AI behaviors (e.g. following waypoints). The other, SentryAI, controls the sentry behavior for squad members.

From what I've seen, when the map is loaded, the right AI type is attached to each Actor. And when recruits are added via the recruit master, the SentryAI is added correctly. But when an Actor is changed to or from the squad by a trigger, it doesn't get the right AI type added.

This is on my to-fix list. I can maybe add a hook at the change player trigger action, check if the entity is entering or leaving the player's squad, and create an appropriate default BaseAI or SentryAI (which, once I get those fully editable, can be further modified by script events).
 
Back
Top