Squirrel/Server/Functions/Pickups/Remove

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(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 ==
  
{{Squirrel/NeedsExample}}
+
This will remove the pickup that the player just collected.
Explanation for the example
+
  
 
<code lang="squirrel">
 
<code lang="squirrel">
-- Todo
+
function onPickupPickedUp( pPlayer, pPickup )
 +
{
 +
pPickup.Remove();
 +
 +
return 1;
 +
}
 
</code>
 
</code>
  
 
=== Notes ===
 
=== Notes ===
  
-- List of used functions and other notes here.  
+
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

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events


This Pickup class member removes the given pickup.

[edit] Syntax

  1. bool pickup.Remove()

[edit] Example

This will remove the pickup that the player just collected.

  1.  
  2. function onPickupPickedUp( pPlayer, pPickup )
  3. {
  4. pPickup.Remove();
  5. return 1;
  6. }
  7.  

[edit] Notes

The event onPickupPickedUp was used in this example. More info about this in the corresponding page.

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox