Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Flash




Randomised Cockroaches



I've been working on this problem for a while, but it's proving difficult. I need cockroaches to not run into certain objects (can be in an MC) and run away from the mouse when you move it near them.

It would be something like:

cockroach run random places

if cockroach hittest object
cocoroach stop

if cockroach hittest hand (I have a hand being dragged for a cursor)
cockroach run other way



I know how vague that is. I can probably stop the cockroach from running into certain things, but I have no idea how to make them run in random paths, or away from the mouse.

Also - for convenience, let's say that the hand MC is named: pointer
and the cockroach MC is named: bug (probably will have bug 1, 2 and 3.)


I know it's a big ask, but I'd be very appreciative if I could work this out.

Thanks in advance
-SaRs




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

1 Object Following A "randomised" Object
Just a quick querie, unsure whether I'm linking up some objects in the most effective manner with my flash?
:
:
The starting script was "critter_A" which followed the x and y coordinates of your mouse.
:
:
I changed that to following the coordinates of another "critter_B" which is randomised in its movement path.

I can't seem to get them "talking" to each other, so "A" only goes to the first coordinates of "B".

Simple enough but I'm sure I'm unsure which section is wrong?

I've attached the "FLA." as an example. (Flash MX)
:
Any feedback would be helpful,
cheers

Help: : One Object Following A "randomised" Object
: : one object following a "randomised" object

Just a quick querie, unsure whether I'm linking up some objects in the most effective manner with my flash?
:
:
The starting script was "critter_A" which followed the x and y coordinates of your mouse.
:
:
I changed that to following the coordinates of another "critter_B" which is randomised in its movement path.

I can't seem to get them "talking" to each other, so "A" only goes to the first coordinates of "B".

Simple enough but I'm sure I'm unsure which section is wrong?

I've attached the "FLA." as an example. (Flash MX)
:
Any feedback would be helpful,
cheers

Copyright © 2005-08 www.BigResource.com, All rights reserved