Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Dust Up Script

Shayna Korobase
Registered User
Join date: 8 May 2007
Posts: 454
01-27-2008 15:36
I saw a few hover crafts and helicopters kicking up dust when they get low to the ground and was wondering if anyone knows where I can get this script?

IM me in world... thanks :-)
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-27-2008 18:29
if you can't be bothered to check your own post request, why should we bother to answer it?

that said I'm not inworld so it's a moot point, but I imagine it uses a particle system, if you want to learn how to make particle scripts I'd suggest checking out the Particle laboratory inworld... excellent source of learning what all the parameters do and how to tweak them, with several demo scripts
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
01-27-2008 19:14
I second the suggestion to check out The Particle Laboratory! It's a fantastic place to learn about exactly the kinds of effects the OP mentioned, and the owner is extremely polite, kind, and helpful.

More info and a teleport link at http://world.secondlife.com/place/815b225b-23d8-a087-3ee6-6120b07876d0
_____________________
Shayna Korobase
Registered User
Join date: 8 May 2007
Posts: 454
01-27-2008 20:59
From: Void Singer
if you can't be bothered to check your own post request, why should we bother to answer it?

that said I'm not inworld so it's a moot point, but I imagine it uses a particle system, if you want to learn how to make particle scripts I'd suggest checking out the Particle laboratory inworld... excellent source of learning what all the parameters do and how to tweak them, with several demo scripts


I'm confused by your first statement. I check my posts all the time..... but... if someone was in-world they could IM me.

Anyway... thanks for the advice. I've been to the PL many times... maybe I overlooked it.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
01-27-2008 22:05
I think this is commonly done by actually rezzing a little temporary transparent emitter object that lands on the ground and poofs up particle dust from there. It could also be done from a prim on the vehicle itself, which would work better on build-restricted land but would make options for leaving a dust cloud behind or being able to descend further than the maximum height from which the dust is generated a little more limited (also may restrict a little more what options you can use for the particle emission; e.g. bounce).
Adrian Maddaloni
Registered User
Join date: 20 Dec 2006
Posts: 1
Dustcloud script
01-28-2008 15:29
Try this:
//=======================================================

float maxsysage = 0.0;
float maxspeed = 0.3;
float minspeed = 0.15;
float burstrad = 0.0;
integer burstcount = 20;
float burstrate = 0.01;
float outangle = 0.075;
float inangle = 0;
vector omega = <0.0,0.0,0.0>;
float startalph = 0.75;
float endalph = 0.015;
vector startscale = <2.0,2.0,2.0>;
vector endscale = <4.0,4.0,4.0>;
float maxage = 1.7;
vector accel = <0.0, 0.0, 1.0>;
string texture = "";

vector pos;
vector vel;
vector up;
float ground = 0.0;
float water = 0.0;
float height = 0.0;
float occilation = 1.25;
float start_mult = 0.1;
float rad;
integer occilate = TRUE;
integer started = FALSE;

Particles(integer part_on)
{
maxage = 0.001;
if (!part_on) jump particles;
vel = llGetVel() * 0.2;
ground = llGround(vel);
water = llWater(vel);
if (ground < water) {
maxspeed = 2.5;
minspeed = 1.25;
occilation = 2.0;
endscale = <3.0,3.0,3.0>;
maxage = 2.0;
ground = water;
texture = "7f70a931-6300-8dbc-caca-8b09a9c2cf11";
} else {
maxspeed = 1.75;
minspeed = 0.875;
occilation = 1.25;
endscale = <4.0,4.0,4.0>;
maxage = 1.75;
texture = "30f2fa72-3519-65c5-f4da-85a34c29cc3f";
}
pos = llGetPos() + vel;
up = llRot2Up(llGetRot());
height = pos.z - ground - 0.5;
height += (1.0 - up.z) * height;
if (height < 6.0 && height > -1.0) {
rad = 3.5 + (occilate * occilation);
outangle = PI - llAtan2(rad, height);
inangle = outangle + 0.15;
burstrad = rad / llSin(outangle);
startalph = ((llFabs(height) / -8.57) + 0.8 - (!occilate * 0.15)) * start_mult;
endalph = ((llFabs(height) / -200.0) + 0.04) * start_mult;
maxsysage = 0.0;
part_on = TRUE;
} else {
maxsysage = 0.01;
part_on = FALSE;
}

@particles;
//llParticleSystem([]);
llParticleSystem([PSYS_PART_FLAGS,
PSYS_PART_INTERP_COLOR_MASK |
PSYS_PART_INTERP_SCALE_MASK |
//PSYS_PART_FOLLOW_VELOCITY_MASK |
PSYS_PART_WIND_MASK,
PSYS_SRC_PATTERN,
PSYS_SRC_PATTERN_ANGLE_CONE,
PSYS_PART_START_COLOR, <1.0, 1.0, 1.0>,
PSYS_PART_START_ALPHA, startalph,
PSYS_PART_END_COLOR, <1.0, 1.0, 1.0>,
PSYS_PART_END_ALPHA, endalph,
PSYS_PART_START_SCALE, startscale,
PSYS_PART_END_SCALE, endscale,
PSYS_PART_MAX_AGE, maxage,
PSYS_SRC_ACCEL, accel,
PSYS_SRC_TEXTURE, texture,
PSYS_SRC_BURST_RATE, burstrate,
PSYS_SRC_ANGLE_BEGIN, inangle,
PSYS_SRC_ANGLE_END, outangle,
PSYS_SRC_BURST_PART_COUNT, burstcount,
PSYS_SRC_BURST_RADIUS, burstrad,
PSYS_SRC_BURST_SPEED_MIN, minspeed,
PSYS_SRC_BURST_SPEED_MAX, maxspeed,
PSYS_SRC_MAX_AGE, maxsysage,
PSYS_SRC_OMEGA, omega
]);

if (!part_on) {
llParticleSystem([]);
} else {
if (started) {
if (start_mult < 1.0) {
start_mult += 0.075;
}
} else {
if (start_mult > 0.0) {
start_mult -= 0.05;
} else {
llSetTimerEvent(0.0);
llParticleSystem([]);
}
}
occilate = !occilate;
}
}
default
{
state_entry()
{
//llSetAlpha(0.0,ALL_SIDES);
llSetAlpha(1.0,ALL_SIDES);
llSetTimerEvent(0.0);
Particles(TRUE);
}

touch_start(integer total_number)
{

started = TRUE;
Particles(TRUE);
start_mult = 0.1;
llSetTimerEvent(0.01);


}

timer()
{
Particles(TRUE);
}


}

//=================================================

PS I didn't write it. I got it from the Z4 Attack Chopper by David Street.
Shayna Korobase
Registered User
Join date: 8 May 2007
Posts: 454
01-28-2008 19:00
Thanks for the script but it didn;t work :-(
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-28-2008 19:49
From: Shayna Korobase
I'm confused by your first statement. I check my posts all the time..... but... if someone was in-world they could IM me.

Anyway... thanks for the advice. I've been to the PL many times... maybe I overlooked it.

Sorry, it's not meant to offend, just years of people posting, "hi I want this, send me a message, because I won't check for replies"... sorry if I jumped the jumped the gun.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Max Pitre
Registered User
Join date: 19 Jul 2006
Posts: 370
01-29-2008 04:28
From: Shayna Korobase
Thanks for the script but it didn;t work :-(


Worked great for me :)
Shayna Korobase
Registered User
Join date: 8 May 2007
Posts: 454
01-29-2008 05:18
From: Max Pitre
Worked great for me :)

can you IM me inworld and show me? When I put this script in a box it looked very strange. Thanks.
Jopsy Pendragon
Perpetual Outsider
Join date: 15 Jan 2004
Posts: 1,906
01-29-2008 12:53
Hi Shayna-

Got your IM in world... but figured I'd answer you here instead, just to be silly. =)

Sorry, no, the particle laboratory does not have a 'dust-up' helicopter sample template. If I were to create one, I would probably start with the "STEAM" example (found on the sandbox level), and I'd make the following changes:

1) Increase SCALE_START to <3,3,0>
2) Slightly increase SPEED_MAX to around 0.5
3) I'd shorten the PART_MAX_AGE to around 1.0
4) Shorten BURST_RATE to 0.02
5) Increase BURST_RADIUS to 2.0

Hewee is right on target though, a seperate prim just above ground level should be emitting these particles, so that they look proper... =)
_____________________
* The Particle Laboratory * - One of SecondLife's Oldest Learning Resources.
Free particle, control and targetting scripts. Numerous in-depth visual demonstrations, and multiple sandbox areas.
-
Stop by and try out Jopsy's new "Porgan 1800" an advanced steampunk styled 'particle organ' and the new particle texture store!