danikristine Posted October 2, 2013 Share Posted October 2, 2013 Hello,I want to make a script that listens to local chat and when one particular "keyword" is said, the avatar gets pushed a few meters up in the air. Its suppose to be a little fun script.Here is the bounce part of the script, which doesnt work though for some reason:float force_amount = 10.0; [...] { llPushObject(llKey2Name(id),<0,0,force_amount>, ZERO_VECTOR, FALSE); } it should push (bounce) the avatar of the ground, 10m straight up, but it doesn't work. Any ideas?The land is push enabled... Link to comment Share on other sites More sharing options...
Ela Talaj Posted October 2, 2013 Share Posted October 2, 2013 where does the key id come from for llKey2Name(id) ? Link to comment Share on other sites More sharing options...
danikristine Posted October 2, 2013 Author Share Posted October 2, 2013 Ela Talaj wrote: where does the key id come from for llKey2Name(id) ? that comes from a listen command, where id = the avatar's UUID edit: ok i made a little mistake in the script: llPushObject((id),<0,0,force_amount>, ZERO_VECTOR, FALSE); This would push the avatar, but only when they are standing on the object. Is it possible to make the avatar bounce when they are further away from the object? Link to comment Share on other sites More sharing options...
Rolig Loon Posted October 2, 2013 Share Posted October 2, 2013 And you passed it to that function as a global variable or a function parameter? Link to comment Share on other sites More sharing options...
danikristine Posted October 2, 2013 Author Share Posted October 2, 2013 as a function parameter. Link to comment Share on other sites More sharing options...
Nova Convair Posted October 3, 2013 Share Posted October 3, 2013 llPushObject expects the key and NOT the name. llPushObject(id,<0,0,force_amount>, ZERO_VECTOR, FALSE);--||- Link to comment Share on other sites More sharing options...
Qie Niangao Posted October 3, 2013 Share Posted October 3, 2013 danikristine wrote: only when they are standing on the object. The force applied by llPushObject() falls off as a function of the distance cubed; your force_amount parameter needs to correct for that. If it already does, then perhaps it's just running out of energy, which is a function of the mass of the object doing the pushing. Link to comment Share on other sites More sharing options...
danikristine Posted October 9, 2013 Author Share Posted October 9, 2013 ok thank you. Yeah i was experimenting with the "energy" and finally got it to work yay! \o/ so thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now