|
Mr Bellingshausen
Registered User
Join date: 25 Mar 2009
Posts: 14
|
06-14-2009 16:26
Any suggestions on how to combine a working llWater script with a working llMoveToTarget script? Alone they work fine making them play nice with each other not is another example of my lack of scripting skills. I can't even find an example to work with.
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
06-14-2009 16:34
From: Mr Bellingshausen Any suggestions on how to combine a working llWater script with a working llMoveToTarget script? Alone they work fine making them play nice with each other not is another example of my lack of scripting skills. I can't even find an example to work with. Post what you have so far, even if it does not 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
|
|
Mr Bellingshausen
Registered User
Join date: 25 Mar 2009
Posts: 14
|
06-14-2009 16:50
Having problems uploading the *.txt file. Will post it as soon as I can get it through
|
|
Mr Bellingshausen
Registered User
Join date: 25 Mar 2009
Posts: 14
|
06-14-2009 17:03
Is there something special I need to do with a text document that has a script copied into it so I can upload it. Copy Paste works in here but it still won't post the reply.
|
|
Mr Bellingshausen
Registered User
Join date: 25 Mar 2009
Posts: 14
|
06-14-2009 17:11
This is what I have at the moment and I can't tell you how many times I have switched things around trying to get it to work.
default { state_entry() { vector pos = llGetPos(); llSetStatus(STATUS_PHYSICS, TRUE); llSleep(0.1); // Little pause to allow server to make potentially large linked object physical. llMoveToTarget(pos,0.1); // Look for target within 96 meters in 360 degree arc every 1 seconds. llSensorRepeat("Anchor", "", PASSIVE, 96.0, TWO_PI,1.0); }
sensor(integer total_number) { float fHeight = llGround( ZERO_VECTOR ); float fWaterLevel = llWater( ZERO_VECTOR ); if ( fHeight < fWaterLevel ) fHeight = fWaterLevel; vector pos = llDetectedPos(0); //llSetPos can only move 10m at a time. integer iCounter = 1 + llAbs((integer)(fWaterLevel - fHeight) / 10); fWaterLevel = fHeight; do vector offset =<0.0,0.0,fWaterLevel>; pos += offset; llMoveToTarget(pos,4.0); // llMoveToTarget(vTarget,4.0); //llSetPos( vTarget ); while( --iCounter );
}
}
|