Thought I'd start a new thread for this, cus it's a different issue
I'm very new to modding, so please bare with me as I try and decrypt EA's commentless code
I was just wondering if anyone would be able to explain, in layman's terms, how interaction code works? Here's what I've got so far, trying to add the "BreakIntoHouse" interaction to every residential lot. It might seem similar, cus I've butchered parts from other codes in the threads, but only on topics that seem to have died. Consider this a revival :p
public class BreakInAnywhere
protected static bool kInstantiator = false;
static void OnWorldLoad()
World.OnWorldLoadFinishedEventHandler += new EventHandler(OnWorldLoadFinished);
public static void OnWorldLoadFinished(object sender, EventArgs e)
BreakInAnywhere test = new BreakInAnywhere();
Lot allLots = Sims3.Gameplay.Queries.GetObjects<Lot>();
foreach (Lot lot in allLots)
Door door = lot.GetFrontDoor(eFrontDoorType.kFrontDoorTypeCalculated);
Again, layman's terms would be appreciated greatly!
Have you checked the tutorials they're very helpful. You seem to have the right idea. Test it out and check the tutorials. You should probably add another piece of code so that if a new lot is created than the interaction will be added there automatically cause right now the game will only add the interaction to lots when the game load finishes. Right now the new lot will have the interaction only after closing and starting the game again.
This is properly explained in the tutorials.
this tutorial is specifically for interactions http://www.simlogical.com/ContentUp...e/uploads/1596/
This page has more hekpful tutorials http://modthesims.info/wiki.php?tit..._GeneralModding
Hope I helped
I've checked most of the tutorials but none of them really helped in explaining how to use a pre-existing interaction. Thanks though, I'll be sure to read through them again!
You'll have to check the code for that particular pre-existing interaction. I think you add it the same way you add a new interaction, basically you create a new interaction which inherits all the qualities of the previous interaction so it will work just like the original except you get to make certain changes by overriding the inherited functions as per your preference. You also get to choose who to add it to like what kind of traits or age or occult status the Sim needs to break in.