New script vars to access some more bits of information:
_PlayerWeapon gives access to the player's base weapon, allowing to be checked separately from the currently wielded weapon, and provides another way to change it, include enabling and disabling the weapon.
PlayerLocalWeapon gives access to the weapon the player is currently wielding, allowing scripted changes of the local weapon without effecting the global weapon, including arming and disarming.
_Input give read-only access to the most recent command the player input.
_InputDirection gives read-only access to the movement direction of the most recent player input, or 4 if a non-movement command was input.
The two input commands required a new member variable in CCurrentGame, which is set by ProcessCommand. It should not need to be serialized, as its only purpose to allow the access during script processing, which can only happen as part of command processing.
New script vars to access some more bits of information:
_PlayerWeapon
gives access to the player's base weapon, allowing to be checked separately from the currently wielded weapon, and provides another way to change it, include enabling and disabling the weapon.PlayerLocalWeapon
gives access to the weapon the player is currently wielding, allowing scripted changes of the local weapon without effecting the global weapon, including arming and disarming._Input
give read-only access to the most recent command the player input._InputDirection
gives read-only access to the movement direction of the most recent player input, or 4 if a non-movement command was input.The two input commands required a new member variable in
CCurrentGame
, which is set byProcessCommand
. It should not need to be serialized, as its only purpose to allow the access during script processing, which can only happen as part of command processing.Thread 1: https://forum.caravelgames.com/viewtopic.php?TopicID=46100 Thread 2: https://forum.caravelgames.com/viewtopic.php?TopicID=46142