Ask a Question related to Macromedia Director 3D, Design and Development.
-
deanUK #1
sub motion
hi,
i have a prob. im new 2 lingo, thats the 1st prob. the 2nd is i cant
understand how to use sub motions properly.
im basically trying to create a simple walk cycle. i have a character animated
in 3ds max, with 3 main states (start, walk loop, end). I simply want the user
to press a key down and make the character walk until the button is up, so now
the character should stop.
i know in principle how this shud work, but every tutorial or example ive
looked at is always full on nonesence and just confuses me!
i have a rough idea what i think the code should look like, dont know how
close i am...
on exitframe
if keypressed(123) then
scene.model[1].keyframeplayer.queue("motion1", 0, 667, 1292)
end if
if key still pressed
scene.model[1].keyframeplayer.queue("motion2", 0, 667, 1292)
end if
if keyreleased(123) then
scene.model[1].keyframeplayer.queue("motion3", 0, 667, 1292)
end if
end
any sugestion?
much appreciated, dean
deanUK Guest
-
Add simple motion
I want to add a simple motion effect that transport something from a place to another within the stage. Can someone help me please? -
can we do motion in PS css?
I'm trying to make my web site a bit more dianamic and I saw that I can do animation, rollover. My question is: it possible to do motion like, as... -
Motion Tween - need help
I have created several motion tweens in my .fla all using the same symbol. At the beginning and ending keyframes, the changes to the symbol are... -
motion
hi. I have a problem about motion demand on time. I want to move a matter as functions of time. for istance a matter has motion according to x=5t2(... -
Motion Blur
Hi, Using Firework MX. How can i do motion blur on my layers ? It is bultin filter in photoshop so i can't take it from there and add it to... -
Charles Parcell #2
Re: sub motion
I am no authority on this by a long shot but here are some things perhaps.
You could use:
global walkFlag
on keyDown
if keypressed(123) then
walkflag = TRUE
scene.model[1].keyframeplayer.queue("motion1", 0, 667, 1292)
scene.model[1].keyframeplayer.play()
end if
end
on exitFrame
if walkFlag then
scene.model[1].keyframeplayer.queue("motion2", 0, 667, 1292)
scene.model[1].keyframeplayer.playNext()
end if
end
on keyUp
if walkFlag then
walkFlag = FALSE
scene.model[1].keyframeplayer.queue("motion3", 0, 667, 1292)
scene.model[1].keyframeplayer.playNext()
end if
end
And not to forget to use:
member("scene").model[1].addModifier(#keyframePlayer)
Disclaimer - I have never used keyFramePlayer and by the looks of the
documents it seems as if it applies motions exported from 3DMax (or
other). It seems to not really be a means to queue up position transforms.
You might have to build your own animation queue of sorts if you want to
apply simple transforms.
Charles P.
deanUK wrote:> hi,
> i have a prob. im new 2 lingo, thats the 1st prob. the 2nd is i cant
> understand how to use sub motions properly.
> im basically trying to create a simple walk cycle. i have a character animated
> in 3ds max, with 3 main states (start, walk loop, end). I simply want the user
> to press a key down and make the character walk until the button is up, so now
> the character should stop.
> i know in principle how this shud work, but every tutorial or example ive
> looked at is always full on nonesence and just confuses me!
>
> i have a rough idea what i think the code should look like, dont know how
> close i am...
>
>
> on exitframe
>
> if keypressed(123) then
> scene.model[1].keyframeplayer.queue("motion1", 0, 667, 1292)
> end if
>
> if key still pressed
> scene.model[1].keyframeplayer.queue("motion2", 0, 667, 1292)
> end if
>
> if keyreleased(123) then
> scene.model[1].keyframeplayer.queue("motion3", 0, 667, 1292)
> end if
>
> end
>
> any sugestion?
>
> much appreciated, dean
>Charles Parcell Guest



Reply With Quote

