I designed a gun of mine to load an extra round into the firing mechanism each time you right click, allowing you to fire up to 3 rounds at once.
This all works just fine, but I'm having another issue. Logically, if 3 rounds were fired at once, then 3 casings should be ejected. I do not know how to spawn a debris data through functions. This is what I tried:
%s = new (%this.DebrisType) ()
{
dataBlock = %debris;
initialVelocity = %sVelocity;
initialPosition = %obj.getEjectPoint(%slot);
sourceObject = %obj;
sourceSlot = %slot;
client = %obj.client;
};
Which didnt work, needless to say. It made my console error with "Unable to instantitate non-conobject class ."
Any idea on how this is actually done?