I have been trying to work on the following code:
def HazardsOn(self, on):
if on:
self.flame4a = Hazards.Flame((-3.96, -.19, -11.04), (0, 7, 0), (.2, .4, .2), .8)
self.AddHazard(self.flame4a)
self.flame4b = Hazards.Flame((-6.23, -.19, -11.04), (0, 7, 0), (.2, .4, .2), .8)
self.AddHazard(self.flame4b)
self.flame3a = Hazards.Flame((4.21, -.19, -11.04), (0, 7, 0), (.2, .4, .2), .8)
self.AddHazard(self.flame3a)
self.flame3b = Hazards.Flame((6.47, -.19, -11.04), (0, 7, 0), (.2, .4, .2), .8)
self.AddHazard(self.flame3b)
self.flame1a = Hazards.Flame((-6.37, -.19, 11), (0, 7, 0), (.2, .4, .2), .8)
self.AddHazard(self.flame1a)
self.flame1b = Hazards.Flame((-4.1, -.19, 11), (0, 7, 0), (.2, .4, .2), .8)
self.AddHazard(self.flame1b)
self.flame2a = Hazards.Flame((4.06, -.19, 11), (0, 7, 0), (.2, .4, .2), .8)
self.AddHazard(self.flame2a)
self.flame2b = Hazards.Flame((6.33, -.19, 11), (0, 7, 0), (.2, .4, .2), .8)
self.AddHazard(self.flame2b)
self.ambience = plus.createSound("Sounds/hzd_rotclaw_loop.wav", False, (0, 0, 0))
plus.loopSound(self.ambience)
self.RegisterZone("flamezone01",1)
self.RegisterZone("flamezone02",2)
self.RegisterZone("flamezone03",3)
self.RegisterZone("flamezone04",4)
self.claw1 = self.GetHinge("Hinge01")
self.claw1.SetAutoLocks(False, True)
self.claw1.SetPowerSettings(9, 1000)
self.claw1.Lock(False)
self.claw1.SetDirection(100)
self.claw2 = self.GetHinge("Hinge02")
self.claw2.SetAutoLocks(False, True)
self.claw2.SetPowerSettings(9, 1000)
self.claw2.Lock(False)
self.claw2.SetDirection(100)Now I know that the segment self.claw1(or 2).SetDirection(100) is responsible for the direction of which the claw turns in the clawtop. However, I don't know how to make it change direction when the flames set off. Or in other words, I don't know how to make a trigger.
Does anyone know how to solve this issue?