This function creates a radial explosion. It is like pXent_addforceglobal, but the entity gets affected by a force that comes radial from one source (vPos).
entity | registered Entity pointer (Actor) |
vPos | vector position where the explosion / force comes from. |
force | the amount of the force / impluse |
radius | the radius of the explosion / force. If you set it to 0, it gets set to default: 1000 |
1 if successful, 0 otherwise.
Force accelerates entities according to the pX_setforcemode function.
If the force value is very high, the entity (Actor) is moving very fast. In this case you should use pX_setccd and pXent_setccdskeleton for the entity.
Fast
pX_setccd(1);
pXent_setccdskeleton(my, nullvector, 1);
pXent_addexplosion( my, nullvector, 50000,0);
pXent_addforceglobal, pX_setccd, pXent_setccdskeleton, pX_setforcemode