- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- [SOLVED] How to create GameObject of the some item?
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- [SOLVED] How to create GameObject of the some item?
Replies: 1 (Who?), Viewed: 755 times.
#1
10th Oct 2014 at 12:52 PM
Last edited by ArtUrlWWW : 10th Oct 2014 at 7:14 PM.
Posts: 133
Thanks: 1494 in 13 Posts
[SOLVED] How to create GameObject of the some item?
Hi.How to create GameObject of the some item?
For example, I want to make animation, where sim take in hands golfClubAverage_5D130DC0 .
I have open afRig.blend in Blender, have imported prop of the golfClubAverage_5D130DC0.package and have made animation, where sim holds in hand golfClubAverage_5D130DC0 (hand from down to up).
How I can make GameObject of the golfClubAverage_5D130DC0 for passing that object to StateMachineClient, something like
Code:
StateMachineClient stateMachineClient = StateMachineClient.Acquire(actor, "golfClubAverage_handUpFromDown"); stateMachineClient.SetActor("x", actor); stateMachineClient.SetActor("y", target);
?
And, if I have blend with 2 objects - sim's object and golfClubAverage_5D130DC0's object - how I can specify them as actor_x and actor_y, for playing with jazz file, something like
Code:
Actor "x" Actor "y" Parameter "Root" = "Root" Parameter 0xF92F1908 = 0x50C5D72 Parameter 0x116D4807 = 0x50C5D79 Parameter "x:Age" = "a" Parameter "y:Age" = "a" Assign Actor 0xDD1568FC."x" as "x" Assign Actor 0xDD1568FC."y" as "y" State "Enter" { Properties Public, Entry Transitions to 0xCD39B65D } State 0xCD39B65D { Properties Public, Explicit Transitions to 0xBE0CB65B Play "a_{root}_FloorStandFondle_{x:Age}{x:Gender}2{y:Age}" With Substitution for "x", "y" { Blend In 0.00333334 } }
Advertisement
#2
10th Oct 2014 at 7:14 PM
Posts: 133
Thanks: 1494 in 13 Posts
Founded answer:
Find item in s3oc, copy his resource key.
Spawn him:
Find item in s3oc, copy his resource key.
Spawn him:
Code:
using Sims3.Gameplay; using Sims3.Gameplay.Abstracts; using Sims3.Gameplay.Actors; using Sims3.Gameplay.ActorSystems; using Sims3.Gameplay.Autonomy; using Sims3.Gameplay.Core; using Sims3.Gameplay.Interactions; using Sims3.Gameplay.Interfaces; using Sims3.Gameplay.ObjectComponents; using Sims3.Gameplay.Objects.Decorations; using Sims3.Gameplay.Routing; using Sims3.SimIFace; using Sims3.UI; using System; using System.Collections.Generic; using System.Text; namespace YourNameSpaceHere { internal sealed class GoToSim9 : Interaction<Sim, Sim> { public static readonly InteractionDefinition Singleton = new Definition(); protected override bool Run() { ResourceKey rk = new ResourceKey(); rk = ResourceKey.Parse("0x319E4F1D-0x58000000-0x000000000098D11C"); Vars.gmStatic = GlobalFunctions.CreateObject(rk, this.Actor.Position, 0, this.Actor.Position) as GameObject; if (!base.Actor.RouteToObjectRadialRange(base.Target, 0, 5)) { return false; } return true; } [DoesntRequireTuning] private sealed class Definition : InteractionDefinition<Sim, Sim, YourNameSpaceHere.GoToSim9> { protected override string GetInteractionName(Sim a, Sim target, InteractionObjectPair interaction) { return "GoToSim9_4"; } protected override bool Test(Sim a, Sim target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { if (a == target) return false; return true; } } } }
Who Posted
|