Updating player after single player respawn

  1. 7 years ago

    So I've been running a single player mission -- not concerned about saving/loading -- and finally got a single-player respawn system designed to my liking. Working great, finally! Only problems are:

    1) My newly spawned unit is given the useractions "Arrest" and "Search". Is there a way to find these by ID and remove them?

    2) My new unit doesn't get updated on the tasks that were assigned to the old unit.

    I've been digging through the source but haven't been able to find (yet) where the JIP behaviour is handled; my pet theory is that I can just treat the newly spawned unit as a JIP client as soon as the player takes control again and call a corresponding ALiVE function, but I'm not sure what that function might be. Any pointers in the right direction?

  2. 1) My newly spawned unit is given the useractions "Arrest" and "Search". Is there a way to find these by ID and remove them?

    This action is given to all civilian units in the mission when civilian roles is enabled in the civ pop module. You can remove them on each spawn with the removeAllActions command.

  3. Ah, so no handles saved. Brute force approach it is! =)

 

or Sign Up to reply!