I’ve got a player class which I am using to manage playing actions, player movement etc… I have assigned an action actuator to a variable in the class with:
self.action_reload = self.own.actuators["reload"]
I am looking to change the action of that actuator, with something like:
self.action_reload.action = "RifleReload"
but I get an error message in the console saying (image at bottom for full error):
ValueError: actuator.action = val: Action Actuator, action not found!
The python api here made me think I was along the right lines. But clearly not. I was under the impression that you could change actions for an action actuator within python like this. The only thing I can think of is that I have not loaded the new action into any actuator, so many it doesnt get loaded or something. But the error doesnt seem to suggest this.
Any help would be great. I’ve of hit a block with this problem.