<- PRPL reference <- Particles
Arguments | Result | Notation |
---|---|---|
pid | bool | [ int - bool ] |
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 GetParticlesInRange.
One way to get the 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 (see IsEmergent).
#init once 0 ->lastPID endonce #get the current pid 0 0 0 0 0 0 CreateParticle ->pid <-pid 1 DestroyParticle #count hull particles CreateList ->hullParticles <-pid <-lastPid do I IsHull if <-hullParticles I AppendToList endif loop #update last Pid for the next frame <-pid ->lastPid #print the list of not empty <-hullParticles GetListCount neq0 if "Virtual hull particles created this frame:" <-hullParticles Trace2 endif