Dynamic 3d objects, animation and behaviour.

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

  1. #1

    Default Dynamic 3d objects, animation and behaviour.

    Hello everybody,

    I'm making a game as part of my final work for school.
    It's a 3D game so I chose to use Shockwave 3D.

    I'm using a scene I imported from Lightwave.
    Now I want to dynamically add some spheres who will need to have their own
    behaviour.
    Right now, I have a script in my cast which I call upon in the main code, to
    create (the actual geomitry) and position the spheres. (OOP way of working)
    The dynamic sphere's load into the 3D world on the right positions, so
    that's no problem.

    The thing that is puzzeling me is: How do I make them move? (they'll need
    collision detecion later on aswell)
    On the main code I can use "on exitframe" to change the position of my main
    character-model, that doesn't work on the dynamically added script.

    Since the code (the behaviour script from the cast) for the Sphere's is
    dynamicly added, it should have it's own "on" trigger. (i think)
    I'm still searching for solutions on the net, but I've been searching for
    quite a while now.
    I hope my explanation makes sense, I you'd need more info, I'd be happy to
    elaborate.
    Whatever help I can get is greatly appreciated.

    Thanks
    Thomas







    Thomas Pottie Guest

  2. Similar Questions and Discussions

    1. Saving dynamic objects in a container to a dataGrid
      I have an app which contains a dataGrid and a VBox container. dataGrid columns = username | objects VBox = holds children, objects (SWFLoaders)...
    2. How do I apply the onClick(Open Browser) behaviour/codeto a dynamic link?
      Hello and thankyou in advance: I have an ASP page linked to my database and I want to apply the Open Browser behaviour to the code. It's fine to...
    3. keyframe animation detected on a resource that will marge -this animation willbe lost
      hi, sorry for the question but need a quick fix for it. i am exporting from max 5, a quick animation of a shark tail moving but on export i am...
    4. On the strange behaviour of serialize & unserialize with recursive objects.
      Hi all, i just spent an hour rifling through code to find the cause of a problem only to find it's an oddity with serialization and recursive...
    5. Texture animation for 3d objects
      Does anybody knows what are the main steps to do a texture animation on 3d objects using either flash movies or quicktime videos ? Thanks,
  3. #2

    Default Re: Dynamic 3d objects, animation and behaviour.

    you can use parentscripts, going this way you can add things to the "on
    stepframe" handler.
    this will only work if you add the script to the "actorlist". if you do not
    need it anymore you have to delete it from "the actorlist". all scripts that
    are in this "actorlist" will have the "stepframe" handler executed. if they are
    not in this list, its not executed.

    by the way i would not put all animations on the exitframe handler, because it
    will run a little more smooth when you only "go the frame" on "exitframe"

    on exitframe me
    go the frame
    end

    on enterframe me
    doallanimations
    end

    cheers!

    hondo3000 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