#Help with Events and Listeners

1 messages · Page 1 of 1 (latest)

jaunty iron
#

I'm currently trying to attach a listener to the Colony-level resources that checks whether the game should be over or not. Not sure why the listener isn't getting triggered.

https://gdl.space/modunubuta.cs

#

I currently don't see the Debugs in SufficientResourcesCondition.CheckConditionMet

median raptor
#

have you confirmed that the code that adds the listener is run?

jaunty iron
#

lol checking

#

yes it is

#

I add the listener on line 28

#

A debug just before that does get printed

median raptor
#

I'm not sure then. my only guess is perhaps that instance of ColonyResources that is invoking the event is not the same one with the listener added

jaunty iron
#

It was null and not throwing a NRE

#

shrug

median raptor