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!
Quick Reply
Search this Thread
Lab Assistant
Original Poster
#1 Old 8th Aug 2013 at 4:14 PM
Default I need some help for custom Sims 3 animations
Hi all,

Yes I know... It's holidays... It's because I'm trying to do some news Sims 3 antics bathtubs with news animations - like the Sims Medieval bathtubs -. I begin with the "bathtub fill with a wood bucket"...

with these 2 pieces of code I use actually, the object call the right script and the animations are running except for 3 things:

1.) when I click in game on my new bathtub, the sim don't go to the bathtub to perform the animations (no routing to object action) but perform the animations at the place he stands!

2.) when running the animation Play "a2o_smbathtub_fill_E_x" for "smbucket" the bucket doesn't appear in the sim's hands to fill the bathbuth with water (the animation runs but without the wood bucket visible!)

3.) After running the animation "a_clothesChange", the sims is not naked, he keeps his clothes and of course don't go to the bathtub to sit down... He sits at the place he was standing! not in the bathtub.

Here is

1.) the actual assembly piece of code I'm using to drive the actions:

Code:
using System;
using System.Collections.Generic;
using System.Text;
using Sims3.Gameplay;
 using Sims3.Gameplay.Objects;
using Sims3.Gameplay.Objects.Seating;
using Sims3.Gameplay.Abstracts;
using Sims3.Gameplay.Interfaces;
using Sims3.Gameplay.Interactions;
using Sims3.Gameplay.Actors;
using Sims3.Gameplay.ActorSystems;
using Sims3.Gameplay.Autonomy;
using Sims3.SimIFace;
using Sims3.SimIFace.CustomContent;
using Sims3.UI;
using Sims3.Gameplay.ObjectComponents;
using Sims3.Metadata;
using Sims3.SimIFace.Enums;
using Sims3.Gameplay.Core;
using Sims3.Gameplay.Objects.CookingObjects;

namespace Sims3.Gameplay.Objects.Plumbing.Mimics.z972_smbathtub
{
    public class z972smbathtub : GameObject, IGameObject, IScriptObject, IScriptLogic, IHasScriptProxy, IObjectUI, IExportableContent
    {
        protected Sim mRevealingSim;
        public override void OnStartup()
        {
            base.AddInteraction(DoAnimation.Singleton);
        }
        public bool RunAnimation(InteractionInstance interaction, Sim Actor)
        {
            interaction.StandardEntry();
            if (Actor.SimDescription.ChildOrAbove)
            {
                interaction.AcquireStateMachine("z972smbathtubA");
                interaction.SetActor("x", Actor);
                interaction.SetActor("smbathtub", Actor);
                interaction.SetActor("smbucket", Actor);
                interaction.EnterSim("Enter");
                interaction.AnimateSim("z972smanim");
            }
            return true;
        }
        public bool FinishAnimation(InteractionInstance interaction, Sim Actor)
        {
            if (Actor.SimDescription.ChildOrAbove)
            {
                interaction.AnimateSim("Exit");
            }
            interaction.StandardExit();
            return true;
        }
        public class DoAnimation : Interaction<Sim,z972smbathtub>
        {
            public static readonly InteractionDefinition Singleton = new Definition();

            protected override bool Run()
            {
                base.Target.RunAnimation(this, base.Actor);
                base.Target.FinishAnimation(this, base.Actor);
                return true;
            }
            private sealed class Definition : InteractionDefinition<Sim,z972smbathtub,z972smbathtub.DoAnimation>
            {
                protected override string GetInteractionName(Sim actor,z972smbathtub target, InteractionObjectPair iop)
                {
                    return "Se décrasser !";
                }
                protected override bool Test(Sim a,z972smbathtub target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
                {
                    return true;
                }
            }
            private sealed class ForceDefinition : InteractionDefinition<Sim,z972smbathtub,z972smbathtub.DoAnimation>
            {
                protected override bool Test(Sim a,z972smbathtub target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
                {
                    return true;
                }
            }
        }
    }
}


2.) and the actual Jazz Script:

Code:
State Machine "z972smbathtubA"
{
		Properties Default
    Actor "x"
    Actor "smbathtub"
    Actor "smbucket"
    
    Assign Actor "a_clothesChange.ma"."x" as "x"
    Assign Actor "a2o_smbathtub_fill_E_x.ma"."x" as "x"
    State "Enter"
    {
        Properties Public, Entry, Explicit
        Transitions to "z972smanim"
    }
    
    State "z972smanim"
    {
			Transitions to "a_clothesChange.ma"
      Create Prop 123 as "smbucket"
      
			Play "a2o_smbathtub_fill_E_x" for "x"
			Play "a2o_smbathtub_fill_E_x" for "smbucket"
		}

		State "a_clothesChange.ma"
		{
			Transitions to "EnterBath"
		  Play "a_clothesChange" for "x"
		}
			
	State "EnterBath"
		{
		Transitions to "Exit"
		Play "a2o_bathtub_takeBath_getIn_x"
		  
		}
						
    State "Exit"
    {
        Properties Public, Exit, Explicit
    }
}



I know I miss some relevants informations in the S3SA code or / and in the Jazz Script... After searching a couple of days, I'm not be able to see and to find what I miss exactly.
Please, is there somebody to tell me where are the missing things inside this project.

Thanks a lot.

If you want to know your future...create it!
Advertisement
Alchemist
#2 Old 8th Aug 2013 at 7:10 PM
I think you will find this tutorial relevant to your problem...it goes over the exact issues you're having:

http://www.modthesims.info/showthread.php?t=469283
Lab Assistant
Original Poster
#3 Old 8th Aug 2013 at 8:37 PM
Thanks a lot Orangemittens I'm going to study the tutorial.

If you want to know your future...create it!
Alchemist
#4 Old 8th Aug 2013 at 11:34 PM
Quote: Originally posted by zano972
Thanks a lot Orangemittens I'm going to study the tutorial.
np Zano If you find the tutorial is insufficient there are people in the Simlogical chat who might be able to help...the project you've taken on isn't a simple one.

http://www.den.simlogical.com/denforum/index.php
Lab Assistant
Original Poster
#5 Old 21st Aug 2013 at 10:12 PM
Quote: Originally posted by orangemittens
np Zano If you find the tutorial is insufficient there are people in the Simlogical chat who might be able to help...the project you've taken on isn't a simple one.

http://www.den.simlogical.com/denforum/index.php


Thanks oarangemittens i'll do that too.

If you want to know your future...create it!
Back to top