User Tools

Site Tools


prpl:ishull

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revisionBoth sides next revision
prpl:ishull [2018/06/17 13:51] – created kajacxprpl:ishull [2018/06/17 14:17] – changed description kajacx
Line 8: Line 8:
  
 === Description === === Description ===
-Checks if the given particle is a virtual (hullparticle. Virtual particles are under each hull piece and are used for hit detection, however they are not dicoverable by functions like [[prpl:getparticlesinrange|GetParticlesInRange]].+Checks if the given particle is a virtual hull particle. Virtual hull particles are under each hull piece and are used for hit detection, however they are not dicoverable by functions like [[prpl:getparticlesinrange|GetParticlesInRange]].
  
-The only way to get a virtual particle ID is to watch the current PID counter (by creating a particle on each frame) and calling this function (IsHull) to check if that particle is a virtual particle.+The only way to get a virtual hull particle ID is to watch the current PID counter (by creating a particle on each frame) and calling this function (IsHull) to check if that particle is a virtual hull particle. 
 + 
 +Emergent is also implemented as a virtual particle.
  
 === Examples === === Examples ===
Line 22: Line 24:
 0 0 0 0 0 0 CreateParticle ->pid 0 0 0 0 0 0 CreateParticle ->pid
 <-pid 1 DestroyParticle <-pid 1 DestroyParticle
- 
  
 #count hull particles #count hull particles
Line 37: Line 38:
 #print the list of not empty #print the list of not empty
 <-hullParticles GetListCount neq0 if <-hullParticles GetListCount neq0 if
-    "Virtual particles created this frame:" <-hullParticles Trace2+    "Virtual hull particles created this frame:" <-hullParticles Trace2
 endif endif
 </code> </code>
  
prpl/ishull.txt · Last modified: 2018/06/17 14:25 by kajacx