Replies: 0 (Who?), Viewed: 104 times.
Test Subject
Original Poster
#1 Old 13th Sep 2020 at 12:56 AM Last edited by frankkulak : 13th Sep 2020 at 3:45 AM.
Default Animation Playing Too Early [SOLVED]
Hello! I created a new interaction for the generator, and am using a script to inject it into its super affordances. My interaction shows up and is performed correctly, but the animation is off for some reason.

The sim will just pour fuel on the ground wherever they are standing, then walk over to the generator and turn it on. What they should be doing is walking over to the generator, pouring the fuel into it, and then turning it on.

I cannot for the life of me figure out what is causing this. My interaction is exactly the same as `powerGenerator_AddFuel_Pieces`, except I changed the price to 250 simoleons instead of 25 pieces, and got rid of the additional text that shows up in the tooltip when you cannot afford the interaction. That's it.

I also tried copying the original interaction exactly as it was into my custom tuning file just to see what would happen, and it was doing the same thing - pouring the gas on the floor, even though I didn't change a single line of code other than the tuning ID and name. So, I'm assuming the issue is with my interaction having a novel tuning ID, rather than with the interaction's code itself... So, is there a step I'm missing? Do I need to somehow link my new interaction up with the animation in order for it to work? I have no idea where I would have to do something like that... I search all of the tuning files in the game for the existing interactions, and they are not referenced anywhere other than the object's super affordances. I also checked the ASM file for the animation, and it does not reference any specific interactions... so I'm totally lost.

Any help is much appreciated!


EDIT: I was able to fix this issue (credit to MizoreYukii for helping me out). In case anyone stumbles upon this with the same issue as me, I solved it by adding a "_constraints" section to my tuning file for the interaction - you can find details about this in the interaction TDESC. Apparently you need to do this whenever copying an interaction that involves an animation with an object. All I had to add was the following and it worked:

  <L n="_constraints">
      <L n="constraints">
          <V n="value" t="animation">
            <U n="animation">
              <U n="animation_ref">
                <T n="factory">232056<!--powerGenerator_AddFuel--></T>
Back to top