MagicMert Posted December 10, 2011 Share Posted December 10, 2011 Hey guy I am looking for some help with a few scripts.Firstly I need help with either getting a user inside an object and letting them control it or I have also seen people being able to control object when they have sat on them. I would like full movement but left to right is fine if that is all that's possible.Second I am after help on my resizing script this is my current:default{state_entry() {llRezObject(llGetInventoryName(INVENTORY_OBJECT,0), llGetPos()+<0,.5,0>,ZERO_VECTOR,ZERO_ROTATION,0);}}I have no idea how to get it to rez an object in this case it will be a ball and I also want the object to vanish after 1 second of being rezed so not to clatter up the server.Also a collision when the ball hits the wall opposite I want the wall to shout out either RED TEAM SCORES or BLUE TEAM SCORES this is the script I currently have.default{collision(integer num_detected){llSay(0, llDetectedName(0) + " BLUE TEAM SCORES!!!!");}}This does not seem to work now I should tell you that this is being built in a skybox and as a result none of the walls are physical.Any help anyone has would be very much appreciated Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted December 10, 2011 Share Posted December 10, 2011 As for the first script: If the script is in the inventory of object A and object B is in the inventory of object A as well, object B should be rezzed as soon as the script gets started. To de-rez the object, you could make a script with a rez event that waits a second and then lets the object die. This script would go into object B default { on_rez(integer param) { llSleep(1.0); llDie(); }} As for the collision, you should be a litle more specific as to what your problem is. But in general: If both objects are non-physical, no collision event will occur. You could make the ball physical. Link to comment Share on other sites More sharing options...
Mark Busch Posted December 11, 2011 Share Posted December 11, 2011 If people 'control' an object, then either -they are wearing it -they are sitting on it and it is an vehicle (it can look like they are inside the object because a script can define the sit position -they are sitting on it (or not) and movement is script based without using a vehicle (less smooth) for the rez script, llRezObject does rez an object, ofcourse you have to place something in the inventory of the object. In the rezzed object you can indeed place a script as MagicMert showed As for the collissions: try putting llVolumeDetect(TRUE); in the state_entry of an object. This will make it phantom but it will detect collisions. Use collision events to detect them. Link to comment Share on other sites More sharing options...
Recommended Posts
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