Nightmare Balestra Posted February 15, 2016 Share Posted February 15, 2016 Hi Everyone, I have an animated spaceship that can go forward, back. left and right. It worked perfect when I got it, but I decided to add a prim to it and it has started going backwards when I should be going forwards. I can still go left and right fine, but the forwards and backwards are reversed since I added the prim. Anyone have any ideas? Do I need to change something in the script? Thanks so much. Link to comment Share on other sites More sharing options...
steph Arnott Posted February 15, 2016 Share Posted February 15, 2016 Adding the prim obviously has messed it up, assume you have a copy, else try removing the addition and hope. Link to comment Share on other sites More sharing options...
Nightmare Balestra Posted February 15, 2016 Author Share Posted February 15, 2016 Thanks for the reply. If I remove the prim it works fine again, but I want it to work properly with the addition of the prim. I'm trying to figure out why the prim is causing the problem. Or if there is any way to change the script to make backwards go forwards and forwards go backwards. LOL. Link to comment Share on other sites More sharing options...
steph Arnott Posted February 15, 2016 Share Posted February 15, 2016 I have no idea how the scripts are written, so can not give you a definate answer.Can only assume that prim numbers are used and not testing for prim name and prim change. ADDED And before any one says the prim is added the end, no it does not any more. Link to comment Share on other sites More sharing options...
Rolig Loon Posted February 15, 2016 Share Posted February 15, 2016 Steph is right. If you can't see into the script to modify it, then you are taking a chance when you do anything to change the linkset. If a scripter addresses links by number, you can't change the numbers and expect things to work properly. Adding or removing a prim will almost certainly mess up the script unless you can get in to modify it. Link to comment Share on other sites More sharing options...
Nightmare Balestra Posted February 15, 2016 Author Share Posted February 15, 2016 I can get into the script to modify it, but I'm not sure what I need to modify. I looked for the lines that mentioned forwards and backwards, but I am not sure what I would need to do. Link to comment Share on other sites More sharing options...
Innula Zenovka Posted February 15, 2016 Share Posted February 15, 2016 Before you do anything else, try adding the prim again, but this time make sure you link it as a child prim. That is, select the new prim first, and then select the spaceship, and then link them. Vehicle scripts (which I assume we're talking about here) by default move the vehicle on the assumption that Forwards means "on the root prim's positive x axis. I don't know if this is the problem but what you describe is exactly what I'd expect to happen if the orientation of the spaceship's root prim were to change and then change back when you unlink the prim and the root prim reverts to what it was when things were working OK. Link to comment Share on other sites More sharing options...
Rolig Loon Posted February 15, 2016 Share Posted February 15, 2016 You wouldn't need to modify any "forward" or "backward" lines. You'd need to rewrite all of the places where the script looks for specific link numbers, to be sure that they correspond to the proper ones in your altered model. The best way to do it is to change all such references to look for prims by name instead of by number. Depending on the script and on the complexity of your model, that could be a frustrating job, especially if you don't have much experience as a scripter. You'd need to give each link that you want to address a unique name and then write code to recognize those names as you need to move them. Link to comment Share on other sites More sharing options...
steph Arnott Posted February 15, 2016 Share Posted February 15, 2016 OK there must be a llMeassageLinked that states the link number. Be esayer if you just post the script, you can delete it after ADDED, Too late in the mourning for me to read scripts and get my brain to work, others are on USA time. Will see later what it looks like. Link to comment Share on other sites More sharing options...
Nova Convair Posted February 15, 2016 Share Posted February 15, 2016 Always add prims as childs, never as root. If you add as root you will break every spaceship. If you add as child there is still a small chance to break things if the creator has used hard wired link numbers for internal communication. In this case the spaceship should have been no mod by my opinion. 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