Thanks very much for the help andrew-101 and Moguri.
I also found this useful list of methods:
My script is working and now I have a better idea of how to do start trying other things.
This is what I ended up with. It seems to be working. I’m not sure if I need the addActiveActuator() line at all or if I could just get by with only using instantAddObject(). I figured I would leave it in, so I remember the command for later use.
This generates 3 to 5 pieces of random debris when an object is hit. I also use a standard End Object logic brick along with this.
rollpieces = random.randint(3,5)
for i in range(0,rollpieces):
rolldebris = random.randint(0, 3)
debrislist = ["Debris", "Debris.001", "Debris.002", "Debris.003"]
rollvelx = random.randint(-3,3)
rollvely = random.randint(-3,3)
rollvelz = random.randint(-3,3)
if i < (rollpieces-1):