Squirrel/Client/Events/Sphere/onClientEnterSphere

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Notes)
(Notes)
Line 26: Line 26:
  
 
-- List of used functions and other notes here.
 
-- List of used functions and other notes here.
-CreateVehicle
+
CreateVehicle,
-sphere.Pos
+
sphere.Pos                                                        
-Also note that this may spawn the car out of bounds, depending where you placed the sphere. You must have free space -3 x from the sphere so your vehicle won't get stuck!
+
Also note that this may spawn the car out of bounds, depending where you placed the sphere. You must have free space -3 x from the sphere so your vehicle won't get stuck!
  
 
== Related Events ==
 
== Related Events ==

Revision as of 18:32, 2 July 2015

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

This event is called when the local player enters a sphere

Syntax

  1. function onClientEnterSphere( sphere )

Arguments

  • sphere - The pointer of the sphere entered

Example

Some explanation here


Example 1: Spawn a sentinel near the sphere when entered

  1.  
  2. function onClientEnterSphere(sphere)
  3. {
  4. CreateVehicle( 95, Vector( sphere.Pos.x - 3, sphere.Pos.y, sphere.Pos.z + 0.5 ), 90 );
  5. }
  6.  

Notes

-- List of used functions and other notes here. CreateVehicle, sphere.Pos Also note that this may spawn the car out of bounds, depending where you placed the sphere. You must have free space -3 x from the sphere so your vehicle won't get stuck!

Related Events

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox