Jump to content

Recommended Posts

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 exist
inst.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

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 exist
inst.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

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 by JohnWatson
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...