Fishy

Hi there,

I'm using frogboy's fish objects on my desktop and they look great....

I have them 'contained' in another object and on my second monitor.

The problem is that I have several fish swimming on the screen, but they all do the same thing... ie swim at the same speed and in the same direction, either up, down or level. This is annoying because once they get to the top or bottom they all end up in the same line.

How would I go about editing the scripts? I was hoping to write a script for the parent class (ie the container) but I'm not sure how to create custom methods on each fish object in VBScript... is it possible?

Thanks

4,043 views 7 replies
Reply #1 Top
go into builder mode - right click on a fish - open properties - edit script - take a look

but they all do the same thing.


they're clones, they were created for your amusement, they have no free will

I find if I run one, then when it gets close to a side and just before it turns, I clone it - the drag the clone back to the other side - i get them going in different directions - if they start lining up as it were, I just tell myself - they're tetras, they school.
Reply #2 Top
lol thanks for input Bichur.

I have looked at the scripts, and on the surface they look fine.. I think it's something to do with the random number generator giving the same value for each instance of fish. (I'm also using the other fish object, begins with a K cannot remember it!!, and the same is happening to that).

What I would like to do is create a script in the container class which controls the random aspect and then trigger methods in the fish class to instigate movement.

Problem is I'm not to hot on VBScript, can you write methods into a child class, ie the fish class, and then access them from the parent object?

If so, I could then numerate each fish to make them move, and using a random routine to only change the properties, i.e. direction (vertical) and speed, of one instance.

Any thoughts you clever ppl???

Tony

Reply #3 Top
If so, I could then numerate each fish to make them move, and using a random routine to only change the properties, i.e. direction (vertical) and speed, of one instance.

Any thoughts you clever ppl???

Tony


Im sure the script can be changed. Maybe you could just try cloning the fish and slowing/Speeding up the animation on each one individually and exporting them as separate widgets with different names.

I have a little fairy that flutters on my screen the same way that the fishy does - I put up several at a time and they never bump paths.
Reply #5 Top
Where did you get the fluttering fairy widget?


Sorry, its not a widget posted at WC , its one that buzzh58 made special for me.
Reply #7 Top
I had same problem with that. Randomize is based on time, and if you run both objects at same time, the result will be that they will make same decisions.

I fixed this by randomizing once after certain delays, for example, first object no delay, second object 1 second delay, so on.