This is an old revision of the document!
<- PRPL reference <- Particles
Arguments | Result | Notation |
---|---|---|
pid | bool | [ int - bool ] |
Checks if the given particle is a virtual (hull) particle. Virtual particles are under each hull piece and are used for hit detection, however they are not dicoverable by functions like 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.
#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 particles created this frame:" <-hullParticles Trace2 endif