Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Possible to detect what prim is touched? (even not your own)

TheLoneWolf Arkin
Registered User
Join date: 26 Jan 2007
Posts: 29
12-23-2007 03:37
Hi,

is it possible to detect what prim i click on?

lets say there's a prim (or prim group) that has the name ie. Flower.

touch it. and my hud detects that i touched a prim called "Flower"
(even if this is not my own prim)

and if possible to detect who the owner is of that prim??

i know i can achieve this by inspecting the object but thats bnot what i'm looking for. it needs to go automatic.

ty.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
12-23-2007 04:59
no. impossible for a script to know what else you are clicking, when you click (it it's not the item you clicked), or to simulate a click for you...

the closest you could get instead of clicking is to shoot something at whatever you are facing, and have a script in that get the name/owner of whatever it hits.... but would only really be useful in mouselook or as a cambot... and would only track screen center
_____________________
|
| . "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...
| -
TheLoneWolf Arkin
Registered User
Join date: 26 Jan 2007
Posts: 29
12-23-2007 05:04
then is it possible to detect if you received an IM with a certain text string in it? (when you wear it as HUD). if not then my project is over :(
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
12-23-2007 05:24
if the user recieves an IM? no not via lsl.... now if a communication happens on an off channel that av's can't hear, but your hud listens to... that's different
_____________________
|
| . "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...
| -
TheLoneWolf Arkin
Registered User
Join date: 26 Jan 2007
Posts: 29
12-23-2007 05:28
yeah i know. but i want to make something that records how many times an item is clicked that isnt mine. to determen wich object has been clickt the most and is the most wanted one. but since none of the objext are mine i cant use any of those options like speaking on channels or sending mails, ..... so i guess this wont be working :(

tnx for clearing this out for me.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
12-23-2007 05:43
I'm guessing the objects in question generate their own IM's... yeah without access to the objects to add scripts, nothing to do for it
_____________________
|
| . "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...
| -
Wyatt Burton
Registered User
Join date: 11 Jan 2007
Posts: 49
12-23-2007 17:58
This is just a thought. Could you detect it with collision of the AV (or something attached to the AV) with the object?
Bobbyb30 Zohari
SL Mentor Coach
Join date: 11 Nov 2006
Posts: 466
12-23-2007 18:16
You could get the name if you're in mouselook and convert the key to a name with llObjectDetails.
_____________________
Bobbyb30 Zohari
SL Mentor Coach
Join date: 11 Nov 2006
Posts: 466
12-23-2007 18:17
From: TheLoneWolf Arkin
yeah i know. but i want to make something that records how many times an item is clicked that isnt mine. to determen wich object has been clickt the most and is the most wanted one. but since none of the objext are mine i cant use any of those options like speaking on channels or sending mails, ..... so i guess this wont be working :(

tnx for clearing this out for me.


Perhaps if you laid out your idea more clearly, we may be able to help.
_____________________
TheLoneWolf Arkin
Registered User
Join date: 26 Jan 2007
Posts: 29
12-24-2007 01:39
ok let me try to explain what i try to do here.

as for the time i have been in sl i seen new ppl come and dont know where to go. all they ask is where are the good places, how do i get there and the most bugging question of all "how can i make money here?"

well now i want to help these ppl by making some sort of game for them. not just by saying go there do this do that and camp and dance for money or find a job. (wich they most likley never wil find cause the lack of experience in sl and just go bug other ppl for money and so on)

so this is what i try to achive.

make a search game. i create a hud. and all i need to do is explain them how to attach the hud.

then they will be able to use that hud to cruise sl to certain educationel places like ie. the ivory tower (where they learn about prims basic and so) wich each location i would make a serie of questions that they have to solve and so are forced to look around the area and learn about that specific subject on sl.

ie. in the ivory tower find and click on the red torus on level 3 of the build (dont know if there is one there :p: lol but its an example) now when they solve the question they would have to navigate through that area giving them the possibilty to look around. also would the hud give information bout the area.

the would be rewarded by me for every question the got right. that why i need to know when the click a specific item in a specifiv area that isnt mine. to know if they got the answer right.

i hope to achieve by doing this to help more new ppl a change to visit meaningfull area's rather then turning into camping zombies, or anoying ppl ppl begging for money or jobs when they have no idea what to do.

now as these mostly will be new ppl that are targeted i want to keep all of this a simple as possible. going into mouselook ok. but try to teach that to a newbie :( (no offense there but thats how its is)

in the end they would have gatherd (hoppefully enough information to choose a path in sl. they would have learned many things they can do in sl, found meaningfull area's, and learned how to use sl by doing it accros sl (not just orientation island) if they pass the game (meaning getting a score of lets say (80%) if would pay them an amount of money to get them started in sl with a backbone of knoledge they actully can use.

hope this make sense, so basics are, dealing with new ppl. keep it simple by just letting them click something that aint mine but detect if that was the right answer.

but as for as i got my research and the answers here. it would be a touch job to pull of cause it seems i have to teach them already more complicated thing (for a new person) in the beginning then expected :(

the avatar that inpsired me to create this project is now at the time being bout 1.5 months in sl. met her in a sandbox where she made this lovley build in less then an hour and a half what i consider a very nice build ( a litle dog peeing against a fire hydrant as a gift for somebody's x-mass, it was very nice detaild, ok overpirmd :p but thats not the point atm) we talked and she explained how hard it was to find all the information she gatherd cause actuly she didnt know where to go. but was willing to do.

so this kind off ppl are rare. they find there way eventuly. i want to help speed up that progress into second gear :p
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
12-24-2007 03:40
instead of detecting items they click on, perhaps you could detect the parcel they are on (like ivory tower), and maybe even some of the specific items on the plot.... that at least gets you to the right place, and you can start up a script that has specific info about that place... when they get through that the script can send a notice to a memory script that tracks what they've already completed....

including landmarks and using them in conjunction with llMapDestination might help them get around as well...

links to forums and wiki's would also probably be helpful

I like the overall idea, though it's a huge project... I can't do much more than offer hints in the direction to take (I'm a better tutor than teacher) specific problems of each component is more what I (and likely others here) can help with...
_____________________
|
| . "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...
| -
TheLoneWolf Arkin
Registered User
Join date: 26 Jan 2007
Posts: 29
12-24-2007 03:53
yeah i know its a huge project. but i draw it out out on my white board and most of the components are ready to be build and scripted.

but some issues remain open like this on. i know i can detect the parcel and items. but sadly this does not garentee that they actuly solved the question.

any ideas that could solve this issue to find a way that detect they solved the question are gladdly accepted :D

at the mean time i'm breaking my head over this one :(

but i wont give up this easely :p lol
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
12-27-2007 00:30
instead of triggering on something that is impossible go with coordinates.

If the player approaches a given coordinate, trigger whatever event you want triggered.

So if they get close enough to the red torus you just trigger your event.
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
12-27-2007 02:03
I think that your concept has sufficient merit that the owners of the destinations would be happy to help you if approached, They may be willing to allow you to place a scripted target prim, or at least place it for you, and possibly also contribute to the prize money or hand out a free item of stock as an intermediate reward.

You run the risk of commercialising it this way I guess, but as long as the partners are sold on the vision rather than the commercial potential I think you will have a winner and an excellent way of helping the newbie community.