|
Nerolus Mosienko
Registered User
Join date: 3 Aug 2006
Posts: 145
|
01-19-2008 19:30
So I've got alot of windows in an abandoned warehouse. I want to script the window prims (they are one prim each) so when an avatar (or possibly, even an object), collides with it, it breaks. I was thinking the following: I could make the texture of the one prim window change to a broken looking texture. The object would make a glass breaking sound, and "spawn" a certain number of physical objects to pose a glass shards (set on temporary). I would like the texture to automatically (or on click) to change back to its original window texture, after it had been "broken". Alternatively, I could make the windows texture contain both the Normal and Broken versions, so the objects texture alignment would just have to change, instead of actually changing the texture itself. That is, if this option would be easier. If anyone can help me out, point me to some kind of texture source that I could mod, I would be greatly appreciated. If anyone could take the time to help me out, or even make it for me, I would even be willing to pay. But normally, I like to learn something in the process. I'll also post this in Products Wanted. Thanks for any future help! I'll be checking back  Nerolus Mosienko [email]nerolus@gmail.com[/email]
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
01-19-2008 22:59
llSetTexture to sawp your texture, or llSetPrimitiveParams (better, you can set a hole size too)
collision_start to get when something hits it (perhaps with llVolumeDetect)
llRezObject to rez the glass pieces (recommend setting them phisical and temporary, as a link set), alternately you might try llCollisionSprite
llSetTimerEvent triggered after the collision event to reset the window, then agin in the timer event to stop the timer.
llCollisionSound for you glass breaking sound in the state entry
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|