I am trying to make my FPS game to where once the ray hits the object and the fire button is pushed, the the ray ( crosshair ) sends a message to the object that was last hit a message to either lose health or be pushed bak. The only thing is that evry time i run the game engine, it always says "function takes exactly two argunments,only 1 given.
heres the script im using…
cont = GameLogic.getCurrentController()
own = cont.getOwner()
fire = cont.getSensor(“fire”)
aim = cont.getSensor(“aim”)
force = cont.getActuator(“add_force”)
forceobj = aim.getHitObject()
name = forceobj.getName()
( own is the crosshair btw )
The .blend file can be found here http://www.mediafire.com/?9xjzz1hhmob
The first person to tell me whats goin on will get a spot in the credits.