Change font size
It is currently Sun Aug 25, 2019 5:35 pm

Forum rules


{L_IMAGE}



Post a new topicPost a reply Page 1 of 1   [ 5 posts ]
Author Message
 Post subject: scavenger hunt, using teleport
PostPosted: Fri Jan 19, 2018 4:28 pm 
Furious Typer

Joined: Mon Feb 13, 2017 1:53 pm
Posts: 65
Hi again!
I'm trying to build a scavenger hunt.

The players are asked a question at each station.
If they give the correct answer, they are teleported to the next station.
There they are asked another question.
This forces the players to answer all questions correctly if they want to win.

From the last station they will be teleported back to the start station,
after answering the last question correctly.

I couldn't quite find my ideal solution.
Instead I used a work-around.
With each correct answer, a teleporter is rezzed.
When clicked, it teleports you to the next station.

Now I have 3 questions:

1. Is it possible to be teleported by simply typing the correct answer as a message into the chat
(i.e. through a listen-script)?

2. Is there a simple way of creating a teleport-circle,
in which the stations are connected automatically,
without having to manually type in the exact locations of the stations into the scripts again and again?

I found one, but it uses a menu, which isn't helpful for my Scavenger Hunt.

3. If possible, it would be great if the correct answer also triggered an object being given to the avatar,
as a reward.

Thanks very much in advance
:-)


Top
 Profile  
 
 Post subject: Re: scavenger hunt, using teleport
PostPosted: Sat Jan 20, 2018 10:45 am 
Furious Typer
User avatar

Joined: Fri Mar 26, 2010 12:11 pm
Posts: 230
Location: Belgium / Brussels
1. Yes it is possible, by opening a listening channel.
The player writes his answer on the open channel
eg: /511 my answer ...
2. Yes it is possible, using the sensor
3. Yes it is possible, based on the same principle as point 1

_________________
Webmaster @ digitalconcepts.free.fr & digigrids.free.fr


Top
 Profile  
 
 Post subject: Re: scavenger hunt, using teleport
PostPosted: Sat Jan 20, 2018 2:00 pm 
Furious Typer

Joined: Mon Feb 13, 2017 1:53 pm
Posts: 65
Hi!
Thanks for your reply.

Regarding question 1:
I tried for a long time, but I wasn't able to modify the "touch-start" or "sit-on"-triggered teleport scripts
into a script using a channel chat message.
Simply replacing the "touch-start" trigger with a "llListen" trigger just didn't work out.
Do you have an idea how to do that?

question 2:
Sensors are way beyond my scripting knowledge, yet, unfortunately.

question 3:
For whatever reason, rezzing the teleporter and giving an object to an avatar at the same time
doesn't work here.
Do you have any ideas why?

Thanks for answering, anyway. :-)

This is the simple opensimulator.org-script I used for the teleporter:


-------------------------------------------------------------------------

// Example osTeleportAgent Script
//
// Set Destination as described below, There are a Few Options depending on Application:
// IN GRID Teleport
// Destination = "1000,1000"; = Using In-Grid Map XXXX,YYYY coordinates
// Destination = "RegionName"; = Using RegionName
// HyperGrid Teleport (region must be HG Enabled)
// Destination = "TcpIpAddr:Port:RegionName"; = Using the Target/Destination IP Address
// Destination = "DNSname:Port:RegionName"; = Using the Target/Detination DNSname
// Note: RegionName is Optionally Specified to deliver Avatar to specific region in an instance.
//
// ========================================================================================
// === SET DESTINATION INFO HERE ===
//
string Destination = "LBSA Plaza"; // your target destination here (SEE NEXT LINES) Can Be
vector LandingPoint = <128,128,50>; // X,Y,Z landing point for avatar to arrive at
vector LookAt = <1,1,1>; // which way they look at when arriving
//
default
{
on_rez(integer start_param)
{
llResetScript();
}
changed(integer change) // something changed, take action
{
if(change & CHANGED_OWNER)
llResetScript();
else if (change & 256) // that bit is set during a region restart
llResetScript();
}
state_entry()
{
llWhisper(0, "OS Teleportal Active");
}
touch_start(integer num_detected)
{
key avatar = llDetectedKey(0);
llInstantMessage(avatar, "Teleporting you to : "+Destination);
osTeleportAgent(avatar, Destination, LandingPoint, LookAt);
}
}


Top
 Profile  
 
 Post subject: Re: scavenger hunt, using teleport
PostPosted: Sun Jan 21, 2018 4:49 am 
Furious Typer
User avatar

Joined: Fri Mar 26, 2010 12:11 pm
Posts: 230
Location: Belgium / Brussels
1. The Listen Teleporter Script
Usage: Copy/Paste the script below into a prim
{L_CODE}:
// Listen Teleport v0.1 by djphil (CC-BY-NC-SA 4.0)

string  dest = "noname";
vector  land = <128.0, 128.0, 50.0>;
vector  look = <1.0, 1.0, 1.0>;
integer chan = 511;
integer echo;

default
{
    state_entry()
    {
        llOwnerSay("OS Teleportal Active ...");
        echo = llListen(chan, "", "", "");
    }

    listen( integer canal, string name, key user, string message)
    {
        llInstantMessage(user, "Teleporting you to " + dest);
        osTeleportAgent(user, dest, land, look);
    }

    changed(integer change)
    {
        if (change & CHANGED_OWNER) llResetScript();
        if (change & CHANGED_REGION) llResetScript();
        if (change & CHANGED_REGION_START) llResetScript();
        if (change & CHANGED_REGION_RESTART) llResetScript();
    }

    on_rez(integer param)
    {
        llResetScript();
    }
}

2. The Sensor Teleporter Script
Usage: Copy/Paste the script below into a prim
{L_CODE}:
// Sensor Teleporter v0.1 by djphil (CC-BY-NC-SA 4.0)

string  dest = "noname";
vector  land = <128.0, 128.0, 50.0>;
vector  look = <1.0, 1.0, 1.0>;
float   scan = 3.0;
float   temp = 5.0;

default
{   
    state_entry()
    {
        llSetSitText("Teleport");
        llOwnerSay("OS Teleportal Active ...");
        llSensorRepeat("", "", AGENT, scan, TWO_PI, temp);
    }

    sensor (integer number)
    {
        key user = llDetectedKey(0);
        llInstantMessage(user, "Teleporting you to " + dest);
        osTeleportAgent(user, dest, land, look);
    }

    changed(integer change)
    {
        if (change & CHANGED_OWNER) llResetScript();
        if (change & CHANGED_REGION) llResetScript();
        if (change & CHANGED_REGION_START) llResetScript();
        if (change & CHANGED_REGION_RESTART) llResetScript();
    }

    on_rez(integer param)
    {
        llResetScript();
    }
}

3. The Object Rezzer/Giver Script
Usage: Rez 3 prims
prim 1 = rezzer
prim 2 = teleporter
prim 3 = object
- Put prim 2 and 3 into prim 1
- Copy/Paste the script below into prim 1
{L_CODE}:
// Object Rezzer/Giver v0.1 by djphil (CC-BY-NC-SA 4.0)

default
{
    state_entry()
    {
        llOwnerSay("Rezzer/Giver Active ...");
    }

    touch_start(integer number)
    {
         llRezObject("Teleport", llGetPos() + <0.0, 0.0, 1.0>, ZERO_VECTOR, ZERO_ROTATION, 0);
         llGiveInventory(llDetectedKey(0), "Object");
    }

    changed(integer change)
    {
        if (change & CHANGED_OWNER) llResetScript();
        if (change & CHANGED_REGION) llResetScript();
        if (change & CHANGED_INVENTORY) llResetScript();
        if (change & CHANGED_REGION_START) llResetScript();
        if (change & CHANGED_REGION_RESTART) llResetScript();
    }

    on_rez(integer param)
    {
        llResetScript();
    }
}

Bonus: The Touch/Sit/Listen/Sensor Teleporter script
Usage: Copy/Paste the script below into a prim
{L_CODE}:
// Touch/Sit/Listen/Sensor Teleporter v0.1 by djphil (CC-BY-NC-SA 4.0)

string  dest = "noname";
vector  land = <128.0, 128.0, 50.0>;
vector  look = <1.0, 1.0, 1.0>;
integer chan = 511;
float   scan = 3.0;
float   temp = 5.0;
integer echo;
key     user;

default
{   
    state_entry()
    {
        llSetSitText("Teleport");
        llOwnerSay("OS Teleportal Active ...");
        llSitTarget(<0.0, 0.0, 1.0>, ZERO_ROTATION);
        llSensorRepeat("", "", AGENT, scan, TWO_PI, temp);
        echo = llListen(chan, "", "", "");
    }

    touch_start(integer number)
    {
        user = llDetectedKey(0);
        llInstantMessage(user, "Teleporting you to " + dest);
        osTeleportAgent(user, dest, land, look);
    }

    listen( integer canal, string name, key user, string message)
    {
        llInstantMessage(user, "Teleporting you to " + dest);
        osTeleportAgent(user, dest, land, look);
    }

    sensor (integer number)
    {
        user = llDetectedKey(0);
        llInstantMessage(user, "Teleporting you to " + dest);
        osTeleportAgent(user, dest, land, look);
    }

    changed(integer change)
    {
        if (change & CHANGED_LINK)
        {
            user = llAvatarOnSitTarget();
            if (user == NULL_KEY) return;
            llUnSit(user);
            llInstantMessage(user, "Teleporting you to " + dest);
            osTeleportAgent(user, dest, land, look);
        }

        if (change & CHANGED_OWNER) llResetScript();
        if (change & CHANGED_REGION) llResetScript();
        if (change & CHANGED_REGION_START) llResetScript();
        if (change & CHANGED_REGION_RESTART) llResetScript();
    }

    on_rez(integer param)
    {
        llResetScript();
    }
}

Enjoy! :)

_________________
Webmaster @ digitalconcepts.free.fr & digigrids.free.fr


Top
 Profile  
 
 Post subject: Re: scavenger hunt, using teleport
PostPosted: Sun Jan 21, 2018 11:28 am 
Furious Typer

Joined: Mon Feb 13, 2017 1:53 pm
Posts: 65
Thank you so much for your help!

I finally finished it!

You're awesome, mate. :-)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 5 posts ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
610nm Style by Daniel St. Jules of Gamexe.net