Author Topic: iterate over all projectiles  (Read 152 times)

how would one do such a thing (specifically, to determine which ones are owned by a specific player)

or would it be easier/better to like.,keep a list of them as theyr created?

probably best to record them as they are created and register the player/client to the projectile

Code: [Select]
package recordProjectiles
{
function Projectile::onAdd(%this, %obj)
{
parent::onAdd(%this, %obj);
//Register the player and client objects to the projectile
if(isObject(%obj.client))
{
%this.creatorPlayer = %obj;
%this.creatorClient = %obj.client;
echo(""@%obj.client.name@" created a "@%this.dataBlock@" projectile");
}
}
};
activatePackage(recordProjectiles);

you could take it a step further and put them into a sim group for easy deletion or modification of all projectiles from a specific client/player
« Last Edit: May 09, 2026, 10:55:48 PM by Goth77 »

you could take it a step further and put them into a sim group for easy deletion or modification of all projectiles from a specific client/player
im listening

Add-on Link:
https://forum.blockland.us/index.php?topic=328787.0

if you have more suggestions to add for projectile modification that you need/think would be useful just lmk