shotforce
(shotforce)
January 6, 2010, 6:57am
1
Hey guys this worked for me before But, it aint working anymore , maybe cuz of 2.49 , how should i make it work ? this is the script
import GameLogic as g
cont = g.getCurrentController()
own = cont.owner
scene = g.getCurrentScene()
objWeapon = scene.objects["OBWeapon"]
Weapons = cont.getActuator("Weapons")
if objWeapon.BigginerSword == 1:
Weapons.setMesh (BigginerSword)
g.addActiveActuator(BigginerSword,1)
shotforce
(shotforce)
January 6, 2010, 8:03am
3
Sweet thanks! ill check it out and see if it works
Monster
(Monster)
January 6, 2010, 9:37am
4
Funny. You use bigginerSword in three different ways:
as an attribute/property: objWeapon.BigginerSword {with 2.49 it should be objWeapon[“BigginerSword”] - this is still ok}
as an mesh name: Weapons.setMesh(BigginerSword) {BigginerSword is not defined in your script - this should produce an error}
as an actuator: g.addActiveActuator(BigginerSword,1) {BigginerSword is not defined in your script - this should produce an error}
I hope it helps
shotforce
(shotforce)
January 6, 2010, 12:05pm
5
yes i used it as a property to organize better, yes i use it as a mesh because the sword its called “bigginer sword” and yes i use it as an actuator because thats the actuator that will replace the mesh for the biginer sword
And no, there is no error produced
shotforce
(shotforce)
January 6, 2010, 12:14pm
6
@ Thanks Pret that helped , its working for me now