Hey everyone,
My RPG TatooineRP is going live in a few days and I just realized an issue.
I have two media on a prims in the same building, once linked to audio and another to videos.
How do I create a trigger so that when either is active it sends the other back to the menu HTTP?
I cannot link them because of the way MOP works. It is annoying when one is on and the other is turned on and they are both going at once.
I was thinking I could create an estate counter and each player could check it when activated if it's 0 make it 1 if 1 leaves it one and send a trigger to send the other media to the menu HTTP address.
Does anyone out there do anything like this or have a direction to send my remedial Jawa rear-end to?
Estate switch allowing only 1 media on a prim at a time?
- Lunk Portal
- Posts: 150
- Joined: Wed Jan 26, 2022 10:03 am
- Location: Northern Michigan
- Has thanked: 100 times
- Been thanked: 151 times
- Contact:
Estate switch allowing only 1 media on a prim at a time?
- These users thanked the author Lunk Portal for the post:
- Ilan Tochner
B. A. Shields (Lunk Portal)
Outer Rim Travel Agency on Tatooine
Kitely Market - Lunk's Loot
SecondLife Market - Lunk's Loot
My Novels and other Projects - https://linktr.ee/bashields
Outer Rim Travel Agency on Tatooine
Kitely Market - Lunk's Loot
SecondLife Market - Lunk's Loot
My Novels and other Projects - https://linktr.ee/bashields
-
- Posts: 1314
- Joined: Sun Dec 23, 2012 2:26 pm
- Has thanked: 1134 times
- Been thanked: 1142 times
Re: Estate switch allowing only 1 media on a prim at a time?
For some reason I never have much luck with MOAP so this may or may not work.
Rez a couple of prims, name them MOAP0 and MOAP1. Put the URL for the content to be displayed on each in their respective description fields. The HOME url is hard-coded in the script as is the display FACE used.
Rez a prim, set Y taper = 1.0 and hopefully faces 1 and 3 should be uppermost and touchable to change which prim is playing. Add script. Texture faces as appropriate.
As ever, very basic but maybe get you started.
Rez a couple of prims, name them MOAP0 and MOAP1. Put the URL for the content to be displayed on each in their respective description fields. The HOME url is hard-coded in the script as is the display FACE used.
Code: Select all
integer CHAN = -727;
string HOME = "https://www.bbc.co.uk/";
string PLAY;
integer FACE = 2;
integer HNDL;
default
{
state_entry()
{
PLAY = llGetObjectDesc();
HNDL = llListen(CHAN, "", NULL_KEY, "");
}
listen(integer c, string name, key id, string msg)
{
llClearPrimMedia(FACE);
if ((c == CHAN) && (msg == llGetObjectName()))//hears own name so plays url in object description
{
llSetPrimMediaParams(FACE,
[PRIM_MEDIA_AUTO_PLAY,TRUE,
PRIM_MEDIA_CURRENT_URL, PLAY,
PRIM_MEDIA_HOME_URL, HOME,
PRIM_MEDIA_HEIGHT_PIXELS,512,
PRIM_MEDIA_WIDTH_PIXELS,512]);
}
else if ((c == CHAN) && (llSubStringIndex(msg, "MOAP") > -1))//hears other MOAP so reverts to HOME
{
llSetPrimMediaParams(FACE,
[PRIM_MEDIA_AUTO_PLAY,TRUE,
PRIM_MEDIA_CURRENT_URL, HOME,
PRIM_MEDIA_HOME_URL, HOME,
PRIM_MEDIA_HEIGHT_PIXELS,512,
PRIM_MEDIA_WIDTH_PIXELS,512]);
}
}
}
Code: Select all
integer CHAN = -727;
default
{
touch_start(integer n)
{
if (llDetectedTouchFace(0) == 1)
{
llShout(CHAN, "MOAP0");
}
else if (llDetectedTouchFace(0) == 3)
{
llShout(CHAN, "MOAP1");
}
}
}
- These users thanked the author Graham Mills for the post (total 2):
- Ilan Tochner • Lunk Portal