Results 1 to 4 of 4

Thread: Parenting and Motion Modifiers

  1. #1
    Newbie Member
    Join Date
    Dec 2003
    Location
    NSW South Coast Australia
    Posts
    1

    Question Parenting and Motion Modifiers

    Hi folks, new to LScript with a project using 30 or so groups of 7 connected wheels (ie over 350 objects + nulls) and looks like a good job for LScripting??

    Sample scene is: (revised in light of attached diagram below)

    null (1) - H set to 45 deg. for attached diagram
    - disk (1) - disk with radius = 1 unit
    - - null (2) - follows null(1): pos * 0 other chanels * 1
    - - - disk (2) - follows disk (1) with X+1.5 and SX & SZ = 0.5
    - - - - null (3) - follows null(2): pos * 0 other chanels * 1
    - - - - - disk (3) - follows disk (2): all chanels * 1
    - - - - - - null (4) - follows null (3): pos * 0 other chanels * 1
    - - - - - - - disk (4) - follows disk (3): all chanels * 1

    (each level is parented to the level above)

    Result is a series of touching disks that rotate about the largest disk (1) - the disks get smaller the further they get down the tree and rotate faster about the parent disk. Works well but too complicated to do 350 of them!!!

    In looking through the manuals I have been able to build a test scene with nulls and objects correctly parented but 3 problems/questions have arisen:

    1/ can I add a motion modifier to an object when a scene is created using LScript - and if so how?? That is: to add the Follower motion modifier to any of the nodes and set the followed node and other settings.

    2/ when each object is created is it assigned (or can it be assigned) a name or ID that is different to the object file name - disk.lwo makes disk(1) disk(2) etc. - and if so, can that can be referenced by LScript.

    3/ can I write a variable (object property) to an object that I can refer to later in the script - or in another script.

    Thought about creating the basic structure as a scene file and loading that using LScript - but still would require 60 or so additional nodes to do rotaions, offsets and scaling of repeated structures. Would prefer to come up with a scripted solution.

    Hope this is not too confusing.

    Thanks for any help!!

    Tony

    Last edited by TonyP; 12-17-2003 at 06:32 PM.

  2. #2
    Registered User mattbolton's Avatar
    Join Date
    Apr 2003
    Location
    KS, USA
    Posts
    208
    Can you post a screenshot demonstrating how these wheels are layed out with each other. I am having a hard time visualizing what you want to do. Thanks.

  3. #3
    1/ can I add a motion modifier to an object when a scene is created using LScript - and if so how?? That is: to add the Follower motion modifier to any of the nodes and set the followed node and other settings.
    yes. but this is a complicated procedure. if you are starting to lscript, this is very hard to get your head around. but if you are up to it, the solution is the use the IPC or the Queue OA to transfer settings data to and fro the lscript instances attached to the objects. also, you can use a generic or master script to apply the lscripts to a bunch of objects. but again, these things are not that easy to do, especially the changing of settings of instances from outside.


    2/ when each object is created is it assigned (or can it be assigned) a name or ID that is different to the object file name - disk.lwo makes disk(1) disk(2) etc. - and if so, can that can be referenced by LScript.
    an object instance in layout will have a different ID even if they refer to the same file.

    3/ can I write a variable (object property) to an object that I can refer to later in the script - or in another script.
    yes, and you can do this in different ways depending on the nature of the variable. if the variable is 'active' meaning it changes, or is subject to change, then you can use the IPC mechanism or the Queue OA to update that variable across the enviornment. but it is only there so as long as the 'host' script that owns that variable is active.

    if the variable in question is more 'static' then you can use store() / recall() to save that variable's data into the reigstry or you can use the File Object Agent to write a text file containing your information.

    ps: i dont really know what you're trying to do. i'm only trying to answer your question.
    "The hardness of God is kinder than the softness of men, and His compulsion is our liberation." - C.S. Lewis


  4. #4
    Registered User mattbolton's Avatar
    Join Date
    Apr 2003
    Location
    KS, USA
    Posts
    208
    I'm still having a hard time figuring out what you want to do even with that nice diagram. If the discs continue rotating, they will eventually collide with the one two levels down. If there were a way to parent/un-parent dynamically, then it would be a cakewalk.

Bookmarks

Posting Permissions

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