> Each time the frame loops the locV of the falling
> records is increased and a variable holding the vPos
> of the sprite is set. This was developed with only
> one record in mind

The confusion you're feeling is the confusion that happens when one tries to
write a game that should use OOP or sprite behaviors, but doesn't.  Each
record needs to hold and maintain its own private vPos variable, and handle
its own falling regardless of what else is on the screen. If that were the
case, it wouldn't matter whether you had one record or a hundred in the
game; each record would work independently.

You should break the record-dropping functionality out of the repeat loops,
and put it into the stepFrame handler of a parent script, or if you're using
sprite behaviors, into the prepareFrame, enterFrame, or exitFrame handlers.
Each record should be a separate instance of the new script you create.

The 'record' parent script (or sprite behavior) should have property
variables such as spriteNum, vPos, maybe a frame counter, fallSpeed, or even
fallAngle.  Besides its event handlers, it should maybe have methods or
handlers like StartFalling, Fall, CheckGridPos, GetCaught, and Reset, to
name the basics.

The loops that are currently doing most of the 'falling' and
gridPos-checking (I'm guessing exitFrame handlers) really shouldn't be doing
much more than 'go the frame'.  Again, each record should maintain & have
control over itself.

> staring at it too long and I am getting nowhere!

Once you discover the joy of objects in the actorList, you'll never go back.
Just drop them in and watch them go.  You can get similar functionality out
of sprite behaviors.  The point is to decentralize the handling of the
sprite movement.

Best of luck,
Rob

/*********************************
* Rob Wingate, Software Human    *
* http://www.vingage.com         *
* mailto:[EMAIL PROTECTED] *
*********************************/

[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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