Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

can you IM using scripts?

Lefty Belvedere
Lefty Belvedere
Join date: 11 Oct 2004
Posts: 276
11-28-2005 18:15
is it possible to automate IM messages?

I'm working on a game that relies on clues communicated through timed IMs

~Lefty
Aaron Levy
Medicated Lately?
Join date: 3 Jun 2004
Posts: 2,147
11-28-2005 18:37
You can IM avatars (players), but not other objects.

http://secondlife.com/badgeo/wakka.php?wakka=llInstantMessage
Lefty Belvedere
Lefty Belvedere
Join date: 11 Oct 2004
Posts: 276
11-28-2005 18:48
i would be IMing an entire group, not simply the object's owner.

~Lefty
Rodrick Harrington
Registered User
Join date: 9 Jul 2005
Posts: 150
11-28-2005 20:09
iirc the llInstantMessage function only works for an avatar key, which means you will have to preload the keys of the entire group into a list in the script in order to make use of it.
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
11-29-2005 18:18
Simply have all participants in the game "touch" your object to "register" before the game starts. With this touch, have their key passed to a list that will Instant Message them at the correct times. You'll probably want to put several quality controls into the script (prevent double-registration, provide for memory caps, etc.).
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
Harris Hare
Second Life Resident
Join date: 5 Nov 2004
Posts: 301
11-30-2005 06:42
There's also a built in delay of 2 seconds for each llInstantMessage() call so keep that in mind. If your game has 15 players, it can take up to 30 seconds to instant message all of them.
Padraig Stygian
The thin mick
Join date: 15 Aug 2004
Posts: 111
11-30-2005 08:04
In light of that 2 second delay, I'd suggest having your players wear an object -- call it a decoder ring -- that recieves messages from the clue-giving object via llShout on a large negative numbered channel -- -959738, or some such. The ring can then llOwnerSay the message to the wearer, thereby eliminating the delay, and keeping the timer working properly.

And I know somebody's going to yell at me for even *suggesting* llShout, but it's the solution I'd use.
_____________________
(You): Aww! My pants won't rez! Does this texture look okay on me?

Incidental Radio :: Because nothing is by design
Now featuring Torley-tastic technomusic!
Ben Bacon
Registered User
Join date: 14 Jul 2005
Posts: 809
11-30-2005 10:25
For a large number of players, within shout distance, Padraig's suggestion seems best to me (sorry for not yelling, Pad :D )

For very few players - 10 or less, say - 10 individual scripts in your master object would do - with each one IMing one player (as long as you don't need to IM more often than every 2 seconds)

In between (or for few players as well) you could also have seperate prims. At the the registration site you could have a game board with 30 "status" prims - buttons or something. When new players want to join they click on an available button, which gets their key from the touch_start event - changes its appearance to show that its slot is taken - and responds to link messages from the board by IMing them to that player during the game.

During the game it could also change appearance to show the player's status, etc etc.