I have previously asked a question on how to have a bullet hit the center of the screen, and I received a .blend. It confused me a little bit, as it included python and I am not familiar with python. The code reads:
import bge
controllor = bge.logic.getCurrentController()
scene = bge.logic.getCurrentScene()
target = scene.objects['target']
ray = controllor.sensors['Ray']
if (ray.hitObject and not 'bullet' in ray.hitObject):
target.worldPosition = ray.hitPosition
Does this mean the bullet has to always be called "bullet," I have multiple weapons, and multiple bullet shapes, speeds, damages, etc. Would I need to duplicate this script for every bullet type? Would I add commas to the script and show other bullet names? How would I let this script work for all my weapons?