amarock Amat Posted December 21, 2011 Share Posted December 21, 2011 default { state_entry() { } collision_start(integer total_number) { llSetStatus (STATUS_PHANTOM, TRUE); llSleep (5); llSetStatus (STATUS_PHANTOM, FALSE); } } I would have thought this would make a prim go phantom, then turn solid, am I missing something? Link to comment Share on other sites More sharing options...
MadamG Zagato Posted December 21, 2011 Share Posted December 21, 2011 The problem is that afetr you collide with the object, you collide with it again to test it and it goes phantom again. That's what you wrote the script to do. Try this: default { state_entry() { llSetStatus (STATUS_PHANTOM, FALSE); llWhisper(0,"default..."); } collision_start(integer total_number) { llWhisper(0,"collision..."); state trap; } } state trap { state_entry() { llSetStatus (STATUS_PHANTOM, TRUE); llWhisper(0,"sleeping..."); llSleep (5); llWhisper(0,"awake...try to collide with me now."); llSetStatus (STATUS_PHANTOM, FALSE); llSleep(10); //In 10 seconds it will go phantom if you try again state default; } } Link to comment Share on other sites More sharing options...
MadamG Zagato Posted December 21, 2011 Share Posted December 21, 2011 Also if you have other things going on in your script it would be better to use a timer instead of llSleep since nothing gets done while it's sleeping. I hope this helps! 1 Link to comment Share on other sites More sharing options...
amarock Amat Posted December 21, 2011 Author Share Posted December 21, 2011 aboustly, and by making it chatty, you helped me think of a few ideas to do wiht it, contact me in world, and we can think of some sort of profit split, as a ty for your help Link to comment Share on other sites More sharing options...
Ceera Murakami Posted December 21, 2011 Share Posted December 21, 2011 You may run into another issue with making this work well as a trap door. Until they move again, their avatar is going to ignore the fact that the floor just went phantom under them. I tried once to make a moving trap door. I scripted a door in the floor, set to listen for a chat command so I could 'spring the trap' when someone was standing on it. The trap door opened right on cue, the door swung down into the pit to lie along one wall of the hole, and the avatar was centered right over the hole. And the avatar stood there in mid air, like a character in a Road Runner cartoon, oblivious to the fact that there was no floor beneath them. If they did move, there was a good chance that they could go far enough forward to end up on the floor at the rim of the pit, instead of falling into it. If you stand on a prim in mid air, and then delete the prim, you get the same effect. Until you try to move, you remain standing there in mid air. In my case, I 'solved' it by placing seat cushions on the trap door, and inviting the potential victims to kneel on them, in front of the throne. With them seated on a prim that was attached to the trap door, they moved with it, into the pit. The trap door unsat them as soon as it opened, and then it closed again, leaving them falling, since the unsit requires checking for a surface to stand on. If you do run into that problem with the phantom trap door, you might want to consider raising a 100% alpha, non-phantom barrier around the pit opening when the floor prim goes phantom. Then, if they try to move forward, their movement will be blocked long enough to ensure that they do fall into the pit. You could also get fancy and use a second collision detect prim inside the pit, to reset the trap only after something has fallen into the pit. 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