Squirrel/Server/Functions/Pickups/Respawn
From Liberty Unleashed Wiki
(Difference between revisions)
(Created page with '{{Squirrel/Title|Pickup.Respawn}} __NOTOC__ This ''Pickup'' class member respawns the given pickup. == Syntax == <code>bool object.Respawn()</code> == Example == {{Squirrel/Ne…') |
(→Example) |
||
Line 8: | Line 8: | ||
== Example == | == Example == | ||
− | + | This will respawn the pickup that the player just passed through. | |
− | + | ||
<code lang="squirrel"> | <code lang="squirrel"> | ||
− | + | function onPickupPickedUp( pPlayer, pPickup ) | |
+ | { | ||
+ | pPickup.Respawn(); | ||
+ | |||
+ | return 1; | ||
+ | } | ||
</code> | </code> | ||
=== Notes === | === Notes === | ||
− | + | The event [[Squirrel/Server/Events/Pickup/onPickupPickedUp|onPickupPickedUp]] was used in this example. More info about this in the corresponding page. | |
− | + | ||
== Related Functions == | == Related Functions == | ||
{{Squirrel/Server/Functions/Pickups}} | {{Squirrel/Server/Functions/Pickups}} |
Revision as of 17:59, 23 October 2010
This Pickup class member respawns the given pickup.
Syntax
bool object.Respawn()
Example
This will respawn the pickup that the player just passed through.
function onPickupPickedUp( pPlayer, pPickup ) { pPickup.Respawn(); return 1; }
Notes
The event onPickupPickedUp was used in this example. More info about this in the corresponding page.