Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

run particle on move - avatar attachment

Robinho Aarde
Registered User
Join date: 9 Dec 2006
Posts: 14
05-12-2007 08:26
hey,

do any of you know the best way to allow a particle, or texture animation script within an attachment to run when the avatar moves forwards and backwards...i've been thinking maybe through listen(to the key being pressed) on a certain channel but this way seems sluggish structure wise... or perhaps i could use "takecontrols"?

I'm just starting trying to get my head round this so any pointers would be really welcome.

R.
RJ Source
Green Sky Labs
Join date: 10 Jan 2007
Posts: 272
05-12-2007 08:41
Your attachment can having a moving_start and moving_end event handler in it.
When the avatar moves, these will be triggured.
They could have your particle calls in them.

I.e.

CODE

moving_start()
{
llOwnerSay("Moving...");
}


In an attachment, this would print "Moving" when the avatar starts to move.
Robinho Aarde
Registered User
Join date: 9 Dec 2006
Posts: 14
ah
05-12-2007 08:52
ok that looks simple i'll lok into it, cheers :)
Robinho Aarde
Registered User
Join date: 9 Dec 2006
Posts: 14
didnt work :(
05-12-2007 09:16
i tired it it didnt seem to respond very well.....basically i'm trying to get it so that the texture on a wheel which is attached to the avatar rotates when i go forwards or backwards.....
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
05-12-2007 11:14
try using integer llGetAgentInfo(key id)
_____________________
I'm back......
Robinho Aarde
Registered User
Join date: 9 Dec 2006
Posts: 14
hmmm
05-12-2007 11:23
but using GetAgentInfo means that you could detect the avatar is sitting, but not the velocity of the avatars movement....

What about a combination of GetAgentinfo - sitting and the getvel i think i tried something like this before and it didnt seem to work....
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
05-12-2007 13:27
From: Robinho Aarde
but using GetAgentInfo means that you could detect the avatar is sitting, but not the velocity of the avatars movement....

What about a combination of GetAgentinfo - sitting and the getvel i think i tried something like this before and it didnt seem to work....



My apologies, from you posted I assumed that the avatar would be walking or flying etc not seated in a vehicle.
_____________________
I'm back......
Robinho Aarde
Registered User
Join date: 9 Dec 2006
Posts: 14
sorted
05-15-2007 04:48
just used get velocity....simple really. I'd tried it before but forgot to add a couple of lines.