Category: Objects
/ Status
Since engine version: 5.1 OC
| Constant | Value | Meaning |
|---|---|---|
| PHYS_Current | 0 | The physical attributes are changed in the current mode (temporary or permanent) of the object. |
| PHYS_Permanent | 1 | The physical attributes are changed in permanent mode. This modifies the info section of the associated crew object, which means that the changes will be written to the player file as well. Only player crew objects have a permanent info section. |
| PHYS_Temporary | 2 | The object will be set to temporary physical mode, and a temporary info section will be created if none exists already. Use ResetPhysical to reset temporary physicals to permanent mode. |
| PHYS_StackTemporary | 3 | Like PHYS_Temporary, but the previous physical-value will be backed up and can be restored by calling ResetPhysical. |
func ControlUse(object eater)
{
eater->SetPhysical("Energy", 10000000, PHYS_Temporary);
eater->DoEnergy(1000);
RemoveObject();
}
protected func FxJumpBoostStart(object trg, effect, int temporary)
{
trg->SetPhysical("Jump", trg->GetPhysical("Jump", PHYS_Current) + 10000, PHYS_StackTemporary);
return FX_OK;
}
protected func FxJumpBoostStop(object trg, effect, int reason, bool tmp)
{
trg->ResetPhysical("Jump");
return FX_OK;
}