stepping disks?
|
Simone Gateaux
Registered User
Join date: 21 Aug 2005
Posts: 23
|
01-06-2006 21:13
I am trying to make stepping disks as in Larry Niven's novels in which a person steps on a disk and is teleported to another spot. THe idea is that the person could step from disk to disk and cover lots of distance more or less automatically. Any ideas as to how I might proceed?
Thanks!
Simone
|
Zepp Zaftig
Unregistered Abuser
Join date: 20 Mar 2005
Posts: 470
|
01-06-2006 21:41
If you want a disk that can teleport someone just by stepping on it you'll have to wait for llTeleportAgent. Basic code for one stepping disk to step to another one within the same sim, could be something like this: default { collision_start(integer num_detected) { if(llDetectedType(0) & AGENT) { key agent = llDetectedKey(0); llSleep(2); // wait a few secs before teleporting, and maybe add particle effects etc. here to make it look cool llTeleportAgent(agent, llGetRegionName(), position of next disk, ZERO_VECTOR); } } }
|
Simone Gateaux
Registered User
Join date: 21 Aug 2005
Posts: 23
|
Thanks,
01-06-2006 21:59
I was afraid of that...right now I use Till Stirling's simple teleport script ( /15/d8/37156/1.html) modified for my situation and it works very well. I use it to get around in my castle and on my land but just love the idea of stepping disks. Simone... From: Zepp Zaftig If you want a disk that can teleport someone just by stepping on it you'll have to wait for llTeleportAgent. Basic code for one stepping disk to step to another one within the same sim, could be something like this: default { collision(integer num_detected) { if(llDetectedType(0) & AGENT) { key agent = llDetectedKey(0); llSleep(2); // wait a few secs before teleporting, and maybe add particle effects etc. here to make it look cool llTeleportAgent(agent, llGetRegionName(), position of next disk, ZERO_VECTOR); } } }
|
Zepp Zaftig
Unregistered Abuser
Join date: 20 Mar 2005
Posts: 470
|
01-06-2006 22:03
Well actually I guess you could make the stepping disk rez a physical invisible hollow cylinder around you that could move you to the next disk.
|
Zepp Zaftig
Unregistered Abuser
Join date: 20 Mar 2005
Posts: 470
|
01-06-2006 22:42
I think something like this might work. Make an object you can fit the avatar inside and call it diskmover, put the second script inside and put the diskmover inside the stepping disk. Code for stepping disk. integer rezzed = 0;
default { collision_start(integer num_detected) { if(llDetectedType(0) & AGENT) { if(rezzed == 0) { llRezObject("diskmover", llDetectedPos(0) + <0,0,0.5>, ZERO_VECTOR, ZERO_ROTATION, 0); rezzed = 1; llSetTimerEvent(5); //Make so it can only rez one every 5 seconds. } } } timer() { rezzed = 0; llSetTimerEvent(0); } }
Code for diskmover default { state_entry() { llSetStatus(STATUS_PHYSICS, TRUE); llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y | STATUS_ROTATE_Z, FALSE); }
on_rez(integer start_param) { vector nextdisk = position of next disk target = llTarget(nextdisk, 0.2); llMoveToTarget(nextdisk, 1.0); } at_target(integer number, vector targetpos, vector ourpos) { llDie(); } }
Well that's a start at least, I think it should be possible to use something like this as a basis for a stepping disk transporter.
|
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
|
01-07-2006 10:00
From: Zepp Zaftig If you want a disk that can teleport someone just by stepping on it you'll have to wait for llTeleportAgent. I thought I read that llTeleportAgent would only work in attachments and touch events...
|
Zepp Zaftig
Unregistered Abuser
Join date: 20 Mar 2005
Posts: 470
|
01-07-2006 10:26
From: Lex Neva I thought I read that llTeleportAgent would only work in attachments and touch events... Hmm.. Where have you seen that? The only information I can find is this: llTeleportAgent(key avatar, string simname, vector position, vector lookat) (?) * Teleport an avatar at a location (requires agent permission)
|
Simone Gateaux
Registered User
Join date: 21 Aug 2005
Posts: 23
|
Thanks again...
01-07-2006 11:37
Hmmmm clever idea. I'll give it a try. Thanks! Simone....so much to learn and so little time. From: Zepp Zaftig I think something like this might work. Make an object you can fit the avatar inside and call it diskmover, put the second script inside and put the diskmover inside the stepping disk. Code for stepping disk. integer rezzed = 0;
default { collision_start(integer num_detected) { if(llDetectedType(0) & AGENT) { if(rezzed == 0) { llRezObject("diskmover", llDetectedPos(0) + <0,0,0.5>, ZERO_VECTOR, ZERO_ROTATION, 0); rezzed = 1; llSetTimerEvent(5); //Make so it can only rez one every 5 seconds. } } } timer() { rezzed = 0; llSetTimerEvent(0); } }
Code for diskmover default { state_entry() { llSetStatus(STATUS_PHYSICS, TRUE); llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y | STATUS_ROTATE_Z, FALSE); }
on_rez(integer start_param) { vector nextdisk = position of next disk target = llTarget(nextdisk, 0.2); llMoveToTarget(nextdisk, 1.0); } at_target(integer number, vector targetpos, vector ourpos) { llDie(); } }
Well that's a start at least, I think it should be possible to use something like this as a basis for a stepping disk transporter.
|
Simone Gateaux
Registered User
Join date: 21 Aug 2005
Posts: 23
|
stepping disks again...
01-08-2006 14:05
Looks like I will simply have to wait for the teleportagent routines..moveto target moves physical objects apparently. I had some fun experimenting with this. Doesn't seem to work as a teleport. But I think your idea could form tthe basis of an interesting elevator script; certainly better than the one I had in my old place. Step on the disk and the car rezzes around you! Thanks! Simone...I did learn how to use my object inventory 
|