Newbie wants to know if one can run two handlers simultaneously

Scott Rossi scott at tactilemedia.com
Sun Dec 8 13:34:00 EST 2002


Recently, MFitz53 at cs.com wrote:

> I'm attempting to make a simple little shootem up game. I have the basic shoot
> button that draws a line from one loc to the loc of  button"enemy" and plays a
> sound effect. What I'd like to do is initiate a handler to move the button
> around the screen(I have that covered) and use the mouseUp handler from the
> shoot btn to stop the first handler from running it shoots, sounds off and
> changes the btn icon. At this point, I have to wait until the first handler
> finishes running before being able to shoot at a motionless target. I'm making
> this for a kid just turned 4 years old, but I think even that would be pretty
> unexciting for him. All ideas are appreciated.

Sure.  One technique I've used is to give each "sprite" object (button,
graphic, whatever) its own behavior script.  Then you bring each sprite to
life using "send <myCommand> to btn sprite1".  I've run up to nine sprites
simultaneously with barely noticeable slow down on moderately fast machines.

Regards,

Scott Rossi
Creative Director

Tactile Media, Multimedia & Design
Email: scott at tactilemedia.com
Web: www.tactilemedia.com




More information about the Use-livecode mailing list