Fishy

Monday, March 5, 2007 by sugarspun58 | Discussion: Widget talk

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

Bichur
Reply #1 Monday, March 5, 2007 12:12 PM
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.
sugarspun58
Reply #2 Wednesday, March 7, 2007 6:19 AM
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

Fairyy~
Reply #3 Wednesday, March 7, 2007 6:53 AM
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.
Seekar
Reply #4 Wednesday, June 27, 2007 11:42 PM
Where did you get the fluttering fairy widget?

What is it called?
Fairyy~
Reply #5 Thursday, June 28, 2007 6:12 AM
Where did you get the fluttering fairy widget?


Sorry, its not a widget posted at WC , its one that buzzh58 made special for me.
Seekar
Reply #6 Thursday, June 28, 2007 9:18 AM
OK,

Thanks!
XX
Reply #7 Thursday, June 28, 2007 10:55 AM
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.

Please login to comment and/or vote for this skin.

Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:

  • Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
  • Access to a great community, with a massive database of many, many areas of interest.
  • Access to contests & subscription offers like exclusive emails.
  • It's simple, and FREE!



web-wc01