Ask a Question related to Macromedia Director 3D, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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?
    2. 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...
    3. 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...
    4. 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(...
    5. 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...
  3. #2

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139