XlegoXJoin Date: 2008-06-16 Post Count: 14955 |
Here some code to try out. It's fairly complicated to understand how things work at first.
---- playing an anim ----
--tag the animation service
local kf = game:GetService("KeyframeSequenceProvider");
--the anim to be played
local anim = game.Workspace.Animation;
anim.Parent = game.Workspace;
--set the ID to the result of registering an animation
anim.AnimationId = kf:RegisterKeyframeSequence(Instance.new("KeyframeSequence"));
OR
anim.AnimationId = kf:RegisterKeyframeSequence(kf:GetKeyframeSequence("an asset id"));
--have the "animator" instance in the figure load the anim, get an "AnimationTack" as a result
local track = game.Workspace.Fig.Animator:LoadAnimation(anim);
--tell the animation track to begin the anim
track:Play()
--- building an anim ----
--make a root keyframe sequence
local seq = Instance.new("KeyframeSequence");
--name it, this will be the name of the anim
seq.Name = "MyAnim";
--create a keyframe
local kf = Instance.new("Keyframe");
--pose the right arm for this keyframe
local p = Instance.new("Pose");
p.Name = "Right Arm";
p.CFrame = CFrame.new( ..some position relative to the torso.. )
--pose the weapon
local p2 = Instance.new("Pose")
p2.Name = "Handle";
p2.CFrame = some cframe
--add as a sub pose, since the weapon is relative to the arm's position
p:AddSubPose(p2);
--add the whole pose to the cframe
kf:AddPose(p);
--set the keyframe's length add the keyframe to the anim
kf.Time = 1
seq:AddKeyframe(kf);
--register the anim with the animation service
local animid = game:GetService("KeyframeSequenceProvider"):RegisterActiveKeyframeSequence(seq);
I think this works, I'm not entirely sure it's all correct yet, but it's something to go off for people who want to play around with it.
|
|
landon90Join Date: 2008-12-26 Post Count: 1847 |
Woah I could never do that! |
|
ISY111Join Date: 2007-05-25 Post Count: 11412 |
INCREDIBLE! |
|
AvusJoin Date: 2009-08-05 Post Count: 9768 |
I was about to ask about this. Now I will stay up until 4 AM playing with it. >:^) |
|
|
Does it only work in the test server? (Of course they would create an entirely new service for it) |
|
XlegoXJoin Date: 2008-06-16 Post Count: 14955 |
Whoops, meant to post in scripters, sorry. |
|
AvusJoin Date: 2009-08-05 Post Count: 9768 |
Well that last post wasn't necessary, now it looks kind of weird here in scripters, with you saying you meant to post it here. :P |
|
ISY111Join Date: 2007-05-25 Post Count: 11412 |
Please, just lock the one here if you want to delete it I already added it to my Favorite sites. |
|
AvusJoin Date: 2009-08-05 Post Count: 9768 |
@ISY
Look at the section. |
|
XlegoXJoin Date: 2008-06-16 Post Count: 14955 |
I moved it ;) |
|
|
I'd rather use the old animations... |
|
|
|
"I'd rather use the old animations..."
Really? I think these new ones look interesting!
Also, account termination sucks :/ |
|
drummerpJoin Date: 2009-01-10 Post Count: 4892 |
What happened, DeadlyBones? |
|
|
Errrm. Someone posted some bad pants so I bought them and posted a thread saying my pants should be banned :P I'll message [email protected] though... |
|
drummerpJoin Date: 2009-01-10 Post Count: 4892 |
[sarcasm]Yeah, I'm sure that'll do something[/sarcasm] |
|
XlegoXJoin Date: 2008-06-16 Post Count: 14955 |
"Errrm. Someone posted some bad pants so I bought them and posted a thread saying my pants should be banned :P I'll message [email protected] though..."
It sounds like a perfectly reasonable reason for you to be banned to me... |
|
|
Well now I know who did it ;x
Anyways, Im not going to argue that I shouldn't have been banned but I didn't make the clothes and many others bought them. I even saw another thread like it but that wasn't banned. Well what can you do. Try and get the account back and if not then make cool stuff. |
|
|
Nice! Thanks for the guide! |
|
gijsbel11Join Date: 2009-02-07 Post Count: 4223 |
its not complicated if you know all those functions he use's..
but now ITS COMPLICATED!! |
|
|
... Why they had to make so long function names? |
|
Person299Join Date: 2008-02-28 Post Count: 7952 |
Great... Another update that will cause all the noobs to swarm into our forum to ask for help... |
|
wushue34Join Date: 2008-06-08 Post Count: 6653 |
I sorta understand it!
:D |
|
sncplay42Join Date: 2008-11-27 Post Count: 11891 |
It gets to the LoadAnimation line and then says, "Usage error: the object that LoadAnimation is called on must be in the Workspace", even though it is. =/ |
|
sncplay42Join Date: 2008-11-27 Post Count: 11891 |
We need sample code from the devs. =/ |
|