Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Particle direction

Slobie Bolero
Registered User
Join date: 14 Nov 2006
Posts: 13
11-15-2007 10:17
Gah! Just trying to put a shower in my house. No matter what I do, the water particles go upward. I want a shower, not a bidet! I know it as to be something simple, but it just escapes me. I would just buy my own, but I want the shower head to look distinctive for my decor. Not loking to become a partcle expert, just want to be clean. ;)
I'm using PSYS_SRC_PATTERN_ANGLE_CONE.
Debbie Trilling
Our Lady of Peenemünde
Join date: 17 Oct 2006
Posts: 434
11-15-2007 10:27
Firstly, turn the head about 180degees. If that fixes it then will mean a rebuild of the shower head. I assume though that you have already tried this. :)

If this doesn't fix it then it probably means that PSYS_PART_FOLLOW_SRC_MASK is not set.

To set this flag, find PSYS_PART_FLAGS in the script and it will have a numerical value next to it. Add sixteen (16) to whatever value you find there. That will fix it up in the majority of cases, assuming that all other parameters are correctly set.

Good luck :)


EDIT: correction: Hex '0x010' = 16 in decimal
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
11-15-2007 10:27
Have you been to the Particle Lab in Teal?? Go. Even if you've been there before, go.

There will be visual examples and code snippets there.
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!!
- Go here: http://jira.secondlife.com/browse/SVC-1224
- If you see "if you were logged in.." on the left, click it and log in
- Click the "Vote for it" link on the left
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
11-15-2007 10:30
From: Debbie Trilling
To set this flag, find PSYS_PART_FLAGS in the script and it will have a numerical value nect to it. Add twenty (20) to whatever value you find there. That will fix it up in the majority of cases, assuimg that all other parameters are correctly set.

/me eeps.. That's a bitmask - don't add to it!!
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!!
- Go here: http://jira.secondlife.com/browse/SVC-1224
- If you see "if you were logged in.." on the left, click it and log in
- Click the "Vote for it" link on the left
Debbie Trilling
Our Lady of Peenemünde
Join date: 17 Oct 2006
Posts: 434
11-15-2007 18:28
From: Meade Paravane
/me eeps.. That's a bitmask - don't add to it!!


It is quite acceptable to add the values and pass them thro' to PSYS_PART_FLAGS.

For example, if one wanted to set, say, emissive and wind it could be done using constants:

PSYS_PART_FLAGS, PSYS_PART_EMISSIVE_MASK | PSYS_PART_WIND_MASK,

or passing the hexadecimal equivilants: (0x100 + 0x008 = 0x108):

PSYS_PART_FLAGS, 0x108,

or passing the decimal equivilants: (256 + 8 = 264) :

PSYS_PART_FLAGS, 264,

Any of these will produce the same particle effect. Try it.
nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
11-16-2007 03:04
Another possible influence is the PSYS_SRC_ACCEL property. If the z-component of this property is positive the particles will accelerate upwards, in which case setting the value negative should solve the problem.
_____________________
www.nandnerd.info
http://ordinalmalaprop.com/forum - Ordinal Malaprop's Scripting Forum
Atom Burma
Registered User
Join date: 30 May 2006
Posts: 685
11-16-2007 03:40
Outy Particle's has an amazing water particle script kit as well. It's not crazy expensive and is notecard driven. I find that kit indespensable for showers, and hot tubs. Theres a bunch of preset particles in the script and its as simple as changing the notecard text, IE shower, jet, water ball, that sort. He has a tonne of locations inworld.
Debbie Trilling
Our Lady of Peenemünde
Join date: 17 Oct 2006
Posts: 434
11-16-2007 05:41
From: nand Nerd
Another possible influence is the PSYS_SRC_ACCEL property. If the z-component of this property is positive the particles will accelerate upwards


Yes, very good point Nand.

From: Meade Paravane
/me eeps.. That's a bitmask - don't add to it!!


Clearly adding values is a perfectly acceptable solution in LSL (see post 2:28am), as it is in most other more sophisicated programming languages (albeit the syntax & method may differ). However, as a matter of interest, I decided to push it a little specifically as it relates to the particle system.

The following variations all produce the *exact same* particle sytem and so there is no need for "eeps" :)

From: someone

PSYS_PART_FLAGS, PSYS_PART_EMISSIVE_MASK | PSYS_PART_WIND_MASK,
PSYS_PART_FLAGS, 0x108,
PSYS_PART_FLAGS, 264,
PSYS_PART_FLAGS, 0x100 + 0x008,
PSYS_PART_FLAGS, 256 + 8,
PSYS_PART_FLAGS, 0x100 + 8,
PSYS_PART_FLAGS, PSYS_PART_EMISSIVE_MASK + 0x008,
PSYS_PART_FLAGS, PSYS_PART_EMISSIVE_MASK + 8,


Now, I'm obviously not recommending the "pick and mix" of some of these variations, (stick to one of the first three, I'd say; by personal preference I use decimal but am comfortable working with the others).

However this test result does show that LSL, llParticleSystem() and PSYS_PART_FLAGS are all happy working together using any combination of valid input types. Moreover, it shows that adding an additional flag to the flag(s) already being passed to an existing PSYS_PART_FLAGS setup is easily accomplished by adding the correct value for that new flag (whether as a constant, hexadecimal or decimal).
nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
11-16-2007 07:01
Correct Debbie but consider the consequence of adding a bit flag which has already been set:

PSYS_PART_FLAGS, 0x100 + 0x008 + 0x008,
=
PSYS_PART_FLAGS, 0x110,

Which results in an erroneous outcome. The correct method of "adding" bit flags is with the OR operator, in which case the above would result in the correct flags being set:

PSYS_PART_FLAGS, 0x100 | 0x008 | 0x008,
=
PSYS_PART_FLAGS, 0x108,
_____________________
www.nandnerd.info
http://ordinalmalaprop.com/forum - Ordinal Malaprop's Scripting Forum
Debbie Trilling
Our Lady of Peenemünde
Join date: 17 Oct 2006
Posts: 434
11-16-2007 07:18
From: nand Nerd
...consider the consequence of adding a bit flag which has already been set:

PSYS_PART_FLAGS, 0x100 + 0x008 + 0x008,...


Yes, fair point Nand & thanks for pointing it out. I hadn't considered a scenerio when the same flag(s) have erroneously been passed over twice or more.

However, those variations were given for illustration purposes to satisfy my own curiousity. In practice, ofc, I stick to one of the tried & tested methods & not stray from the beaten path...

But good point well made & taken aboard :)
nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
11-16-2007 07:32
From: Debbie Trilling
Yes, very good point Nand.

From: Debbie Trilling
Yes, fair point Nand & thanks for pointing it out.

From: Debbie Trilling
But good point well made & taken aboard :)


/me likes Debbie :D
_____________________
www.nandnerd.info
http://ordinalmalaprop.com/forum - Ordinal Malaprop's Scripting Forum