|
Candy Ferguson
Registered User
Join date: 22 Jun 2006
Posts: 20
|
01-19-2008 21:14
Hi I am trying to make a rocket that you can sit in and launches you into orbit like a real one, is there a way of making it start off slowly and then accelerate rather than go straight to top speed so that it is more realistic please?? This is what I have so far... // // Rocket // // Click to fire // float gTotalTime = 0.0; float gTimeStep = 0.1; key Owner; integer liste; default { state_entry() { liste = llListen(51515151,"","",""  ; state launch; } listen(integer chnl,string name, key id, string txt) { llSensorRepeat(txt,"",AGENT,96,PI*2,.1); llListenRemove(liste); } sensor(integer t) { llSetPos(llDetectedPos(0)); } } state launch { state_entry() { llSetStatus(STATUS_PHYSICS, TRUE); llSetText("", <1,1,1>, 1.0); llSetForce(<0,0,999999999>, TRUE); llSetTimerEvent(gTimeStep); //llTriggerSound("launch", 1.0); } timer() { } }
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
01-19-2008 21:48
Try using a smaller force, maybe? Possibly increase it over time if it doesn't get fast enough for you?
|
|
Candy Ferguson
Registered User
Join date: 22 Jun 2006
Posts: 20
|
Thankyou but how
01-19-2008 22:09
Thanks Hewee but I am a novice can you tell me how to increase over time please??
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
01-19-2008 23:11
Oh. Sure. You already had the timer in there, so I assumed you might already have an idea. The easiest way is probably to put a global variable at the top of your script, give it an initial value in the launch state's state_entry handler, and then bump it up and re-apply your force in the timer event. Something like this: // global variable float currentForce; ... // in launch/state_entry currentForce = 10.0; llSetForce(<0.0, 0.0, currentForce>, TRUE);
// In launch/timer currentForce *= 2.0; llSetForce(<0.0, 0.0, currentForce>, TRUE);
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
01-19-2008 23:11
call it again with an increasingly large force number, possibly in a timer loop (seeing as you have a timer you aren't using)
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Candy Ferguson
Registered User
Join date: 22 Jun 2006
Posts: 20
|
Thank you
01-19-2008 23:18
Thank you I will try this 
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
01-20-2008 06:59
When you said "orbit", this is what it looks like you are unsuccesfully trying to do instead of creating a rocket. Your default state doesn't do anything but switch over to the other state immediately. But if it was working, you had a sensor event that wants to move the so called rocket to the position of any detected agents. You don't have a maximum ceiling or anyway to stop the rocket. In the case of an object you are sitting in or on then it is going to go up to 4096 meters and then be returned to your inventory and all seated will fall back to earth. In the case of an object that is attached, the person will keep going up until they are disconnected from the simulator and in the process they may end up with some attachments being permanently damaged.
Tell us what you are trying to accomplish and we can help point you in the right direction. Unless of course you are trying to create a griefing device...........
_____________________
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
|