open/close 2 doors at the same time

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

  1. #1

    Default open/close 2 doors at the same time

    Im having trouble (again).. this time - I need to open/close two doors at the
    same time with the activation being from a button (object) that is not linked
    to the doors. How can i get this done? In addition to this, can i get lights to
    turn on/off at this very same moment. For instance green light you can open the
    door... red light door is already open.. or in process of open/close. Any help
    is appreciated!

    JAH_P Guest

  2. Similar Questions and Discussions

    1. easy open doors script for cinema4d keyframeplayer
      i wrote this littel script to make it as easy as possible to open and close things. it works quite simple, it will play a keyframeanimation to the...
    2. How do I use Flash to "open doors" to a home page?
      To other Flash persons, I need help. I'm trying to make brown double doors "open", and then the home page opens. Any suggestions will be very...
    3. open and close the door
      hi Agustín !! Thx for the answer. I think i ll need a variable to detect if the motion reach the end of the portion open for then determine...
    4. Close or end an open movie
      Hi I have three+ movies: movie1 movie2 movie3 Movie 1 has the option to play either Movie2 or Movie3. How can I close Movie2 when returning...
    5. how to close an open cursor
      I got careless and had an infinite loop. Killed my session. Now my cursor is still open. I dont have a handler too it. How do I close it without...
  3. #2

    Default Re: open/close 2 doors at the same time

    there is a pause and play command for animations. If you look in the help files you should find it
    tyree_2 Guest

  4. #3

    Default Re: open/close 2 doors at the same time

    great feature!! But..... unfortunately i cant get it to function for both doors
    to animate at the same time. So far which ever door i place it on first is the
    only to work. Also if i group the object in 3DS before importing it in then the
    animation doesnt work at all. Any quick answers -- ive got to give up tonight
    and send out something for the client, would be great with function but if
    not.. id still like to know the answer for future work. Thanks.

    JAH_P Guest

  5. #4

    Default Re: open/close 2 doors at the same time

    once grouped the animation is attached to the group not the individual doors address the group. member(1).model("group01") something along these lines use 3dpi
    tyree_2 Guest

  6. #5

    Default Re: open/close 2 doors at the same time

    hmmm.. message didnt send, lets try this again..
    When i group everything in max before export, then import into director i no
    longer have the ability to attach the play animation function on the file. no
    sure what to do... when i export the file from max and preview it..when they
    are separate objects they will animate in the preview, when grouped nothing
    moves in the preview (not sure if this is trying to tell me something). Also,
    would it help to try grouping once in director? ..... what did you mean by "use
    3dpi"?

    JAH_P Guest

  7. #6

    Default Re: open/close 2 doors at the same time

    Do you really need to use pre-rendered animations to open doors? If they just
    swing on a hinge or slide open, perhaps you could simply use 'rotate' or
    'translate' commands to rotate or slide the door object to the correct
    position, frame by frame? That's how I'd approach it unless they are unusual
    doors with bits that slide in different directions such as a complex airlock or
    something.

    - Ben

    duckets Guest

  8. #7

    Default Re: open/close 2 doors at the same time

    use 3dpi to find out information in the scene like what animation is attached to what object and the name of that animation
    you may not be addressing the animations by the right name
    tyree_2 Guest

  9. #8

    Default Re: open/close 2 doors at the same time

    jah_p,

    I would use an object-oriented approach, using parent scripts as the object
    envelop, so to speak;

    if you are not familiar with object-oriented programming, you would need at
    least a day to get it under control; once you have figured it out you would
    create one generic 'door' object which would have rotation amounts and opening
    and closing methods/functions in it;

    when you would instantiate a new door 'object' you would feed it the door
    model that you want to open/close;
    example:
    [ code]
    global purple_door_object
    global yellow_door_object

    on startmovie
    purple_door = member("your_world").model("purple_door")
    purple_door_object = script( "generic_parent_script_for_doors" ).new( me ,
    purple_door )
    yellow_door = member("your_world").model("yellow_door")
    yellow_door_object = script( "generic_parent_script_for_doors" ).new( me ,
    yellow_door )
    end
    [/code]

    so at the beginning of the movie you create the door 'objects';

    later when you press a button or whatever you would call one of these objects,
    or both, and tell them to do their thing, such as 'open';
    example:
    Code:
    global purple_door_object
    global yellow_door_object
    
    on someevent
    purple_door_object.open_it( )
    yellow_door_object.open_it( )
    end



    your generic door object parent script would look something like this:
    Code:
    property this_door_model
    property  total_degrees_to_open
    property amount_to_open_each_frame
    
    on new me  ,  arg_door_model
    this_door_model =  arg_door_model
    total_degrees_to_open = 85
    amount_to_open_each_frame = 3
    return me
    end
    
    on open_it  me
    -- the 'me' thing is confusing; you will have to read up on it; I can't
    explain it;
    -- here you will probably create a timeout object that will call a rotate
    script every 50 milliseconds or so; and you will have to do the math to see if
    the door is completely open yet; if so then kill the timeout
    end

    I hope that this helps;

    dsdsdsdsd

    dsdsdsdsd Guest

  10. #9

    Default Re: open/close 2 doors at the same time

    First off to duckets - Yes this is unfortunately an airlock! HA! good guess.
    The more i get into this the more animations i want to function with the press
    one "object". So rotate and transform dont look like they will help at all. (at
    least from what i understand with these two functions) Unfortunately im still
    hoping tyree_2 can shuffle through my confusion to help me with the 'play
    animation' function. Otherwise ive got to look at what dsdsdsdsd put together
    for me.. and ive got to be honest here director is a great program but code and
    i dont get along, so drag and drop functions are always the way id rather go!
    <- but this is indeed the reason im having this problem to begin with.
    I will however give this a try and yes it will probably take a day or two to
    even grasp what you've type out. I'll post a follow up hopefully this weekend.
    Thanks again for all the time spent in helping me figure this out!

    JAH_P Guest

  11. #10

    Default Re: open/close 2 doors at the same time

    at the moment i don't have enough time to explain the situation completely.
    this is little bit different from your problem, but explains how to controll
    the keyframeplayer. It is designed to work with files that are created with
    cinema4D where the name of a keyframeanimation is named as the model.
    i think in max the exported keyframeanimation has at the end of the name the
    string "-key".

    Maybe you take a look at this example:

    [url]http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=11&catid=26[/url]
    8&threadid=1088540&highlight_key=y&keyword1=open%2 0doors

    I think you can extract something out of it. You would have to create an event
    where two keyframeplayer are activated at the same time...

    hope you can extract something out of it...

    cheers!

    hondo3000 Guest

  12. #11

    Default Re: open/close 2 doors at the same time

    you can try linking one door to the other in max but I suspect its a naming problem, when you use the play command. when you use a seperate animation for each door there should be no problem
    tyree_2 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