Jump to content

Gonna do something I have never done before


Fritigern Gothly
 Share

You are about to reply to a thread that has been inactive for 1725 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Not a cry for help, I just want to share something because... well, just because. Who knows, maybe this will help someone... or not. LOL


I am having a b!tch of a time with this script I am writing, and it consists of two rather complex sections.

I pride myself in making single scripts, but one of the parts is not working as well as it should.

So in a rare moment of despair, I have decided I will split the script into two, using link messages to have them communicate. I hope that makes it easier for me to focus on that one part which gives me trouble, and (if I do it right) allows me to just execute that split off section without having to @jump over the part which already works well, or (even worse) having to comment the section which already works well.
It will also let me have different versions of the second part, which I find useful for keeping track of my changes (these versions are of course to be deleted as soons as I am contend that everything works)

Of course, me being me, I will re-integrate the split off part once it works the way I intend it.

That's all,  thank you for reading my rant 🙂

 

 

Edited by Fritigern Gothly
Emphasised that this is not a request/cry for help.
  • Like 2
Link to comment
Share on other sites

You're a more advanced scripter than I, but I use separate states to separate things I'm trying to debug like that. I guess if the two performances need to be syncronized, then two scripts would be the way to go.  

Link to comment
Share on other sites

1 hour ago, Fritigern Gothly said:

So in a rare moment of despair, I have decided I will split the script into two, using link messages to have them communicate. I hope that makes it easier for me to focus on that one part which gives me trouble, and (if I do it right) allows me to just execute that split off section without having to @jump over the part which already works well, or (even worse) having to comment the section which already works well.
It will also let me have different versions of the second part, which I find useful for keeping track of my changes (these versions are of course to be deleted as soons as I am contend that everything works)

That makes perfectly good sense.  Sometimes it's necessary to split a very large script in order to stay within memory limits, and in other cases -- like yours -- it makes sense to pull modular units out of a larger script to give yourself some versatility.

  • Like 1
Link to comment
Share on other sites

I'm writing a pathfinding system, and I'm up to 3 scripts already, just to get them to fit. Soon, 4.  More before I'm done. Intercommunication uses link messages and JSON. Current breakdown is:

  • Initial route planning (uses llGetStaticPath, then finds and brackets obstructions.)
  • Maze solver (solves mazes of up to 41x41 cells 0.5 m on a side to get around the obstructions.)
  • Debug marker display (this puts temporary objects in-world to show the path being generated)

Those are all running. To be added:

  • Path to KFM list conversion, with speed and turn changes to make the movement look human (slow for turns, go wide on sharp turns if space is available.)
  • Cache to store 10-20 previously computed routes, to speed this up.
  • Path execution (monitors the KFM progress and does ray casts to detect any new obstacles)

All this to do what llNavigateTo is supposed to do, but won't do reliably or with motion better than zombie grade. Since LL refuses to fix all their pathfinding bugs, I have to work around them.

I've seen a chatterbot that uses about 20 scripts to store its phrase vocabulary.

Edited by animats
  • Like 1
Link to comment
Share on other sites

One of the best advices I have ever received on this forum (thank you, Rolig) was to use llParseString2List when two scripts communicate with each other. That way you can communicate a set of data with one link message. It has become a standard feature of all my inter-script communications. You probably know this trick already, but maybe it is helpful for someone on the forum.

Edited by Estelle Pienaar
Link to comment
Share on other sites

5 hours ago, Estelle Pienaar said:

use llParseString2List when two scripts communicate with each other. That way you can communicate a set of data with one link message.

That is indeed good advice, and I have been doing that for a long time myself. But as you said, it may be new and useful to someone who is reading this, so the advice is still welcome :)

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1725 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...