|
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
|
10-13-2006 01:59
I've been trying to create a multi-prim object that explodes on command, but for the life of me the only thing that "explodes" is the root prim. the actual explosion script goes in every prim of the physical link set, and the controller goes in the root prim. Explosion Controller default { on_rez(integer num) { llResetScript(); } state_entry() { llRequestPermissions(llGetOwner(),PERMISSION_CHANGE_LINKS); llListen(86,"",llGetOwner(),""); } listen( integer channel, string name, key id, string message ) { if(llToLower(message)=="die") { llSetPrimitiveParams([PRIM_TEMP_ON_REZ,TRUE, PRIM_PHANTOM, TRUE]); llMessageLinked(LINK_SET,1,"",NULL_KEY); llBreakAllLinks(); } } }
Explosion script (this goes in every prim of the physical link set) default { link_message(integer sender_num, integer num, string str, key id) { llSleep(llFrand(2));//This is to ensure that the pieces don't fly off before the de-linking, and that they don't all fly off at exactly the same time llPushObject(llGetKey(),<llFrand(2),llFrand(2),llFrand(2)>,<llFrand(2),llFrand(2),llFrand(2)>,FALSE); } }
What's happening is only the root prim appears to be exploding, the rest just sit there after de-linking until they die from the temp_on_rez.
_____________________
My SLExchange shopTypos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not. The function is working perfectly fine. It's just not working the way you wanted it to work.
|
|
Smerk Gorilla
Los Altos King
Join date: 8 Apr 2005
Posts: 20
|
Check this Out
10-13-2006 02:17
Contact me: smerk Gorrila if you got probs sending you something in game
|
|
Tiger Crossing
The Prim Maker
Join date: 18 Aug 2003
Posts: 1,560
|
10-13-2006 10:16
Are the de-linked prims still physical? If not, their scripts can set them so.
_____________________
~ Tiger Crossing ~ (Nonsanity)
|
|
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
|
10-13-2006 10:59
From: Tiger Crossing Are the de-linked prims still physical? If not, their scripts can set them so. The De-linked prims are indeed physical. I tried doing a quick toggle off/on physical to see if that had any effect, but it doesn't appear to make any difference.
_____________________
My SLExchange shopTypos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not. The function is working perfectly fine. It's just not working the way you wanted it to work.
|
|
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
|
10-13-2006 11:04
instead of llPushObject() (which I fund ureliable for pushing the object the scipt is in) how about llApplyImpulse()?
|
|
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
|
10-13-2006 12:12
From: Jillian Callahan instead of llPushObject() (which I fund ureliable for pushing the object the scipt is in) how about llApplyImpulse()? I had not thought of using impulse. I'll have to play around with that when I get back from work  \ [edit] after playing around with llApplyImpulse, the same behaviour is occuring as before; only the root prim is moving from the "explosion"
_____________________
My SLExchange shopTypos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not. The function is working perfectly fine. It's just not working the way you wanted it to work.
|