[Script] Ronds de fumée

Répondre
Partager Rechercher
Bonjour à tous voilà un petit moment que je cherche le script permettant de faire des ronds de fumée avec une cigarette, est-ce que quelqu'un l'aurait sous la manche? merci d'avance
Ca doit pas etre simpla a faire en particule, sauf en utilisant une texture. Je vais voir mais n'attends rien de moi dans l'immédiat, y'a d'autres priorités ;-)

bon courage quand meme
y a pas mal de cigares et cigarettes freebies qui font de la fumée.

quand au rond de fumée... hum c'est juste un paramétrage précis d'un générateur de particules.
Bonjour Master71, merci de faire avancer le schmilblick c'est donc un effet de particules... voilà qui est intéressant, de quoi m'orienter vers quelque chose de plus précis Sinon, vous voyez précisément de quel effet je parle?
si tu parles du vrai rond de fumée, oui je vois très bien, je vais regarder ça sur les particules, mais ça va être un burst en cône sur un angle assez ouvert, avec des particules semi-transparentes, et une vitesse relativement faible.

Ha et faut que ça suive le vent
bon, un script, et surtout le paramétrage de llParticleSystem():
Code:
// Particle Script 0.5
// Created by Ama Omega
// 3-26-2004
// tweaked by Eep Quirk, 3/18/05,6/19/06

integer on;

particles()
{
// mask flags - set to TRUE (or 1) to enable
integer bounce = 0;    // Make particles bounce on Z plane of object
integer glow = 0;        // Make the particles glow
integer interpColor = 1;    // Go from start to end color
integer interpSize = 1;    // Go from start to end size
integer followSource = 1;    // Particles follow the source
integer followVel = 0;    // Particles turn to velocity direction
integer wind = 1;        // Particles affected by wind

//pattern:
//integer pattern = PSYS_SRC_PATTERN_ANGLE;
//integer pattern = PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY;
integer pattern = PSYS_SRC_PATTERN_ANGLE_CONE;
//integer pattern = PSYS_SRC_PATTERN_DROP;
//integer pattern = PSYS_SRC_PATTERN_EXPLODE;

// Select a target for particles to go towards
// "" for no target, "owner" will follow object owner 
//    and "self" will target this object
//    or put the key of an object for particles to go to
key target = "";
//key target = "self";
//key target = "owner";

// particle parameters
float age = 10;                  // Life of each particle

float maxSpeed = 0.1;            // Max speed each particle is spit out at
float minSpeed = 0.1;            // Min speed each particle is spit out at

string texture = "";           // Texture used for particles, default used if blank
float startAlpha = 0.5;           // Start alpha (transparency) value
float endAlpha = 0.8;           // End alpha (transparency) value (if interpColor = TRUE)

vector startColor = <0.3,0.3,0.3>;    // Start color of particles <R,G,B>
vector endColor = <0.5,0.5,0.5>;      // End color of particles <R,G,B> (if interpColor = TRUE)

vector startSize = <0.05,0.05,0>;     // Start size of particles <x,y>
vector endSize = <0.2,0.2,0>;       // End size of particles (if interpSize == TRUE)

vector push = <0,0,0>;          // Force pushed on particles

// system parameters
float life = 0;             // Life in seconds for the system to make particles
integer count = 1500;        // How many particles to emit per BURST 
float rate = 5;            // How fast (rate) to emit particles
float radius = 0.1;          // Radius to emit particles for BURST pattern
float outerAngle = PI /4;    // Outer angle for all ANGLE patterns
float innerAngle = PI / 4 - 0.1;    // Inner angle for all ANGLE patterns
vector omega = <0,0,0>;    // Rotation of ANGLE patterns around the source

integer flags = 0;
    if (target == "owner") target = llGetOwner();
    if (target == "self") target = llGetKey();
    if (glow) flags = flags | PSYS_PART_EMISSIVE_MASK;
    if (bounce) flags = flags | PSYS_PART_BOUNCE_MASK;
    if (interpColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK;
    if (interpSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK;
    if (wind) flags = flags | PSYS_PART_WIND_MASK;
    if (followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK;
    if (followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;
    if (target != "") flags = flags | PSYS_PART_TARGET_POS_MASK;
    llParticleSystem([  PSYS_PART_MAX_AGE,age,
                        PSYS_PART_FLAGS,flags,
                        PSYS_PART_START_COLOR, startColor,
                        PSYS_PART_END_COLOR, endColor,
                        PSYS_PART_START_SCALE,startSize,
                        PSYS_PART_END_SCALE,endSize, 
                        PSYS_SRC_PATTERN, pattern,
                        PSYS_SRC_BURST_RATE,rate,
                        PSYS_SRC_ACCEL, push,
                        PSYS_SRC_BURST_PART_COUNT,count,
                        PSYS_SRC_BURST_RADIUS,radius,
                        PSYS_SRC_BURST_SPEED_MIN,minSpeed,
                        PSYS_SRC_BURST_SPEED_MAX,maxSpeed,
                        PSYS_SRC_TARGET_KEY,target,
                        PSYS_SRC_ANGLE_BEGIN,innerAngle, 
                        PSYS_SRC_ANGLE_END,outerAngle,
                        PSYS_SRC_OMEGA, omega,
                        PSYS_SRC_MAX_AGE, life,
                        PSYS_SRC_TEXTURE, texture,
                        PSYS_PART_START_ALPHA, startAlpha,
                        PSYS_PART_END_ALPHA, endAlpha
                            ]);}

default {
    state_entry() {
        on = 1;
        particles(); }
    
    touch_start(integer touches){
        if (on == 1) {
            on = 0;
            llParticleSystem([]); }
        else {
            on = 1;
            particles(); } } }
tu le mets où tu veux, pour ma part il est dans une cheminée décorative, mais bon, là c'est un script qui lance les ronds au 'touch', faut adapter si tu veux le mettre dans une cigarette (même freebie à condition que tu puisses la modifier.)
Bonjour à tous comme certains l'ont probablement remarqués, depuis l'avant dernière mise à jour, le script ne fonctionne plus. Une idée peut etre sur le pourquoi de ce dysfonctionnement? merci d'avance
bon, j'aurais bien été voir ça, mais SL a dit que je devrais sortir au ciné...

[Edit:] J'ai réussi à me logguer, bon.
bah copier le script, coller le script dans un prim, toucher le prim, ça marche... j'ai de beaux ronds de fumée comme avant.
Répondre

Connectés sur ce fil

 
1 connecté (0 membre et 1 invité) Afficher la liste détaillée des connectés