yup, this is an ad!
Napalm Riot Forums > Coding (Engine SDKs) > LSL
LSL
ӝspot
Chief Instigator
Does anyone else here code in Linden Scripting Language (Second Life scripting) much? I've messed around with it a little bit from time to time. Can usually work out anything I need but never taken on a big project, although I've had a lot of them in mind.
If you have never messed with it, the structure is quite interesting. Script reside in 'prims' (short for primitives) which are exactly that, primitive models in-world. You can have many scripts 'inside' any prim, and the prim itself then becomes a vehicle for communication with the outside. So interaction with the prim is interaction with the scripts inside.
Most communication between different prims (and their scripts) is done on 'link' messaging layers, which work almost exactly like IM but specifically for scripts. Another very interesting thing is that the scripts are being ran by the 'sim' (short for simulator) which is more or less the server hosting that particular area (or 'island' 'sim') which the prim is functioning in. Due to keeping sims functioning with everyone on them, most of the functions which you can run in the scripting language have a certain load value, and some of them have a forced sleep.
For example, you can send email to an external address from within a script, but the sim forces that entire script to sleep for 20 seconds (not running) after the email is sent. This causes some interesting situations where you end up detaching the email sending functionality from your main script and calling it separately, so that when the sleep in enforced, it doesn't lock up your primary script. In situations where you may need to send email more then once in a 20 second period, you setup several 'email handlers' which all do the exact thing, but are different scripts, and call them in a round-robin process from the main script.
All and all, the structure is so different than anything I have worked in before, that it forces my mind to think about things contrary to what I am familiar. In my opinion, that kind of thing is always beneficial.
If you have never messed with it, the structure is quite interesting. Script reside in 'prims' (short for primitives) which are exactly that, primitive models in-world. You can have many scripts 'inside' any prim, and the prim itself then becomes a vehicle for communication with the outside. So interaction with the prim is interaction with the scripts inside.
Most communication between different prims (and their scripts) is done on 'link' messaging layers, which work almost exactly like IM but specifically for scripts. Another very interesting thing is that the scripts are being ran by the 'sim' (short for simulator) which is more or less the server hosting that particular area (or 'island' 'sim') which the prim is functioning in. Due to keeping sims functioning with everyone on them, most of the functions which you can run in the scripting language have a certain load value, and some of them have a forced sleep.
For example, you can send email to an external address from within a script, but the sim forces that entire script to sleep for 20 seconds (not running) after the email is sent. This causes some interesting situations where you end up detaching the email sending functionality from your main script and calling it separately, so that when the sleep in enforced, it doesn't lock up your primary script. In situations where you may need to send email more then once in a 20 second period, you setup several 'email handlers' which all do the exact thing, but are different scripts, and call them in a round-robin process from the main script.
All and all, the structure is so different than anything I have worked in before, that it forces my mind to think about things contrary to what I am familiar. In my opinion, that kind of thing is always beneficial.
---
I, Gamer!
I, Gamer!
03.09.08 1:40 am

ɤ6od53nt (#16064)
Casts Magic Missile
"For the Glory of my LORD God!" --outcome of my first program
ӝspot (#16070)
Chief Instigator
If you need any pointers on how to fix that, let me know.
I, Gamer!
¤Sangue (#16280)
Is laying mines for the good of all.
I love my "model walk" that I use now.
Napalm Riot's News Babe.
ɤ6od53nt (#16091)
Casts Magic Missile
"For the Glory of my LORD God!" --outcome of my first program
ӝspot (#16108)
Chief Instigator
I, Gamer!
¤Sangue (#16281)
Is laying mines for the good of all.
...I still want to figure out how to make some clothes/hair/etc.
Napalm Riot's News Babe.
ɤphotofroggy (#16361)
Remembers What Arcades Are
ӝspot (#16418)
Chief Instigator
I, Gamer!
¤chillinvillain (#16871)
Is In Your Base, Killing Your Pokemans
"We aren't allowed to say brainstorm where I work because it's apparently offensive to people with cerebal palsy (bullshit)." --Chalkley3
ӝspot (#16881)
Chief Instigator
I, Gamer!
¤Sangue (#16888)
Is laying mines for the good of all.
>_>
<_<
Napalm Riot's News Babe.
¤chillinvillain (#16932)
Is In Your Base, Killing Your Pokemans
"We aren't allowed to say brainstorm where I work because it's apparently offensive to people with cerebal palsy (bullshit)." --Chalkley3
¤Sangue (#16943)
Is laying mines for the good of all.
Napalm Riot's News Babe.
¤chillinvillain (#17293)
Is In Your Base, Killing Your Pokemans
"We aren't allowed to say brainstorm where I work because it's apparently offensive to people with cerebal palsy (bullshit)." --Chalkley3
¤Sangue (#17612)
Is laying mines for the good of all.
Napalm Riot's News Babe.
ѻzionwingmaster (#18851)
VP of Crosseye Comics
HEATHEN!
Fear the Lamp.
VP of Crosseye Comics.
ӝspot (#18861)
Chief Instigator
I, Gamer!
¤Sangue (#19063)
Is laying mines for the good of all.
Napalm Riot's News Babe.
ӝspot (#19096)
Chief Instigator
I, Gamer!
¤Sangue (#19135)
Is laying mines for the good of all.
Napalm Riot's News Babe.
ѻzionwingmaster (#19531)
VP of Crosseye Comics
HEATHEN!
Fear the Lamp.
VP of Crosseye Comics.
ʊIrishancest (#20085)
Legally Certified Warthog Operator
Beware. The Internewt is real!
I'll have a loil, on the rocks.
Come Riot over in Napalm Chat: http://www.napalmriot.com/chat/
ӝspot (#20162)
Chief Instigator
But if you do, use the release candidate viewer, not the default one. Much much different.
I, Gamer!
ʊIrishancest (#20165)
Legally Certified Warthog Operator
Beware. The Internewt is real!
I'll have a loil, on the rocks.
Come Riot over in Napalm Chat: http://www.napalmriot.com/chat/
ɤDibol (#22342)
Rushes With Zerg
Just warning you.... Your heads about to be blown of with my R700...