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 https://forums.kleientertainment.com/forums/topic/85124-events/ Share on other sites More sharing options...
JohnWatson Posted December 5, 2017 Share Posted December 5, 2017 inst.event_listeners Link to comment https://forums.kleientertainment.com/forums/topic/85124-events/#findComment-981435 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 https://forums.kleientertainment.com/forums/topic/85124-events/#findComment-981438 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 https://forums.kleientertainment.com/forums/topic/85124-events/#findComment-981443 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 https://forums.kleientertainment.com/forums/topic/85124-events/#findComment-981482 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 https://forums.kleientertainment.com/forums/topic/85124-events/#findComment-981484 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 https://forums.kleientertainment.com/forums/topic/85124-events/#findComment-981492 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