Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Trainee Moderator
staff: trainee moderator
Original Poster
#1 Old 26th Apr 2019 at 12:33 PM
Default Cloning an object script
Hello, once again! I was wondering how I could clone an object script, and then make it only usable for a certain age. Basically what I'm planning to do, is make a swing for toddlers to use, then cloning the original swing script, and changing it in TSRW so that only toddlers can use the toddler swing. Thanks for any help!

- When one gets inspired by the other, the one inspires another - Anything is Possible.

You can view some of my WIPs and other stuff for TS3 on my Twitter here ---> https://twitter.com/SweetSavanita
Advertisement
Test Subject
#2 Old 27th Apr 2019 at 5:12 PM
Not sure if you're trying to make the same thing, but sounds similar to the store object: https://www.youtube.com/watch?v=5K4nus5qRfA

I believe the ITUN file for objects are tied to objects of the same class. For swing I assume it would look something like
<Interaction name="Sims3.Gameplay.Objects.Environment.SwingSet+Swing+Definition" />
<Object name="Sims3.Gameplay.Objects.Environment.SwingSet" />
...
<BaseAvailability>
<AgeSpeciesAvail AgeSpeciesValue="C,T,Y,A" />

Just throwing out thoughts, I'm thinking the way you would do this is maybe create a new scripted object which is a subclass of Sims3.Gameplay.Objects.Environment.SwingSet (scripting mod - though technically if you are just reusing the code for the original swing object, you don't need to write any new code other than declaring the subclass), call it ToddlerSwingSet. Then create an ITUN file for each interaction that you only want for Toddler, and replace the age availability with just "P".

Alternatively you could just override the ITUN files for the original swing object, add P to the list, then create a bunch of new animations that start with the p_/ p2o prefix for the existing swing animations, but sound like you want it exclusively for toddlers so this might not be what you want, but could be a good initial phase to test out against the original swing set.
Back to top