View Full Version : Getting my global mod to work?

27th Nov 2008, 12:09 AM
I want to create an item that pauses the game when it's item from the action queue is removed.

This will eventually be a global mod. I am testing it out with an aquarium.

What I thought would do this was to add a new BHAV function called "Function - Pause" and put this in the Object Functions list for the new fish tank at 'queue skipped' because the description is:
The queue skipped tree is called if an interaction in a person's queue was deleted for any reason.

It doesn't work.

Does anyone know at what point I would put a pause function in that would occur every time the action queue is decreased in length?

Thank you very much.

PS: This is my first mod :)

27th Nov 2008, 3:20 AM
Do you mean you want it to pause when the action is removed from the queue, or when the user cancels an action that has already started? They're different things - If you click to close an interaction that a sim is already performing then that won't trigger any functions, you'll need to handle that inside the active Interaction. :)

27th Nov 2008, 6:35 AM
I want to pause it when either happens.

It's to fuel my obsessive-compulsive anal-retentive playing of the Sims. :P

27th Nov 2008, 8:47 AM
You mean you want it for *every* interaction *anywhere*? Hmm... Not sure how you'd do that...

27th Nov 2008, 9:31 AM
There must be something that handles the actual icons on the action queue and removes the icons when they are complete. I want to put the pause lines on there.

27th Nov 2008, 10:30 AM
Well it might be possible to make a global hack in the PersonGlobals (the code that controls the sims themselves). There's a function in there for "Main - Post Interaction" which I'm pretty sure gets run each time an interaction completes. It wouldn't catch actions that get aborted before they have started though.

As far as the thing which adds and removes lines from the queue, I'm pretty sure that's handled by the engine rather than by BHAVs. If that is the case, then it is for all practical purposes unmoddable.

27th Nov 2008, 10:31 AM
Thank you heaps :)

I hope I can make it work.

27th Nov 2008, 9:28 PM
I have found it! A better solution. In the person globals there is a "Main - Check Queue" function and it checks if there is anything in the queue. I can pause it if there is not!

Now the main thing is implementing it which won't take so long and will just require a few SimPE tutorials.


27th Nov 2008, 11:19 PM
Glad it's working out! :D