Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

projectile help

JJames Alter
Registered User
Join date: 18 Jul 2008
Posts: 10
09-19-2008 17:33
im working on a weapon of sort, and i need help with my script, it shoots a projectile and it turns physical off once it has impact on something, and my problem is that when it lands it tilts over and looks like it defys gravity or sometimes it just turns all crooked. i have seen some arrows being fired by people..and it is able to force it to stay straight when it lands without any tilting or any sort. perhaps someone can think of a way to lock the rotation so it wont be crooked when it lands, thanks :D
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
09-19-2008 21:06
Well, maybe after it fires (is rezzed) you could do:

llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y | STATUS_ROTATE_Z, FALSE);
JJames Alter
Registered User
Join date: 18 Jul 2008
Posts: 10
09-19-2008 22:54
From: Hewee Zetkin
Well, maybe after it fires (is rezzed) you could do:

llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y | STATUS_ROTATE_Z, FALSE);


i had tried that out, just before you posted it, i applied it to a single prim, a tube, hollowed out and then cut, it seemed to work well, but then i added a scuplty prim, setting the tube as root, once the projectile hits something it kinda does what i had described previously =\
JJames Alter
Registered User
Join date: 18 Jul 2008
Posts: 10
09-20-2008 14:40
ok i think i figured it out, i had put that line in state_entry.. and now it seemed to be taken effect after i moved it to on_rez.. is there a reason why it works in on_rez and not state_entry? so i wont have this problem again?
Jodie Suisei
Lost In LSL Code
Join date: 6 Oct 2006
Posts: 66
09-22-2008 09:51
From: JJames Alter
ok i think i figured it out, i had put that line in state_entry.. and now it seemed to be taken effect after i moved it to on_rez.. is there a reason why it works in on_rez and not state_entry? so i wont have this problem again?


Because the on_rez event will trigger before the state_entry will, since its rezzing and not being reset by for example resetting it manually ;).

Anything to do with projectile would all need to be handled when its rezzed no where else :)
_____________________
Inspired Style - Co-Owner

http://slurl.com/secondlife/Pintano/29/136/30

http://inspiredstyle.blogspot.com/ (Under Development)

Learner Scripter,
Fiddly Prim Builder,