- Extract the three lsl scripts from this RAP zip file. I’ll be providing these in a nice in-world package soon.
- Create two objects one to send messages the other to receive messages.
- In the sending object, create a script for the contents of RAPKernel.lsl.
- In the sending object, create one or more scripts for the contents of RAPTransmitter.lsl.
- These transmitter scripts MUST be named sequentially with a negative integer eg. -1, -2, -3 etc.
- The number of transmitter scripts will determine how quickly the sender script can send messages using email. For http based messages this won’t matter. However, http is still in test so email is currently is the only option for the next few days.
- In the receiver object, create a script for the contents of RAPReceiver.lsl. After that script is saved, a copy of the object’s key will be in your chat history.
- Edit the RAP Kernel script and in the touch_start function, replace the phrase PUT A VALID EMAIL ADDRESS HERE with the key for the receiver object followed by @lsl.secondlife.com.
- Click the object and examine the chat messages it sends.
Given the example code touch_start code:
rap(”PUT A VALID EMAIL ADDRESS HERE”,”one”,[1, <0,0,0>,”something, fast and “,”loud”],[”intOne”,”vectOne”,”strOne”,”strTwo”]);
rap(”PUT A VALID EMAIL ADDRESS HERE”,”do”,[”it”,”slow”],[]);
rap(”PUT A VALID EMAIL ADDRESS HERE”,”two”,[”the result”,”and say something fast”],[]);
Clicking the object should produce the following output:
[1:24] Object: action is: one
[1:24] Object: directions are: stageDirections0intOne11vectOne5<0.000000, 0.000000, 0.000000>strOne3something, fast and strTwo3loud
[1:24] Object: number of directions is: 4
[1:24] Object: integer intOne = 1
[1:24] Object: vector vectOne = <0.000000, 0.000000, 0.000000>
[1:24] Object: string strOne = something, fast and
[1:24] Object: string strTwo = loud
[1:24] Object: GOT one with - 0stageDirections,1intOne, 1, 5vectOne, %3C0%2E000000%2C%200%2E000000%2C%200%2E000000%3E, 3strOne, something%2C%20fast%20and%20, 3strTwo, loud
[1:24] Object: action is: do
[1:24] Object: directions are: stageDirections0l03itl13slow
[1:24] Object: number of directions is: 2
[1:24] Object: string l0 = it
[1:24] Object: string l1 = slow
[1:24] Object: do not handled
[1:24] Object: action is: two
[1:24] Object: directions are: stageDirections0l03the resultl13and say something fast
[1:24] Object: number of directions is: 2
[1:24] Object: string l0 = the result
[1:24] Object: string l1 = and say something fast
[1:24] Object: GOT two with - 0stageDirections,3l0, the%20result, 3l1, and%20say%20something%20fast
FUNK In Second Life :: Including Components of FUNK | 02-Mar-07 at 6:25 am | Permalink
[…] via link_message. The latter is preferable as it is easier to maintain. However, for the examples, RAP scripts contain the FUNK Encoding scripts in line where appropriate to make it easier to see how things […]
Croquet 2 Play » The Demo Is Evolving | 08-Mar-07 at 2:42 pm | Permalink
[…] in Croquet, Second Life and Javascript(no 3D yet, but text and 2D renderings will work). The core Second Life RAP code is already available. Thanks for being patient […]