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 8th Sep 2018 at 3:38 PM
Default How to change the target of an interaction
I'm just wondering, you know how you can change the target of an interaction in the social.data like how I did for one of my mods, can it be easily done with a normal interaction? Because my friend wanted to make it so adults can pick up children, but the usual target is a toddlers, not a child. And because the target is a toddler, the child will stretch up, not to toddler size though. And we were wondering if changing the target could fix that. 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
Space Pony
#2 Old 9th Sep 2018 at 2:29 AM
The actor of a scripted interaction will always be the sim that started it and the other object or sim involved will always be the target. This, I believe, cannot be changed. However, you can swap the actor and target of the animation by swapping the "x" and the "y" when setting the actors of the state machine -- in other words, by changing this:

Code:
base.EnterStateMachine("CarryChildOut", "Enter", "x", "y");


To this:

Code:
base.EnterStateMachine("CarryChildOut", "Enter", "y", "x");


However, the animation problem you're describing doesn't seem like something that changing the actor to the target would fix. I would try creating custom animations with a jazz script and calling it through the interaction, if you haven't already.

"The Internet is the first thing that humanity has built that humanity doesn't understand, the largest experiment in anarchy that we have ever had." - Eric Schmidt

If you enjoy the mods I put out, consider supporting me on patreon: www.patreon.com/Gamefreak130
Trainee Moderator
staff: trainee moderator
Original Poster
#3 Old 9th Sep 2018 at 1:35 PM
Quote: Originally posted by gamefreak130
The actor of a scripted interaction will always be the sim that started it and the other object or sim involved will always be the target. This, I believe, cannot be changed. However, you can swap the actor and target of the animation by swapping the "x" and the "y" when setting the actors of the state machine -- in other words, by changing this:

Code:
base.EnterStateMachine("CarryChildOut", "Enter", "x", "y");


To this:

Code:
base.EnterStateMachine("CarryChildOut", "Enter", "y", "x");


However, the animation problem you're describing doesn't seem like something that changing the actor to the target would fix. I would try creating custom animations with a jazz script and calling it through the interaction, if you haven't already.


Thanks, my friend did convert the animations. Also, where exactly is that line located?

- 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
Space Pony
#4 Old 9th Sep 2018 at 4:27 PM
Quote: Originally posted by TheSweetToddler
Thanks, my friend did convert the animations. Also, where exactly is that line located?


Usually, it's found towards the beginning of the Run() method of the interaction. It may not be that line exactly, but it will be something along the lines of acquiring the State Machine Client for the interaction and setting the actor to "x" and the target to "y," which is what will need to be switched.

"The Internet is the first thing that humanity has built that humanity doesn't understand, the largest experiment in anarchy that we have ever had." - Eric Schmidt

If you enjoy the mods I put out, consider supporting me on patreon: www.patreon.com/Gamefreak130
Back to top