Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Procedure Question Link Message & Acknowledgement

Bloodsong Termagant
Manic Artist
Join date: 22 Jan 2007
Posts: 615
05-14-2007 07:39
heyas;

i'm creating a base flappy-flexi wing system that will automatically set up a pair of wings to flap properly, without the end-user doing anything but building them and dropping the scripts in.

the scripts start out in the default state, which is used to calculate all the setup info. they then have a 'running' state, in which they actually do the flapping.

being an error-conscious kinda person, i set it up so that the root prim sends the children prim some info, and waits for all the children to send back an acknowledgement before starting to run.

my question is, is this kinda redundant? or maybe unneccesary? can the root just send out its info then go straight to running, and let the children catch up?

if i'm worried about the root's message (they're link messages) getting lost and needing an ack, shouldn't i worry about the child's ack message getting lost, too? because if the root doesn't get all the acks, it wont start running.


what do you guys think? have you had any similar setups and experiences with that?
thanks!
_____________________
Why Johnny Can't Rotate:
http://forums.secondlife.com/showthread.php?t=94705
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
05-14-2007 09:15
It is very rare for link messages to get lost. Generally, when they do, it is because of:

1) The intended receiver script isn't fully loaded and running, or is not yet in a state with a link_message event.
2) The intended receiver script's event queue is full at the moment; all extra events are discarded until it processes another event.
3) Extreme sim lag and/or crash situations are in progress.
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
05-14-2007 20:14
it might be abit of overkill for what your doing but IMO its a good practice to get into

keep control of your scripts is my motto :)
Bloodsong Termagant
Manic Artist
Join date: 22 Jan 2007
Posts: 615
05-17-2007 07:44
thanks, guys!

what i THINK would be smarter, and what ill do....

is have the default state be a sort of in-limbo wait state. then, when the user is ready to have the object to the startup calculations, s/he can tell it to do so with a menu command. THEN it will go into startup calculating state, and THEN it will transition to running.

and it wont go nuts trying to figure out if it should be calculating or running when it starts.