a lot of this can be discovered if you get yourself a good eval mod and run tests ingame
ProjectileData::onCollision(%data, %obj, %col, %fade, %pos, %normal)
%data is the datablock itself - whenever you call %obj.function() the very first thing passed in is %obj itself - in this case since the object is projectileData its actually the datablock, not the projectile itself. I might be wrong on why its the datablock though.
%obj is the projectile itself.
%col is the thing the %obj collided with. Use %col.getClassType() to see what type of object it is
%fade, %pos, %normal im not sure. Never really had to use them, but I bet they'd be useful for one thing or another, esp. %normal if it does what I think it does.
use a test package and rewrite it with a server running to do things and find out what they mean. here's one you can use:
package ChatMessageData{
function ProjectileData::onCollision(%data, %obj, %col, %fade, %pos, %normal)
{
talk(%data SPC ": datablock");
talk(%obj SPC ": projectile");
talk(%col SPC ": hit object");
talk(%fade SPC ": %fade");
talk(%pos SPC ": %pos");
talk(%normal SPC ": %normal");
parent::onCollision(%data, %obj, %col, %fade, %pos, %normal);
}
};
activatePackage(ChatMessageData);
Copy that, and in your eval mod/server console, type in "eval(getclipboard());" with a server running. A good eval mod is port's chateval, which supports data dumps into ingame chat as well as multiline eval. The trigger character is \. you may need to set $Pref::Server::ChatEval::SuperAdmin = 1; in console first.
https://github.com/portify/Server_ChatEval/blob/master/server.csyour goto function for figuring out what objects are given their ID is [obj].dump();. This will list out everything about said object, if it still exists.