Advice on Script

Creating scripts
Post Reply
User avatar
Genavieve Page
Posts: 61
Joined: Thu Jun 02, 2016 2:54 pm
Has thanked: 116 times
Been thanked: 44 times

Advice on Script

Post by Genavieve Page »

Hello not sure where to ask this question but I have an issue with a few scripts doing some strange things. I am building a new house and using a sliding door script and lighting scripts. the house build works great where I made it. All scripts work perfectly. When I test the build down on my land, I reset the scripts first and then test. The lights work fine but when I touch the first light to turn it on it makes the build go phantom. I change it back to Physical then all other lights work fine and build stays physical. When I touch the window to open I fall through the floor lol but the build stays physical. so I am at a loss what in the scripts are causing these issues. As they worked fine before I linked everything I am wondering it there is a conflict somewhere. This is my first build using more scripts together in one linked building. I have checked every individual part and nothing is set to phantom so still at a loss what I might be doing wrong. any suggestions would be great. I am still very new to scripting and building. Thanks
Genavieve

looks like I have sorted out the phantom issue when touching the light so its just the sliding door script lol when I touch the door I still fall through the floor has any one had this issue before
User avatar
Ilan Tochner
Posts: 6504
Joined: Sun Dec 23, 2012 8:44 am
Has thanked: 4943 times
Been thanked: 4455 times
Contact:

Re: Advice on Script

Post by Ilan Tochner »

Hi Genavieve,

I hope you mean you're making items non-Phantom not that you're turning on the Physical flag. Making something Physical is one of the worst things you can do if you want to avoid overloading your world simulator. See: https://kitely.atlassian.net/wiki/displ ... erformance
User avatar
Genavieve Page
Posts: 61
Joined: Thu Jun 02, 2016 2:54 pm
Has thanked: 116 times
Been thanked: 44 times

Re: Advice on Script

Post by Genavieve Page »

Ilan Tochner wrote:Hi Genavieve,

I hope you mean you're making items non-Phantom not that you're turning on the Physical flag. Making something Physical is one of the worst things you can do if you want to avoid overloading your world simulator. See: https://kitely.atlassian.net/wiki/displ ... erformance
Hello Ilan yes sorry I just meant non phantom. So I can walk on the house floor. the light script was causing an issue that I was working with changing the house to phantom for some reason but I sorted that out. So no I am not changing to physical only non phantom for walking on floors.
These users thanked the author Genavieve Page for the post:
Ilan Tochner
User avatar
Ilan Tochner
Posts: 6504
Joined: Sun Dec 23, 2012 8:44 am
Has thanked: 4943 times
Been thanked: 4455 times
Contact:

Re: Advice on Script

Post by Ilan Tochner »

Okay, good to hear :-)

Do you still have a problem you need help resolving?
User avatar
Genavieve Page
Posts: 61
Joined: Thu Jun 02, 2016 2:54 pm
Has thanked: 116 times
Been thanked: 44 times

Re: Advice on Script

Post by Genavieve Page »

Ilan Tochner wrote:Okay, good to hear :-)

Do you still have a problem you need help resolving?
No not now I ended up changing the windows and using a different script I could not solve the issue of falling through the floor when I touched the window with a sliding script so opted to use a different one. Just not sure why it caused and issue. Hopefully one day I can learn more about scripting. but thank you for your help Ilan
Genavieve
User avatar
Ilan Tochner
Posts: 6504
Joined: Sun Dec 23, 2012 8:44 am
Has thanked: 4943 times
Been thanked: 4455 times
Contact:

Re: Advice on Script

Post by Ilan Tochner »

Were the window and the floor linked? If so then if the window was the root prim of the linkset and was made phantom by the script while it was moving (which is important for performance) then the floor would have been made phantom as well during the time the window was moved. If this was the case then unlinking the objects and linking them back in a different order so that the floor is the last object to be linked (which will make it the root prim of the linkset) would ensure that changing the window to phantom won't change the entire linkset to phantom.
These users thanked the author Ilan Tochner for the post (total 2):
Dot MatrixGenavieve Page
User avatar
Genavieve Page
Posts: 61
Joined: Thu Jun 02, 2016 2:54 pm
Has thanked: 116 times
Been thanked: 44 times

Re: Advice on Script

Post by Genavieve Page »

Ilan Tochner wrote:Were the window and the floor linked? If so then if the window was the root prim of the linkset and was made phantom by the script while it was moving (which is important for performance) then the floor would have been made phantom as well during the time the window was moved. If this was the case then unlinking the objects and linking them back in a different order so that the floor is the last object to be linked (which will make it the root prim of the linkset) would ensure that changing the window to phantom won't change the entire linkset to phantom.
Ahh thank you that makes perfect sense now. I didn't think I had made the window phantom but maybe I did, and that makes perfect sense about the root prim now. thank you I will keep this all in mind for my next build. as I ended up changing the windows it all works fine now. Will keep all this info in mind in future thank you again Ilan. You have helped greatly, and yes the windows and floor was linked
kind thanks Genavieve
User avatar
Ilan Tochner
Posts: 6504
Joined: Sun Dec 23, 2012 8:44 am
Has thanked: 4943 times
Been thanked: 4455 times
Contact:

Re: Advice on Script

Post by Ilan Tochner »

Great, please let me know if there is anything else you need.
User avatar
Genavieve Page
Posts: 61
Joined: Thu Jun 02, 2016 2:54 pm
Has thanked: 116 times
Been thanked: 44 times

Re: Advice on Script

Post by Genavieve Page »

Ilan Tochner wrote:Great, please let me know if there is anything else you need.
Thank you Ilan this issue is all resolved now thank you again
Post Reply