Jump to content

trying to write a script to work a script i bought


MishkaKatyusha
 Share

You are about to reply to a thread that has been inactive for 3014 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

:S not quite,i couldnt figure out how to add your fancy rotation axis line,nor where to put it,so i stitched together some bits,then wrote my own where needed

my only remaining two problems are that the missile keeps launching out the side of the object,and if i have the missile set to physical,it drops like a cannonball,if i have it set to non physical,it doesnt move upon rezzing

i tryed to remedy the problem by setting llsetbuoyancy to 1.0,but it doesnt seem to effect it that much if its set to physical

Link to comment
Share on other sites

Compare your script with what Rolig suggested you do.   

In particular, re-read this 

If you always want the rezzed object to move in the direction that the object is facing (it's own +X direction), then your velocity vector is <X, 0.0,0.0>*llGetRot(), where X is as big as you need it to be to get the object moving at the speed you want. The object's initial rotation parameter can be ZERO_ROTATION. 

and compare it with what you set in the listen event.   

Your placement problem is related.   Take a look at the wiki article on http://wiki.secondlife.com/wiki/LlRezAtRoot

 

Link to comment
Share on other sites

Nope. It has to be physical.  You can't make a non-physical object move that way.

And the "fancy rotation axis line" is exactly what you need to make sure that the projectile comes out the front of the rezzer.  It's really not much of a line.  Just copy it directly as I wrote it.  The velocty in the llRezAtRoot function is <X,0.0,0.0>*llGetRot(), where you decide how big X needs to be -- the bigger it is, the faster your projectile goes.  llGetRot() is not very fancy at all.  It's just saying,"Correct the vector <X,0.0,0.0> by turning it to face the same way that the rezzer is facing."

Link to comment
Share on other sites

well,i tried it and got "name not defined within scope" right after the comma following the x

 listen( integer channel, string name, key id, string message )    {        llOwnerSay("Firing");        vector velocity = <X, 0.0,0.0>*llGetRot();        vector placement = llGetPos();        rotation spin = llEuler2Rot(<0,0.90,TWO_PI>);        integer startParam = llGetStartParameter();            llRezAtRoot("Missile", placement, velocity, spin, startParam);                       }
Link to comment
Share on other sites

working on it now.

 

told you im terrible with english

 

when you said "put that in exactly as i wrote it" i took that very literally,and thought that by you saying "where x is the (etc)" that given you said "Exactly as i wrote it" meant that just copy pasting it would do what you said

>.>

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3014 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...