hi, sorry if this is a bit basic, but i am new to lingo, and i am trying to create a mouse trail using a series of cast members. i tried placing them on the score and making each one Loch and Locv values follow each other and then use a delay commmand but this didnt seem to work.
if anyone can help i would be really greatful.
thanks in advance.
mike
Not so basic at all. You need to do something like:

1) create a number of subsequent sprites in the score
2) create a behavior script that that knows how hamy frames has passed since the movie started.
3) It's also important that the script can differentiate between the different sprites, and that it knows the numbers of the first and the last sprites.
4) compare the number of frames passed with the sprite number. If they are the same, then set the sprite's loc to the mouseLoc. Otherwise leave it on its old loc.

Try to drop this on your sprites. Don't forget to set the pFirstSprite and pLastSprite to the right values. It's not optimized, but it works. The effect depends on your frame rate and your number of sprites. 50 fps and 12 sprites looked real nice... =)


-A.


-------------------------------------
-- Creating trails from the cursor --
-- A. Gaunitz 2002-11-17 ------------
-------------------------------------

property pFrameCounter
property pFirstSprite
property pLastSprite


on beginSprite me
pFirstSprite = 1
pLastSprite = 12

pFrameCounter = pFirstSprite
end


on exitFrame me

if pFrameCounter = me.spriteNum then
sprite(me.spriteNum).loc = the mouseLoc
end if

if pFrameCounter = pLastSprite then
pFrameCounter = pFirstSprite
else
pFrameCounter = pFrameCounter + 1
end if

end

-------------------------------------



[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

Reply via email to