Posts: 2,671
Thanks: 63761 in 193 Posts
25 Achievements
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.