Page MenuHomeFeedback Tracker

Reviving dead units
Acknowledged, WishlistPublic

Description

What are the fundamental differences between a living playable unit and a dead unit?

I manage to get as far as re-possessing the dead body but not actually able to control it. The following code demonstrates this and also attempts at re-animating the dead body back into a playable unit.

  • spawn {

oldUnit = player;
_g = createGroup west;
newUnit = _g createUnit ["B_soldier_AT_F",position player, [], 0 ,"NONE"];
addSwitchableUnit newUnit;
selectPlayer newUnit;
oldUnit setDamage 1;

sleep 3;

oldUnit setDamage 0;
oldUnit enableAI "MOVE";
oldUnit enableAI "ANIM";
oldUnit setUnconscious false;

addSwitchableUnit oldUnit;
selectPlayer oldUnit;
disableUserInput false;
player switchMove "";
player switchCamera "External";
};

Being able to do this will allow us to "revive" a player without convoluted code that memorise the player's exact loadout before death and clones the exact loadout on the newly-respawned unit after death.

Details

Legacy ID
2467131866
Severity
None
Resolution
Open
Reproducibility
Always
Category
Multiplayer
Steps To Reproduce

Refer code above.

Event Timeline

cyckuan edited Steps To Reproduce. (Show Details)Oct 11 2014, 3:38 AM
cyckuan edited Additional Information. (Show Details)
cyckuan set Category to Multiplayer.
cyckuan set Reproducibility to Always.
cyckuan set Severity to None.
cyckuan set Resolution to Open.
cyckuan set Legacy ID to 2467131866.May 7 2016, 7:35 PM