make the projectile a bot with no model and set its damage level to 100 so that its put onto the corpse mask so players can't collide with it and then parent the body remove function to add an exception to that datablock you can attach a light to it and an image for an emitter and you can adjust its physics settings to make it behave more like you want
lol this is probably the best approach.
Though i have absolutely no idea how bots work in blockland, let alone how to spawn them with a weapon.
And here is everything relevant about my OnFire function:
%p = new (%this.projectileType)()
{
dataBlock = %projectile;
initialVelocity = %velocity;
initialPosition = %obj.getMuzzlePoint(%slot);
sourceObject = %obj;
sourceSlot = %slot;
client = %obj.client;
};
MissionCleanup.add(%p);
%p.setScale(%scale SPC %scale SPC %scale);
%light = new fxlight()
{
dataBlock = BrightLight;
enable = true;
iconsize = 1;
};
%light.updatePositionLoop(%p);
%light.attachToObject(%p);
%obj.spawnExplosion(TTBigRecoilProjectile,"4 4 4");
It works fine, some of the variables are declared elsewhere though. %light.updatePositionLoop and %light.attachToObject are the only ones that don't work.
attachToObject doesnt return an error anymore but still doesn't destroy the light alongside the projectile, and the update loop gives me the error mentioned before. And because the light is never destroyed, the loop keeps going forever.
Also, wtf is with torquescript's php-like variables and structure? Also, why is so much of all the game mechanics down to the engine and can't be modified? It would've been easier just to modify the original projectile code and remove the 20.0-unit limit on the projectile light.