These forums are CLOSED. Please visit the new forums HERE
Grappling Device |
|
|
Gebera Zenovka
Registered User
Join date: 27 Jul 2007
Posts: 7
|
05-11-2008 11:17
I tried looking everywhere on the net, the lsl wiki and even the forums but Im still oblivious as to how to create a grappling hook. I know it has to deal with the llMove_to_target bit and the anchor itself announcing its position so it can happen, but I dont know how to get an object to announce its position or none of that. Can somebody please help me out? I would greatly appreciate it.
|
|
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
|
05-11-2008 11:56
An object can't announce it's position but you can ask for it with function: llGetObjectDetails(key id, list params)
See: http://www.lslwiki.net/lslwiki/wakka.php?wakka=llGetObjectDetails _____________________
From Studio Dora
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
05-11-2008 12:02
Certainly an object can announce it's position. Use chat and a listen. llGetObjectDetails() can be a good compliment so that you don't have to include the actual position vector in the chat message if you want, or you can possibly even do without chat, but any of those approaches can work.
|
|
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
|
05-11-2008 13:12
Certainly an object can announce it's position. Use chat and a listen. The object requires a script to do that... _____________________
From Studio Dora
|
|
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
|
05-11-2008 14:29
I grappled (sorry) with this kind of script before to create batman's grappling gun.
the gun is pretty much your standard gun except it has a llMoveToTarget() type of function that causes the avatar attached to (holding) the gun to move towards the coordinates that are broadcast by the projectile fired, as well as having a particle effect to simulate a rope between the projectile and the gun. once the gun stops moving it broadcasts a message for the projectile to delete itself. the projectile itself is pretty standard too, except when it hits an object it becomes non-physical, phantom, and broadcasts its location, llGetPos(), through llRegionSay() which then starts the gun's movement script Some tweakings I did for more realistic/fun performance: *grappling gun broadcasts the kill command when a second shot is fired, this allows for some fun spiderman type movement * Grappling hook only broadcasts it's "come here" info when it hits a non-physical object. if it hits a physical object it just deletes itself * If you run into an object while being pulled along, the grappling hook breaks off; this stops some issues with rare mid-air collisions and trying to push through walls if the hook arc'd over something * In push allowable sims, if the grappling hook hits an avatar, it uses llPushObject() to bring that avatar towards you. _____________________
My SLExchange shop
Typos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not. The function is working perfectly fine. It's just not working the way you wanted it to work. |
|
Gebera Zenovka
Registered User
Join date: 27 Jul 2007
Posts: 7
|
05-11-2008 18:43
ALright, so I use llGetObjectDetails and such, but how do I transmit that data and how do I set up something to listen for it?
|
|
Django Yifu
Beat Island Gaffer
Join date: 7 May 2007
Posts: 189
|
05-12-2008 02:50
http://lslwiki.net/lslwiki/wakka.php?wakka=llListen
http://lslwiki.net/lslwiki/wakka.php?wakka=llRegionSay Might be a good place to start ![]() _____________________
Tread softly upon the Earth for you walk on my face.
|
|
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
|
05-12-2008 03:23
you can have a bullet that announces it's position (using llRegionSay) on collission.
_____________________
![]() ● Inworld Store: http://slurl.eclectic-randomness.com ● Website: http://www.eclectic-randomness.com ● Twitter: @WinterVentura |
|
Gebera Zenovka
Registered User
Join date: 27 Jul 2007
Posts: 7
|
05-12-2008 13:20
Now Im gettting somewhere! I at least got the object that will eventually become the bullet figure out where its at and say it over llRegionSay. And now I know I gotta set up a listen in the launcher itself, but how do I make it listen for a vector and then have it move the owning agent too it?
|
|
Cypher Ragu
[Mad Scientist]
Join date: 6 Jul 2008
Posts: 174
|
09-08-2008 16:46
It will involve some vectors/integers...
I'm a bit busy so I can't compile a whole script now, but the basic idea would be this: -- Gun sets up a listen when it fires the projectile (llListen) -- Gun takes the listen function, turns the message into a vector -- Gun uses the previous vector in moving to the target (llTarget, llMoveToTarget) -- Gun tells the projectile to auto-delete when it reaches the specified target. Hope this helps, feel free to IM me inworld. _____________________
Life is a highway... And I just missed my exit.
|