<- [[.:prplreference| PRPL reference]] <- [[.:prplreference#particles|Particles]] ===== IsHull ===== ^Arguments^Result^Notation^ | pid | bool | [ int - bool ] | === Description === 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]]. 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 [[prpl:isemergent|IsEmergent]]). === Examples === #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