Jump to content

push away object from agent


Rhemah
 Share

You are about to reply to a thread that has been inactive for 3258 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

// BallScript
integer pushme = 0; default { state_entry() { llListen(0,"",NULL_KEY, ""); } listen(integer chan, string num, key id,string msg) { if(msg == "pushball") { pushme = 1; llSensor("", NULL_KEY, AGENT, 2.5, PI); } } sensor(integer total_number) { if(pushme){ vector pos = llGetPos(); vector offset = <0,0,0>; pos+=offset; llMoveToTarget(pos,0.3); pushme = 0; llSleep(0.5); llStopMoveToTarget();} } }

Hello, im trying to make a ball that will be pushed away via command from an agent near it; however, i made it reversed and i can't figure out how to make the object be pushed away.

all i wanted to happen is it will be like a reverse magnet, instead of being attracted from the agent it will draw away itself from the agent on command.

i tried tweaking the vector offset  to <5,5,5> but the direction is always the same. I want to create something like the agent is kicking the ball forward. a little help pls :matte-motes-crying:

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3258 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...