Fuffles Posted December 5, 2017 Share Posted December 5, 2017 Heyo Dearies, I was wondering where could I find all events for the inst:ListenForEvent()? Link to comment Share on other sites More sharing options...
JohnWatson Posted December 5, 2017 Share Posted December 5, 2017 inst.event_listeners Link to comment Share on other sites More sharing options...
Fuffles Posted December 5, 2017 Author Share Posted December 5, 2017 5 minutes ago, JohnWatson said: inst.event_listeners and which file would that be exactly... Link to comment Share on other sites More sharing options...
JohnWatson Posted December 5, 2017 Share Posted December 5, 2017 Just now, FuffledBeeQueen said: and which file would that be exactly... inst.event_listeners is a table that lists every event that inst is listening to for example, if inst is listening to an event called "asdf", then inst.event_listeners.asdf will existinst.event_listeners.asdf will be a table and will list the functions to be called when the "asdf" event is pushed Link to comment Share on other sites More sharing options...
Fuffles Posted December 5, 2017 Author Share Posted December 5, 2017 2 hours ago, JohnWatson said: inst.event_listeners is a table that lists every event that inst is listening to for example, if inst is listening to an event called "asdf", then inst.event_listeners.asdf will existinst.event_listeners.asdf will be a table and will list the functions to be called when the "asdf" event is pushed Then let me change the question, is there any event that a follower uses while having a linked player? Link to comment Share on other sites More sharing options...
JohnWatson Posted December 5, 2017 Share Posted December 5, 2017 (edited) 6 minutes ago, FuffledBeeQueen said: Then let me change the question, is there any event that a follower uses while having a linked player? i wouldn't use events for that, if what you're trying to do is checking if a follower has a leader, you can use inst.components.follower.leader instead for example: if inst.components.follower and inst.components.follower.leader then print(inst.name.." has a leader") end Edited December 5, 2017 by JohnWatson Link to comment Share on other sites More sharing options...
Fuffles Posted December 5, 2017 Author Share Posted December 5, 2017 22 minutes ago, JohnWatson said: i wouldn't use events for that, if what you're trying to do is checking if a follower has a leader, you can use inst.components.follower.leader instead for example: if inst.components.follower and inst.components.follower.leader then print(inst.name.." has a leader") end Would it constantly get updated? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now