Scorpius 144 Posted July 20, 2017 They only work if done on the main scripts, what I'm trying to do is implementing a listener to a TaskNode but it doesn't do anything, ideas?
Dreamlicker 750 Posted July 21, 2017 Why do you need to put a listener on a task node? What're you trying to accomplish?
Scorpius 144 Author Posted July 21, 2017 Why do you need to put a listener on a task node? What're you trying to accomplish? I'm putting many different scripts into 1 big, I thought about making the controller as a TaskScript and the scripts as TaskNodes. I overcame that issue by implementing listeners on the TaskScript and created a new abstract class that extends TaskNode, then I created a variable (that has the abstract class as its type) inside the TaskScript that holds the required (As selected by user from a GUI) TaskNode... Then simply whenever a listener fires I'd call a method from the "AbstractClass" variable that I am overriding inside the actual TaskNode... This way I'm avoiding creating different variables for each TaskNode and detecting which one to use.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.