Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

triggering touch via collision?

Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-10-2009 14:45
before you say it can't be done, I've now seen 2 objects that do this, but the one i'm most interested in triggers llMapDestination through a collision...

anyone know this trick? the applications are endless, and it's obviously a hack, possibly using volume detect and or pass touches/collisions, but I've yet to work out how it's done. any help would be appreciated, IMs/PM's are most welcome.

wouldn't have believed it if I hadn't seen it in action.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Cypher Ragu
[Mad Scientist]
Join date: 6 Jul 2008
Posts: 174
01-10-2009 14:59
I would like an explanation of this too. I've seen stargate-type devices utilize this technique...
_____________________
Life is a highway... And I just missed my exit.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-10-2009 15:30
there seems to be some associated jira's about he revers case, ie touches triggering collisions, and state changes not flushing touch_start events... neither helpful so far
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Day Oh
Registered User
Join date: 3 Feb 2007
Posts: 1,257
01-10-2009 15:51
Someone's gotta ask, do you mean like the stargate example? Where you touch first, and it enters a loop waiting for you to collide before it calls llMapDestination? In that example I assume it uses llGetObjectDesc or something to receive a message while looping in the touch event
_____________________
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-10-2009 16:19
hmm, that would work in that particular case, and I can't believe I forgot that trick considering it's one I used in my single click from an inventory landmark example... but I've seen another one that triggers a touch based on someone elses touching the object first, and the second person getting the touch event functionality.

I did find reference to a hack that would involve knowing the internal names of events in the compiler, but I suspect that will be repaired.

PS. I've seen that stargate system before, but I believe it also accepts chat input, so I dunno if it's using a check loop in the touch handler or not.

ok too tired to mess with this anymore today, good luck to anyone trying to figure it out
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Gordon Wendt
404 - User not found
Join date: 10 May 2006
Posts: 1,024
01-10-2009 17:21
not the same thing I know but by using the collision event or the collision_start event (the latter being more accurate unless you want to deal with a "while colliding" situation) and really you can trigger the same thing as a touch easily. An example:

CODE

a()
{
llOwnerSay("The answer to life, the universe, and everything is 42");
}

default
{
state_entry()
{
llOwnerSay("Script activated");
}

touch_start(integer total_number)
{
a();
}

collision_start(integer total_number)
{
a();
}
}

_____________________
Twitter: http://www.twitter.com/GWendt
Plurk: http://www.plurk.com/GordonWendt

GW Designs: XStreetSL

Gordon Wendt
404 - User not found
Join date: 10 May 2006
Posts: 1,024
01-10-2009 17:32
Darling Brody also uses a hack to get around this for her "entirely legitimate" map spammer device so there are ways around this. Unfortunately after doing a bit of testing on all the tricks I know I couldn't figure this one out without llmapdestination choking on the fact that you're not using a touch event to trigger it but this is a bit of a puzzler and I like a challenge so I'll try to keep testing too I guess.
_____________________
Twitter: http://www.twitter.com/GWendt
Plurk: http://www.plurk.com/GordonWendt

GW Designs: XStreetSL

Ron Khondji
Entirely unlike.
Join date: 6 Jan 2007
Posts: 224
2 objects.
01-11-2009 00:25
In the case of the stargates you need to be wearing a second object for it to work without touching.

This from the 'Open Stargate Network' site:
From: someone

Several people have asked why the automap is necessary, and why we can't just have "walk-through" teleports. This is an SL limitation. See http://jira.secondlife.com/browse/SVC-212 for a full history on this subject. Many people have pointed out that the Quantum Portal stargates have walk through teleport. Strictly speaking, this is not true. To activate a quantum portal stargate, you need to touch the gate. The touch handler delays until a collision is detected by a second script. Only the person who originally touched the gate gets the "walk through teleport". Others in the area must still touch the event horizon. This solution is clunky, and causes new users quite a bit of confusion. Rather than implement a broken and confusing solution like this, the Open Stargate Network encourages you to use the automap object, and vote for SVC-212.


It's actually quite easy.
The object you walk into whispers something, and the object you are wearing opens the map upon hearing that something.

That's one way of doing it.
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
01-11-2009 01:00
Perhaps this fascinating article I found about llMapDestination will be enlightening.

http://www.slbuilding.com/slkeywords/llMapDestination_(1.8).htm

Perhaps not.
_____________________
-

So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.

I can be found on the web by searching for "SuezanneC Baskerville", or go to

http://www.google.com/profiles/suezanne

-

http://lindenlab.tribe.net/ created on 11/19/03.

Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard,
Robin, and Ryan

-
Ron Khondji
Entirely unlike.
Join date: 6 Jan 2007
Posts: 224
01-11-2009 01:53
From: SuezanneC Baskerville
http://www.slbuilding.com/slkeywords/llMapDestination_(1.8).htm


Ah yes, that explains it all :)
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
01-11-2009 08:16
From: SuezanneC Baskerville


http://www.slbuilding.com/slkeywords/llMapDestination_(1.8).htm



that almost made my head hurt lol
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
01-11-2009 08:35
From: SuezanneC Baskerville
Perhaps this fascinating article I found about llMapDestination will be enlightening.

http://www.slbuilding.com/slkeywords/llMapDestination_(1.8).htm

Perhaps not.


It didn't compile, what did I do wrong?


:)
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
01-11-2009 09:35
Yeah, I've done one with a helping attachment before. Unsatisfying without the right social context, but it works well. Heh.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-11-2009 10:51
well the gate example I tested required a touch to dial, so most likely using the check loop (still feel stupid about that one, since I came up with it ages back), but there are a few other items using this... I still think it's gotta be related to the 3 jira's I mentioned... but I can't parse it yet. I may give up on this due to potential for abuse (not that the cat isn't already out of the bag)
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
01-11-2009 11:05
Just in case anybody else is confused by this thread, as I was until I hit up the wiki, llMapDestination only works in a touch event or from a script in an attached object..
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-11-2009 14:33
... and yet somehow people are triggering it w/o a touch... so there's a hack to do it, but I don't have it figured out ::shrug::
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
01-11-2009 14:44
Anywhere to experience this?
_____________________
-

So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.

I can be found on the web by searching for "SuezanneC Baskerville", or go to

http://www.google.com/profiles/suezanne

-

http://lindenlab.tribe.net/ created on 11/19/03.

Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard,
Robin, and Ryan

-
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
01-11-2009 15:25
From: Void Singer
... and yet somehow people are triggering it w/o a touch... so there's a hack to do it, but I don't have it figured out ::shrug::

AND without any kind of attachment? You sure?
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
01-11-2009 15:36
What are the 3 jira issues?
_____________________
-

So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.

I can be found on the web by searching for "SuezanneC Baskerville", or go to

http://www.google.com/profiles/suezanne

-

http://lindenlab.tribe.net/ created on 11/19/03.

Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard,
Robin, and Ryan

-
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-12-2009 00:04
state changes retriggering touch_start event (ie if you have a state change in a touch start event, touch start will also trigger in the new state from the same touch)

touches triggering collisions in volume detect objects (apparently even if it's an unattached object that intersects the volume detect that is being touched)

and best for last a lil number reported by strife about how the compiler treats events as functions, possibly allowing a correctly named user function to replace the functionality of the same internally named event, allowing it to possibly be triggered outside it's scope.(translation: write a function to replace an event and trigger it from anywhere... possibly)

I can't remember the jira numbers offhand, but all three were active at browse time. the last looked promising, but I expect it'd be repaired for what should be obvious reasons.

as for good examples, I hesitate to say, because of the potential to get a certain person in possible trouble for something quasi legit... but I suppose the map spammer (which I havent actually seen at work) might be a good example... I also saw a collision sitter in action (thought it could be used wonderfully for telepads) but didn't manage to get a source or info.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Cypher Ragu
[Mad Scientist]
Join date: 6 Jul 2008
Posts: 174
01-18-2009 16:21
I just had an idea... I'm not sure if it would work, but what if a jump tag was being used in the collision event to jump to the touch_start event? I don't usually use jumps, so I'm not sure if they need to be in the same event/function... I'll try it as soon as I can log in.
_____________________
Life is a highway... And I just missed my exit.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-18-2009 20:29
pretty sure they are compiled per event, but i'll test that when I get a moment
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -