Sunday 13 November 2011

Week 8

Object Sends Email

This week I learned how to get an object in side of second life, to send an email to my Google account. I made two objects that contain two different scripts. One script uses a sensor to get the player’s name, and the distance they are from the object. Each player’s name and distance from the object is said on channel 1864.


 
The second object has a listen function, that listens to channel 1864. Every time there is something said on channel 1864, the listen function adds it to a list. When the second object is touched, the object emails the list to my email account. When I first tried this out all the text was on the same line, so I used \n to make a new line for the next player’s name and distance. Using second life to email me could be very useful. I could set up a script to email me if anything important happens in second life like: Some one got a new high score on my game, There is a problem with one of my games, Or I could set up a script for players to give me feedback and it could send it to my email.

Object Reads Sent Emails
The second task for this week was to send an email to a object, and get the object to read the email when touched. To get the object’s email address I got the object to email me first, I then replied to the email then touched the object to read the email I just sent.

LLEmail(Which email address to send too, Subject of the email, The content/body of the email)= Used to send an email.
LLGetNextEmail()= Used with Email(){}, This function gets the next unread email that has been sent to the object.
Email()
{
} = This function is used to read the emails sent to the object. The function has 5 parameters that gets: the time of the email, the sender, the subject, the body, and the remaining number of unread emails.

No comments:

Post a Comment