Community Forum

What are proper actions for a new/load function?

Forum Overview >> Scripting

CategoryScripting
Created12.03.2017 22:13


Tim Derks (timmiej93) 12.03.2017 22:16
I've been scripting for FS17 for quite a while now, and I understand most things, but one thing is still very unclear to me: What's the difference between the new and load functions for objects (say a placeable), and what actions should I place where?

It seems like the 'new' function is the place to instantiate variables, and assign their initial values to them, while the 'load' function should do stuff that relies on other functions (which could possibly fail?)?

A clarification on the difference between these two functions would be very helpful.

Emil Drefers (Unknown) 13.03.2017 16:09
Hi,

your explanation sounds good to me.

One thing to keep in mind is that 'loading user attributes' is also done in load().
But I guess you've incorporated that in your initial thought ;)

Cheers,
Emil


Note: Log in to post. Create a new account here.