Pickup.RespawnTime
From Liberty Unleashed Wiki
This Pickup class member returns or sets the respawn time of the given pickup.
Syntax
You can either return or set a new value using this member:
Integer pickup.RespawnTime
pickup.RespawnTime = integer iRespawnTime
Arguments
- iRespawnTime - This is the new respawn time for the pickup as a Integer in seconds.
Example 1. Returning
This will tell the player how long it will take the pickup to respawn in seconds.
function onPickupPickedUp( pPlayer, pPickup ) { MessagePlayer( "Pickup Respawn time: " + pPickup.RespawnTime, 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 respawn time of the collected pickup to 10 seconds.
function onPickupPickedUp( pPlayer, pPickup ) { pPickup.RespawnTime = 10; return 1; }
Notes
The event onPickupPickedUp was used in this example. More info about this in the corresponding page.