I’m having trouble finding information about the actuator sensor. Searching is difficult because it brings up things related to actuators themselves and not the actuator sensor. So I want to get make the actuator sensor trigger after an action ends.
With bricks its Actuator Sensor(with the action)—>Nand Controller—>Do a thing.
How do I do this with Python?
from collections import OrderedDict
from mathutils import Vector
c = bge.logic.getCurrentController()
owner = c.owner
ac = c.sensors[“Actuator”]
key = bge.logic.keyboard.events
W = key[bge.events.WKEY]
arm = owner.children.get(‘GameRig’)
frame = arm.getActionFrame()
action = arm.getActionName()
def Action(name, start, end, blend,pri,speed):
if frame == end:
blend = 0
# ORDER: name, start, end, blendin, priority, speed
Action(‘The Animation’, 1, 43,4,0,1.5)
So if the indentations do show. But say I want the end of “The Animation” to trigger the an actuator sensor to do a thing like
if ac.subjects.count(“The Animation”) ≠≠ 1:
Action(‘The Second Animation’, 1, 30,4,0,1)
Something like that
Thanks for the help everyone.