Jump to content

Help With Door Scripts -> Swinging Doors


Jonathon Carbenell
 Share

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

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

Recommended Posts

Greetings,

 

This one has certainly stuimped me. I know the usual way to make doors is to cut the prim in half, using Cut Path. This allows for the door to swing, as if it was on a hinge. It is usually cut to something like 0.125 to 0.325 ect ect.. or something round there. I do not know it off the top of my head.

I was wondering if there is ANY way with lsl to get the doors to rotate without actually cutting the prim in half? I have seen some scripts which allow for the prim to be untouched and simply textured, and still seem to swing as if they were a hinged doors. Mostly I've only been able to get the prims to swing at the center, swinging the entire prim.

Does anyone have any scripts available which allows for the prim to swing, as if a hinged swinging door, without actually modifying the prim sides texturing it?

Thank you in advance...

 

Link to comment
Share on other sites

The essence of what you need to do to get a child prim rotating correctly about its root without having to path-cut it are described in this example script:

You can also find the details in many of the tutorials on rotations, for example:

Kimm.

 

Link to comment
Share on other sites

HI, did you test the llSetMemoryLimit(0x1000); that is only 4k and I have found that much code wont fit, what I do is always get the free memory before is set the number, what the code does is ignore it if it is  to small when defined.

So I would put.

state_entry()

{

llSetMemoryLimit(0x1000);

llSay(0,(string)llGetFreememory());

}

if the limit is to small then all 64k is allocated and the free memory reports a number far higher than 0x1000

that case looks as if it could be below 0x4000 but above 0x1000;

I could be wrong I always use the linked messages and try to keep them under 2k, but allow 4k to 8k for things like the message queue and the http instructions I use a lot.

Link to comment
Share on other sites


Lucinda Bulloch wrote:

HI, did you test the llSetMemoryLimit(0x1000); that is only 4k and I have found that much code wont fit, what I do is always get the free memory before is set the number, what the code does is ignore it if it is  to small when defined.


Hi, are you sure about that? That the memory limit will be ignored if to low?

A runtime error would be expected.

I only tested that the script is running OK.

Maybe it is worth testing if I can't have it verified from more independent scripters:smileyvery-happy:

I learn every day...

Link to comment
Share on other sites

Yes, I have whole systems using it now, add the free memory line and you will see that if to low it allocates a full 64k, only when defined, you don't get runtime errors till its running, like I said if the free memory reports 2k free then you get a runtime error if 2 1.5k or more messages get stacked up, it is becoming an art, like with lots of emailers, you can find the first few in the chain will create run time errors and extra memory has to be allocated to them, I had to do that to my game servers, the first 5 emailers have 4k more memory than the rest

.

 

Link to comment
Share on other sites


Lucinda Bulloch wrote:

Yes, I have whole systems using it now, add the free memory line and you will see that if to low it allocates a full 64k, only when defined, you don't get runtime errors till its running, like I said if the free memory reports 2k free then you get a runtime error if 2 1.5k or more messages get stacked up, it is becoming an art, like with lots of emailers, you can find the first few in the chain will create run time errors and extra memory has to be allocated to them, I had to do that to my game servers, the first 5 emailers have 4k more memory than the rest

This caveat should certainly be described in details in the wiki,

Are you the one to do that?

You seem to know a great deal about it.

llSetMemoryLimit() would be a good place to write it

Link to comment
Share on other sites

Hi, yes, when I first did it I thought I could get away with tiny scripts, then when I looked on the parcel memory use I found nothing had changed, so I now put the get free memory line after, that takes bout 500 bytes, so when you comment it out after you can add 500 to your free memory, but you do have to be careful about using linked messages, when I did the first server,  I thought job well done, took ages, then a big message came in and just about every script crashed.

Link to comment
Share on other sites


Dora Gustafson wrote:


Lucinda Bulloch wrote:

Yes, I have whole systems using it now, add the free memory line and you will see that if to low it allocates a full 64k, only when defined, you don't get runtime errors till its running, like I said if the free memory reports 2k free then you get a runtime error if 2 1.5k or more messages get stacked up, it is becoming an art, like with lots of emailers, you can find the first few in the chain will create run time errors and extra memory has to be allocated to them, I had to do that to my game servers, the first 5 emailers have 4k more memory than the rest

This caveat should certainly be described in details in the wiki,

Are you the one to do that?

You seem to know a great deal about it.

would be a good place to write it

i have a real thing about forms, wiki looks as if it is a mission, and I don't have the time, I am working 12 hours a day converting all my stuff to the new instructions, I have one game that has over a 100 objects, changing it all to castray, regionsayto and memory limit is driving me to the grave, but you look well versed on it, so maybe you should.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4491 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...