|
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
|
01-11-2008 19:22
i made a warp pos hud a long time ago and im trying ot recreate it and i have no idea how i did it anymore, i started tinkering with the warppos() about 2 hours ago and i cant seam to make the dumb thing work any ideas on how to acculy get it working.  vector targetVector; warpPos( vector d ) //R&D by Keknehv Psaltery, ~05/25/2006 { integer iterations; vector curpos; if ( d.z < (llGround(d-llGetPos())+0.01)) d.z = llGround(d-llGetPos())+0.01; if ( d.z > 1024 ) d.z = 1024; do { iterations++; integer s = (integer)(llVecMag(d-llGetPos())/10)+1; if ( s > 100 ) s = 100; integer e = (integer)( llLog( s ) / llLog( 2 ) ); list rules = [ PRIM_POSITION, d ]; integer i; for ( i = 0 ; i < e ; ++i ) rules += rules; integer r = s - (integer)llPow( 2, e ); if ( r > 0 ) rules += llList2List( rules, 0, r * 2 + 1 ); llSetPrimitiveParams( rules ); curpos=llGetPos(); if (iterations>100) { d=curpos; } } while ((llRound(curpos.x)!=llRound(d.x)) || (llRound(curpos.y)!=llRound(d.y)) || (llRound(curpos.z)!=llRound(d.z))); } default { state_entry() { llResetScript(); }
touch_start(integer num) { targetVector = (vector)llGetPos()+(<0,0,5>); warpPos(targetVector); } }
|
|
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
|
01-11-2008 22:14
This 'WarpPos HUD' prospect is puzzling indeed. WarpPos and llSetPos can't actually move your avatar in an attachment.
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
01-11-2008 22:37
Right. All it could do is move the HUD object around your screen. Attachments can only move your avatar using physical movement (though you can use some pretty big impulses and such to shoot yourself straight through many solid objects). Only objects you sit on can use actual non-physical movement to warp you right to where you want to go and completely ignore obstacles.
|
|
Okiphia Anatine
Okiphia Rayna
Join date: 22 Nov 2007
Posts: 454
|
01-11-2008 22:49
Could it have possibly rezzed an object to be sat upon, that has the warppos script in it?
The hud attachment would say the vector location or w/e for it, and it would then store that in the script of the teleporter object. Then tada - you've ggot warppos!
The HUD could take the location from the av chat in a seperate channel from what it says to the object. Maybe just have the av say
/55 warp <10,50,23> to move +10 on X, +50 on Y, and +23 on Z?
Could also have an absolute variant such as using the above command, 'warp' would move you based on where you are. But this other moves you to a specific location such as
/55 warpto <23,145, 45> to move directly to the location <23,145,45> in the sim.
Hope this made sense!
_____________________
In-world, I am Okiphia Rayna. This account is an alt, and is the only account I currently have with payment info on-file due to some account cracking that took place. This is a security measure at present, and I may return to the forums as Okiphia Rayna at a later date.
If you need to reach me, IM Okiphia Rayna, not Okiphia Anatine
|
|
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
|
01-11-2008 22:55
Yep. You can even tell the warp prim where to go without using chat.
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
01-12-2008 00:02
True. And if you made it a spherical (phantom?) shell that rezzes around you and has a default sit left-click action, it could make it a simple single-click after the HUD interaction to get where you're going.
|
|
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
|
01-12-2008 07:07
i cant rember how i made it anymore, im nt even sure i used warppos. way it was set up is you do a command in chat and you would move forword 5m from your currect location almost instantly you could go threw walls and everything
|
|
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
|
01-12-2008 07:37
You can use llMoveToTarget, preferably with a tau of 0.1, but it's not guaranteed to jet you through a wall at such a close distance.
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
01-12-2008 11:39
You can try carefully timed calls to llApplyImpulse(), to throw yourself in a driection and then halt all movement. It can be a little inconsistent, but generally works. Oh, and its behavior will be different when you are on the ground and when you are flying, because of "friction."
|