Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

stop script...

Aniam Ingmann
llOwnage(float pwnage);
Join date: 22 Oct 2005
Posts: 206
10-07-2007 00:38
I'm confused what's wrong. I have a hud interface which incorporates arrows that move you in directions they point at. Sometimes they get stuck when trying to phase through walls using this feature; so i made a stop button which says "stop" in a link message when you touch it, and links to the root prim which has this script in it. for some reason, this doesn't work to stop when i'm stuck on a prim, trying to go through it but can't go through it. Is there something wrong with this script, or is there any way to force stop that problem?
CODE

default
{
link_message(integer sender_num,integer num, string str, key id)
{
if (str=="stop")
{
llMoveToTarget(llGetPos(),.05);
llTarget(llGetPos(),.01);
}
at_target(integer tnum, vector targetpos, vector ourpos)
{
llStopMoveToTarget();
llTargetRemove(tnum);
}
}

_____________________
From: someone

Don't worry, Aniam is here!
- Noob
Monica Balut
Beam-Me
Join date: 18 Feb 2007
Posts: 311
10-07-2007 05:43
Are you sure it's being received? Throw a couple of llOwnerSay's in there to debug.
Aniam Ingmann
llOwnage(float pwnage);
Join date: 22 Oct 2005
Posts: 206
10-07-2007 06:42
I tried the Ownersay, and it goes through the correct states when it's pressed. When i press the button and i'm colliding with a wall it says "stopped", and immediately says "stopped moving.", but doesn't end the movement.
CODE

default
{
link_message(integer sender_num,integer num, string str, key id)
{
if (str=="stop")
{
llOwnerSay("Stopping.");
llMoveToTarget(llGetPos(),.05);
llTarget(llGetPos(),.01);
}
}
at_target(integer tnum, vector targetpos, vector ourpos)
{
llOwnerSay("Stopped all movement.");
llStopMoveToTarget();
llTargetRemove(tnum);
}
}

Still doesn't work.
_____________________
From: someone

Don't worry, Aniam is here!
- Noob
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
10-07-2007 08:12
This stop script in the root prim is only stopping THIS llMoveToTarget. What are you doing to stop the llMoveToTarget in the HUD interface? Even then still not sure this would stop the main llMoveToTarget because while it is trying to move to target then it would not be listening to a link message?
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Aniam Ingmann
llOwnage(float pwnage);
Join date: 22 Oct 2005
Posts: 206
10-07-2007 08:13
It's okay, i figured it out.. thanks though :)

I set it to llResetOtherScript([myothermovementscriptname]); when i press it so it works now :)
_____________________
From: someone

Don't worry, Aniam is here!
- Noob
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
10-07-2007 08:15
Cool, Yep that would work.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum