Squirrel/Server/Functions/Pickups/Remove
From Liberty Unleashed Wiki
(Difference between revisions)
(Created page with '{{Squirrel/Title|Pickup.Remove}} __NOTOC__ This ''Pickup'' class member removes the given pickup. == Syntax == <code>bool pickup.Remove()</code> == Example == {{Squirrel/Needs…') |
(→Example) |
||
Line 8: | Line 8: | ||
== Example == | == Example == | ||
− | + | This will remove the pickup that the player just collected. | |
− | + | ||
<code lang="squirrel"> | <code lang="squirrel"> | ||
− | + | function onPickupPickedUp( pPlayer, pPickup ) | |
+ | { | ||
+ | pPickup.Remove(); | ||
+ | |||
+ | 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}} |
Latest revision as of 17:58, 23 October 2010
This Pickup class member removes the given pickup.
[edit] Syntax
bool pickup.Remove()
[edit] Example
This will remove the pickup that the player just collected.
function onPickupPickedUp( pPlayer, pPickup ) { pPickup.Remove(); return 1; }
[edit] Notes
The event onPickupPickedUp was used in this example. More info about this in the corresponding page.