Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Particles in push script

Perwin Rambler
Registered User
Join date: 24 Mar 2005
Posts: 152
04-21-2005 16:29
howdy,

My mind is a bit muddled about the push scripts so I figured I would ask for help

I have a script that shoots out a cone of particles.. (no problem).

I would like it if then when the particles reach a Avitar or object, that the avitar would be pushed back a couple of meters.

I know most hate these types of items but I am curious as to how it is done.
I added in the script the llpushobject code and even the code for finding a target ( I think) but my test Avitar didn't move.

Any help??



Thanks in advance.
Frans Charming
You only need one Frans
Join date: 28 Jan 2005
Posts: 1,847
04-21-2005 16:37
I don't think that can work.
But you could instead shoot a tiny invisible object wich has a particle on it.
The push script would have to be in that object.
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
04-21-2005 17:56
Use llPushObject in the object or anything fired from it. You cannot put scripts "in particles," but you can simulate a push from them with the object itself.
_____________________
---
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
04-21-2005 22:40
Maybe you're not pushing enough?
llPushObject is weaker at distances, it has a 1 / r^3 falloff.
You also need to factor in the mass.
Nashville Rambler
Pilgrim
Join date: 20 Mar 2005
Posts: 51
04-22-2005 06:34
From: Eggy Lippmann
Maybe you're not pushing enough?
llPushObject is weaker at distances, it has a 1 / r^3 falloff.
You also need to factor in the mass.


That's interesting Eggy (but then just about everything that you have to say is interesting, hehe!). I'm familiar with the Inverse Square law, but hadn't heard of an Inverse Cube law. I wonder why the engine does it that way?
Perwin Rambler
Registered User
Join date: 24 Mar 2005
Posts: 152
ok, still trying to push
04-22-2005 09:13
ok I do not shoot an object and I understand the drop off concept with distance
but I am standing about 5 feet from a test person (avitar of a friend)
still nothing.. this is the code from the script.. I admit I don't fully understand it yet.

//llSensor("", "", ACTIVE | AGENT, 4.0, PI_BY_TWO*0.5);
llSensor("", "", ACTIVE | AGENT | PASSIVE | SCRIPTED, 4.0, 30);
vector dir = llDetectedPos(0) - llGetPos();
dir = llVecNorm(dir);
rotation rot = llGetRot();
//dir += llRot2Up(rot);
dir += dir;
dir *= 100000.0;
//llWhisper(0, $dir);
//llWhisper(0, llDetectedKey(0));
llPushObject(llDetectedKey(0), dir, ZERO_VECTOR, FALSE);

As you can see I try to alter things around to get it to work, all I want is for an avitar to move back a few feet. this is just a play script. they don't need to go to the moon.

hmm can we go to the moon in SL??
hehe