Pickup.OneTime
From Liberty Unleashed Wiki
This Pickup class member returns/sets whether the given pickup removes when you hit it.
Syntax
You can either return or set a new value using this member:
Bool pickup.OneTime
pickup.OneTime = bool bOneTime
Arguments
- bOneTime - A boolean representing whether the given pickup removes when you hit it.
Example 1. Returning
This will tell the player the current OneTime status of the pickup they collected.
function onPickupPickedUp( pPlayer, pPickup ) { MessagePlayer( "Pickup One Time: " + pPickup.OneTime, pPlayer ); return 1; }
Notes
The function MessagePlayer and event onPickupPickedUp were used in this example. More info about them in the corresponding pages.
Example 2. Setting
This will set the pickup they collected to be OneTime
function onPickupPickedUp( pPlayer, pPickup ) { pPickup.OneTime = true; return 1; }
Notes
The event onPickupPickedUp was used in this example. More info about this in the corresponding page.