Professional Web Applications Themes

3d object that triggers a sprite on screen - Macromedia Director 3D

Hi guys i need sum help ive created a basic driving game and I have set up a proximity sensor ie a trigger (sphere of influence)so when the car hits it i want a sprite to appear on screen(however i do not want it to be a ingame shockwave backdrop or overlay( i hope i have explained myself properly...

  1. #1

    Default 3d object that triggers a sprite on screen

    Hi guys i need sum help ive created a basic driving game and
    I have set up a proximity sensor ie a trigger (sphere of influence)so when the
    car hits it i want a sprite to appear
    on screen(however i do not want it to be a ingame shockwave backdrop or
    overlay( i hope i have explained myself properly

    thunderkatz Guest

  2. #2

    Default Re: 3d object that triggers a sprite on screen

    I don't know if I undestood you very well; but if you are trying to create a
    "proximity" trigger, there are a lesson (code and demo) about this at the
    lesson
    [url]http://www.dmu.com/3dd/dd11.html[/url]
    of our old free webcourse.
    Better to read all the lessons:
    [url]http://www.dmu.com/3dd[/url]

    Americo Guest

  3. #3

    Default Re: 3d object that triggers a sprite on screen

    thanks 4 replying dude

    I'll try and explain myself a little better
    the code for the proximity sensor is already working however i wish to trigger
    a sprite on screen when it hits the object
    heres the relevent section of the code
    im assumeing the sprite code goes in here somewere


    if(distancx > 100) then --
    running = true
    green1.translate(0,0,0)
    bridge.rotate(0,0,0)
    -bridge2.rotate(0,0,0)
    block44.addmodifier(#collision)

    end if

    if(distancx <= 100 and running = true) then -- visibilityon
    running = false
    green1.translate(0,-5,0)
    bridge.rotate(0,2.3,0)
    bridge2.rotate(0,-2.3,0)

    block44.collision.enabled = 0
    go to next
    end if :o:disgust;:o

    thunderkatz Guest

  4. #4

    Default Re: 3d object that triggers a sprite on screen

    When you say that you want to trigger a sprite on the stage, what
    exactly do you mean? I think you will need to describe how your
    Director stage is setup. For instance, if your 3d sprite takes up the
    entire stage, and is set as "Direct To Stage" AKA DTS (which is the
    default setting), then you can not put another sprite over that 3d
    sprite. That is part of what DTS is about. In order to add a bitmap
    sprite or some other sort of object on top of the 3d sprite would mean
    you need to turn off DTS (and accept that your 3d sprite will probably
    take a significant performance hit), then use a command like
    puppetSprite or makeScriptedSprite to programatically add the sprite to
    the stage.

    If, on the other hand, only part of your stage is covered by the 3d
    sprite, it is pretty easy to use puppetSprite or makeScriptedSprite to
    insert another sprite onto that other part of the stage.

    Another important thing to think about is what is happening on your 3d
    sprite when this other sprite is appearing. I mean, is it moving? Are
    things still going on in the 3d scene? If not, it might be easier to
    use imaging lingo to get a snapshot of the image of the 3d sprite, then
    make that into a bitmap member on a different frame of your Director
    movie. Then, on that other frame, use the new bitmap as the background
    and add other sprites as you'd like. Then, once the 3d scene needs to
    start moving again, jump back to the appropriate frame.
    Mike Blaustein Guest

  5. #5

    Default Re: 3d object that triggers a sprite on screen

    thanxs 4 that advice dude
    ive decided to use a overlay texture and it kind of woks but then it comes up
    with this error

    'error: object with duplicate name already exists'
    i think this is the same problem that briananimator got

    heres the relevant section of code
    if(distancx <= 100 and running = true) then -- visibilityon
    running = false
    --green1.translate(0,-5,0)
    --bridge.rotate(0,2.3,0)
    --bridge2.rotate(0,-2.3,0)


    bkgdImage = member("outsidebuffer").image
    bkgdtexture = member(1).newtexture("outsidebuffer",#fromImageObj ect,
    bkgdImage)
    member(1).camera(1).addoverlay(bkgdTexture, point(0,0),0)

    end if


    thunderkatz Guest

Similar Threads

  1. Shared object and screen capturing to SWF
    By Scott in forum Macromedia Flash Data Integration
    Replies: 0
    Last Post: March 19th, 02:56 AM
  2. Object Relational, Foreign Keys and Triggers
    By Alex Turner in forum PostgreSQL / PGSQL
    Replies: 5
    Last Post: January 25th, 05:35 PM
  3. triggers in DB2
    By Piotr in forum IBM DB2
    Replies: 2
    Last Post: August 27th, 03:37 PM
  4. Help with triggers
    By W Gemini in forum IBM DB2
    Replies: 0
    Last Post: August 7th, 11:45 AM
  5. Search text in sprite and play the sprite
    By Godwin in forum Macromedia Director Lingo
    Replies: 2
    Last Post: July 23rd, 01:06 PM

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
  •  

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