Replies: 1 (Who?), Viewed: 420 times.
Lab Assistant
Original Poster
#1 Old 29th Jul 2015 at 3:31 PM
what are the events called when we play and leave a simulation ?
Hi again,

I try to fix an issue in my mod that happens when a player leave the simulation to the main menu or build(not sure on that one).
The class i made seems to be garbage collected because the mod does't react any more.

I instantiate everything using the usual callback hooked to PROCESS_EVENTS_FOR_HOUSEHOLD_ENTER and though it's counterpart PROCESS_EVENTS_FOR_HOUSEHOLD_EXIT would be called whenever the player choose to go back the main menu.

A quick test showed me both events where called constantly even in simulation mode.

The 1000simoleons Question: What is/are the proper event to use as callback when a player leave the simulation ?

thanks
Advertisement
Deceased
#2 Old 29th Jul 2015 at 4:39 PM
Quote:
Originally Posted by sachamagne
The 1000simoleons Question: What is/are the proper event to use as callback when a player leave the simulation ?


I use different things myself depending on when I want that mod to kick in. The two events you mentioned run everytime a sim enters or leaves the lot (visitors, walkbys, etc.). There was a tactic used to make it only trigger once by using a "firsttime" variable, but that isn't really the best option and I should really rewrite the stuff I've done that does that (although why fix what isn't broken is of course always the mantra for a procrastinator like myself).

Several of my mods use injection to run after "on_loading_screen_animation_finished" which I believe runs only once as a lot is loaded. Wake Early needs to link into something that runs later, as the loading screen animation finished won't allow pop-up notifications to be displayed, so it uses the TRANSITION_SEQUENCE_EXIT event, but that also runs occasionally during live mode as well.

In short, there's no real standardization, and yes that is probably a bad thing.
Back to top