<- PRPL reference <- Particles
Arguments | Result | Notation |
---|---|---|
pid | bool | [ int - bool ] |
Emergent is implemented as a virtual particle. Virtual particles exists for hit detection purpouses, but they are not discoverable by functions like GetParticlesInRange.
This function checks if the given pid is an virtual emergent particle.
One way to get the emergent ID is to watch the current PID counter (by creating a particle on each frame) and calling this function (IsEmergent) to check if that particle is a virtual emergent particle.
There are also virtual particles under each ship's hull (see IsHull).
#init once 0 ->lastPID endonce #get the current pid 0 0 0 0 0 0 CreateParticle ->pid <-pid 1 DestroyParticle #count hull particles CreateList ->emergentParticles <-pid <-lastPid do I IsEmergent if <-emergentParticles I AppendToList endif loop #update last Pid for the next frame <-pid ->lastPid #print the list of not empty <-emergentParticles GetListCount neq0 if "Emergent created this frame:" <-emergentParticles Trace2 endif