Welcome to
Mod The Sims
Online: 1182
News:
Have an account? Sign in:
pass:
If you don't have an account, why not sign up now? It's free!
Other sites: SimsWiki
Reply  Replies: 4 (Who?), Viewed: 5915 times.
Search this Thread
Old 13th Jul 2017, 4:59 PM DefaultFunction - Load #1
Lamare
Original Poster

just a girl

Join Date: Jan 2014
Posts: 709
Thanks: 3582 in 27 Posts
16 Achievements


I've been trying to make an object's load function be called on lot load, but it doesn't work sometimes. In function's description (in SimPE) it says the function is called when "object version" variable is different from one in object's definition. I wonder, what the "object version" means, what it does, what makes it change, at what point, etc. Is it safe to change it manually (e.g. in expression) and what value can we change it to?

Assorted mods: Moving out and job options
Apartment rent agreement mod - fresh update
Testers wellcome on Electrical box & Fertile land
Functional sofa bed is ready to be tested as well
Old 28th Aug 2017, 4:41 PM #2
d4RE
Lab Assistant

Join Date: Feb 2017
Posts: 104
Thanks: 1186 in 24 Posts
8 Achievements


This may not be the answer you're looking for, but maybe it can help you get closer:

Have a look at this thread on object placement -http://modthesims.info/m/showthread.php?t=82685

Inge Jones and Dizzy have a side conversation going about the load function that may help.
Old 28th Aug 2017, 5:04 PM #3
Nysha
Née whiterider



Join Date: Jul 2005
Posts: 19,719
Thanks: 42778 in 94 Posts
36 Achievements

View My Journal


Is there a particular reason why you want to use Function - Load for this, rather than Function - Init?

What I lack in decorum, I make up for with an absence of tact.
Old 29th Aug 2017, 12:46 PM #4
Lamare
Original Poster

just a girl

Join Date: Jan 2014
Posts: 709
Thanks: 3582 in 27 Posts
16 Achievements


Ok, I didn't know it's only supposed to run, if object's code is changed. Thank you for the link, d4RE. I expected it to run on every single lot load, looking at maxis' use of this function. They have wall stereos turn on when sims arrive to community lot (= on lot load) in load function. Either I saw a leftover code that doesn't actually work, or there's something about community lots I don't know, or I misunderstand the meaning of "change of object on a disc", or there's more to it then people thought. I tend to trust people like Inge, so it's probably just me who doesn't get it.

I'll test my first assumption - to see if maxis' load function is what really makes stereos turn on on lot load.

I can get around it, it's not like the whole thing depends on load function, but I became really curious of how it works.

Assorted mods: Moving out and job options
Apartment rent agreement mod - fresh update
Testers wellcome on Electrical box & Fertile land
Functional sofa bed is ready to be tested as well
Old 22nd Nov 2017, 6:32 PM #5
Lamare
Original Poster

just a girl

Join Date: Jan 2014
Posts: 709
Thanks: 3582 in 27 Posts
16 Achievements


So, the load function really does run when you load a lot. I still don't know what the "object version" is, how and if it changes, but I've got my text notifications working on lot load and that's what I wanted (to notify players after lot is loaded about what happened last time they played this lot). The only thing is you can't put notifications or heavier stuff in the load function itself, you have to use it to nudge the main or other function to do what you want it to do. As of now, I know two ways - change object's attribute and have check for the change in main or set function on timer so it gets pushed later. Both work. (I use timer to push function that turns off stereos).

Assorted mods: Moving out and job options
Apartment rent agreement mod - fresh update
Testers wellcome on Electrical box & Fertile land
Functional sofa bed is ready to be tested as well
Reply


Section jump:


Powered by MariaDB Some icons by http://dryicons.com.