public static CmoPoseBox FindPoseBox() { CmoPoseBox box = null; List <CmoPoseBox> poseboxes = new List <CmoPoseBox>(Sims3.Gameplay.Queries.GetObjects <CmoPoseBox>()); if (poseboxes.Count > 0) { box = poseboxes[0]; } PoseBox = box; return(box); }
public PoseManager() : base() { PoseBox = FindPoseBox(); EventTracker.AddListener(EventTypeId.kSimInstantiated, new ProcessEventDelegate(NewSimIsHere)); List<SimDescription> sims = Household.AllSimsLivingInWorld(); foreach (SimDescription sim in sims) { Sim aSim = sim.CreatedSim; AddSimInteractions(aSim); } }
public PoseManager() : base() { PoseBox = FindPoseBox(); EventTracker.AddListener(EventTypeId.kSimInstantiated, new ProcessEventDelegate(NewSimIsHere)); List <SimDescription> sims = Household.AllSimsLivingInWorld(); foreach (SimDescription sim in sims) { Sim aSim = sim.CreatedSim; AddSimInteractions(aSim); } }
public static bool IsPoseBoxAvailable() { if (PoseBox != null && PoseBox.HasBeenDestroyed) { PoseBox = null; } if (PoseManager.PoseBox == null) { PoseManager.FindPoseBox(); } return(PoseManager.PoseBox != null); }
public static bool Pose(Sim actor, CmoPoseBox poseBox, String poseName) { if (poseName == null || poseName == "") { return(false); } SetCurrentPose(actor, poseName); actor.OverlayComponent.UpdateInteractionFreeParts(AwarenessLevel.OverlayNone); actor.LookAtManager.DisableLookAts(); poseBox.PlaySoloAnimation(actor.SimDescription.IsHuman, actor, poseName, true, ProductVersion.BaseGame); actor.ResetAllAnimation(); poseBox.PlaySoloAnimation(actor.SimDescription.IsHuman, actor, poseName, true, ProductVersion.BaseGame); actor.ResetAllAnimation(); actor.WaitForExitReason(3.40282347E+38f, ExitReason.UserCanceled); actor.LookAtManager.EnableLookAts(); return(true); }
public override bool Run() { List <ObjectListPickerInfo> Entries = ListExpressions(); string text = (string)ObjectListPickerDialog.Show("Expression", Entries); if (text != null && text != "") { ReactionTypes reaction = (ReactionTypes)Enum.Parse(typeof(ReactionTypes), text); Array reactionTypes = Enum.GetValues(typeof(ReactionTypes)); CustomOverlayData data = null; CmoPoseBox box = PoseManager.FindPoseBox(); string poseData = PoseManager.GetCurrentPose(Actor); if (poseData == null) { return(false); } Actor.LookAtManager.DisableLookAts(); PoseManager.SetCurrentPose(Actor, poseData); box.PlaySoloAnimation(Actor.SimDescription.IsHuman, Actor, poseData, true, ProductVersion.BaseGame); Actor.ResetAllAnimation(); Actor.OverlayComponent.UpdateInteractionFreeParts(AwarenessLevel.OverlayFace);//OverlayUpperbody); StateMachineClient stateMachineClient = StateMachineClient.Acquire(Actor.ObjectId, "facial_idle", AnimationPriority.kAPDefault, true); data = (CustomOverlayData)OverlayComponent.GetOverlayData(reaction, Actor); stateMachineClient.UseActorBridgeOrigins = false; stateMachineClient.SetActor("x", Actor); stateMachineClient.RemoveEventHandler(new SacsEventHandler(Actor.OverlayComponent.InteractionPartLevelCallback)); stateMachineClient.RemoveEventHandler(new SacsEventHandler(Actor.OverlayComponent.ClearInteractionPartLevelCallback)); stateMachineClient.EnterState("x", "Enter"); stateMachineClient.SetProductVersion(data.ProductVersion); stateMachineClient.RequestState("x", data.AnimClipName); //Actor.OverlayComponent.UpdateInteractionFreeParts(AwarenessLevel.OverlayFace); box.PlaySoloAnimation(Actor.SimDescription.IsHuman, Actor, poseData, true, ProductVersion.BaseGame); Actor.ResetAllAnimation(); Actor.WaitForExitReason(3.40282347E+38f, ExitReason.UserCanceled); Actor.LookAtManager.EnableLookAts(); return(true); } return(false); }
public static CmoPoseBox FindPoseBox() { CmoPoseBox box = null; List<CmoPoseBox> poseboxes = new List<CmoPoseBox>(Sims3.Gameplay.Queries.GetObjects<CmoPoseBox>()); if (poseboxes.Count > 0) { box = poseboxes[0]; } PoseBox = box; return box; }
public static bool Pose(Sim actor, CmoPoseBox poseBox, String poseName) { if (poseName == null || poseName == "") { return false; } SetCurrentPose(actor, poseName); actor.OverlayComponent.UpdateInteractionFreeParts(AwarenessLevel.OverlayNone); actor.LookAtManager.DisableLookAts(); poseBox.PlaySoloAnimation(actor.SimDescription.IsHuman, actor, poseName, true, ProductVersion.BaseGame); actor.ResetAllAnimation(); poseBox.PlaySoloAnimation(actor.SimDescription.IsHuman, actor, poseName, true, ProductVersion.BaseGame); actor.ResetAllAnimation(); actor.WaitForExitReason(3.40282347E+38f, ExitReason.UserCanceled); actor.LookAtManager.EnableLookAts(); return true; }
public static bool IsPoseBoxAvailable() { if (PoseBox != null && PoseBox.HasBeenDestroyed) { PoseBox = null; } if (PoseManager.PoseBox == null) { PoseManager.FindPoseBox(); } return (PoseManager.PoseBox != null); }