simple rlv script question
|
Lissie Rumble
Registered User
Join date: 12 Aug 2009
Posts: 8
|
10-02-2009 00:39
Hello am kinda new to scripting, but am having fun learning stuff  I am trying to get a prim to deny unsit for anyone using rlv that sits on it. I have got it so far as to restrain ME, but it doesn't seem to work on anyone else. Does anyone have a basic sit and restrain script with no bells on that I can look at so I can figure out how it works? I had a look on the web but could see no examples anywhere! thanks!!! xx
|
Lightwave Valkyrie
Registered User
Join date: 30 Jan 2004
Posts: 666
|
10-02-2009 03:27
_____________________
L$ is the root of all evil videos work! thanks SL 
|
Lance Corrimal
I don't do stupid.
Join date: 9 Jun 2006
Posts: 877
|
10-02-2009 03:34
by default, RLV can only do things to the OWNER of the scripted object, because the RLV part of the client is only listening to stuff that comes via llOwnerSay(), with the single exception of @version=. therefor you need a RLV relay worn on your avatar to make RLV-scripted object work for you if they are owned by someone else. that being said, the hint about opencollar above is a good one... from what i've seen so far, the opencollar code has the most complete RLV support, and the collars are free  ... "collars are free" ... sounds funky.
_____________________
From: Ralektra Breda Your maturity rating is directly reflected by the number of question marks you place at the end of a question. From: Lindal Kidd Those who enter any virtual world with the main purpose of making money at it...probably won't.
|
Imnotgoing Sideways
Can't outlaw cute! =^-^=
Join date: 17 Nov 2007
Posts: 4,694
|
10-02-2009 05:12
Look into devices with a "relay" function. Most RLV traps use a standardized relay routine together with most of the better made collars, HUDs, and other bits so that things like proximity traps, snares, and cages can automatically force you to sit, move, pose, bind, and many other actions. (^_^)y
|
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
|
10-02-2009 06:11
You might find Soen Eber's discussions and code in "Scripting Restrained Life (an exploration)" help you a lot /54/6e/330830/1.html .
|
Lissie Rumble
Registered User
Join date: 12 Aug 2009
Posts: 8
|
10-02-2009 06:14
From: Lance Corrimal by default, RLV can only do things to the OWNER of the scripted object, because the RLV part of the client is only listening to stuff that comes via llOwnerSay(), with the single exception of @version=.
yes, but I have been trapped by a few objects in my time that haven't been owned by me! you don't need a collar for those traps to work too, only a relay. Thanks for your replies so far, but no help to me 
|
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
|
10-02-2009 06:22
From: Lissie Rumble yes, but I have been trapped by a few objects in my time that haven't been owned by me! you don't need a collar for those traps to work too, only a relay. Thanks for your replies so far, but no help to me  Take a closer look at Soen's final script at /54/6e/330830/1.html#post2506149 If you want to post what you've got here, I'll try to give you a hand.
|
Imnotgoing Sideways
Can't outlaw cute! =^-^=
Join date: 17 Nov 2007
Posts: 4,694
|
10-02-2009 06:24
From: Lissie Rumble yes, but I have been trapped by a few objects in my time that haven't been owned by me! you don't need a collar for those traps to work too, only a relay. Thanks for your replies so far, but no help to me  It looks like you already have half the information you need. The item needs to communicate with the relay. Find out what attached relays require in order to work with a trap and you'll have the solution. (^_^) And I second Innula's advice to look into Soen's work and information. (^_^)y
|
Lissie Rumble
Registered User
Join date: 12 Aug 2009
Posts: 8
|
10-02-2009 06:51
the soen stuff is probably brilliant! of that I have no doubt ... am not really all that good at scripting, especially sorting through somebody else's code. It's a bit opaque to me at this stage. I just wanted something ever so simple that would give me a building block, something to start with, before I get into all the complicated things  Sorry if I am being dumb 
|
Beverly Ultsch
Registered User
Join date: 6 Sep 2007
Posts: 229
|
10-02-2009 08:15
This is about as basic as it gets, this will trap someone for 60 seconds before releasing them. No checks are made to see if the commands fail. integer chanRLV = -1812221819; key victim;
default { state_entry() { llSitTarget(<0.0, 0.0, 0.1>, ZERO_ROTATION); } changed(integer change) { if(change & CHANGED_LINK) { victim = llAvatarOnSitTarget(); if(victim) { llSay(chanRLV, "capture," + (string)victim + ",@unsit=n"); llSetTimerEvent(60); } }
} timer() { llSetTimerEvent(0.0); llSay(chanRLV, "release," + (string)victim + ",!release");
} }
|
Lissie Rumble
Registered User
Join date: 12 Aug 2009
Posts: 8
|
10-02-2009 08:24
thanks beverly! something I can enjoy tinkering with! when I get my head round that, will scale the dizzy heights of mount soen!! cheers!!!! 
|
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
|
10-03-2009 05:52
From: Lissie Rumble thanks beverly! something I can enjoy tinkering with! when I get my head round that, will scale the dizzy heights of mount soen!! cheers!!!!  Most of Soen's code is devoted to version checking and error handling. As you'll be aware, RLV commands have to be issued by an object belonging to the victim, so in order to capture anyone but you, your chair needs to communicate with the victim's RLV relay. A lot of Soen's script is devoted to making sure the avatar you're trying to capture is using RLV in the first place, that his or her relay has accepted the command, what to do if you don't manage to trap your victim, what to do if your victim crashes while still a captive and so on.
|