Jump to content

ashutoshkashyap

Resident
  • Posts

    10
  • Joined

  • Last visited

Posts posted by ashutoshkashyap

  1. On 11/29/2019 at 6:24 PM, Nova Convair said:

    I once made a rocket and the warhead uses that kind of script:

    
    Detonate () {
    	llTriggersound(...);
    	...
    	llTriggersound(...);
    	llLinkParticleSystem(1,[...]);
    	llLinkParticleSystem(2,[...]);
    	llLinkParticleSystem(3,[...]);
    	...
    	llLinkParticleSystem(n,[...]);
    	llSleep(x);
    	llDie();
    }

    Overlapping sounds and overlapping particles. One prim per particle effect needed of course.

    You need to count the particles. How many per second you emit and how long they stay. The overall number needs to be under 4096 - if you think you have full attention on the only particle source around. If you plan a battle - reduce to 1/10th and make the life times of the particles shorter.

    More that one script is a waste but there is no reason that llMessageLinked will fail. If it does you messed it up.

    And I wouldn't use land_collision only. Alot of land is covered by a prim.

     

    The total particle count is not even 50 including all the the 5 scripts in all the 5 prims. I have already taken care of all those stuffs in the particle script.
    I know i am making mistakes with the placement  of the llMessageLinked codes at the required place in the original script.
    This is my 1st time i am dealing with  Physics + Land collision + llMessageLinked   all of them together. So, after so many valuable feedback from all of you, i am still trying and testing. 

     

  2. 3 hours ago, Wulfie Reanimator said:

    This isn't exactly true. If all the objects are the same size and in the same spot, they will all collide at the same time. 

    This is because physics are not checked continuously (like IRL), but in intervals (physics FPS).

    So, the faster the object's velocity, the greater the distance each object can move into colliding objects before the sim realizes anything. (This is also why objects can pass through walls entirety with or without detecting a collision.)

    Kind of irrelevant to the topic, but anyway. 

    i made a hardware design (like a flower bud with 5 petals) in which all the 5 prims "shall" hit the land after getting fired from the cannon and get triggered simultaneously for the "land collision" effect. But what i observed is that the whole bomb accumulates a lot of mass. Also i observed when fired from different angles, the bomb hits the land with different angles naturally. 
    But the biggest issue i faced is the same - not all the linked prims getting triggered. 

  3. 1 hour ago, Wulfie Reanimator said:

    llPassCollisions would cause collisions with a child prim to be detected in the root, not the other way around.

    To do the reverse (root collides = all particles trigger), you could try changing all the scripts in the child prims to be triggered in a link_message event. To trigger this event, the root should use llMessageLinked on collision to send a message that only the linkset itself can hear.

    Hopefully that helps, I'm posting from mobile.

    I did like this -
    In root prim:
    .............///(upper part of script)///.....
    land_collision(vector pos)
        {
              llMessageLinked(LINK_SET, 0, NULL_KEY, "Explode");
              llPlaySound(sound, 1.0);
              explode();
              llSetLinkAlpha(LINK_SET, 0.0, ALL_SIDES);
              llSleep(3.0);
              llDie();
        }

    }
    /////End of Script

     


    In child prims:
    .............///(upper part of script)///.....
    land_collision(vector pos)
        {
              llPlaySound(sound, 1.0);
              explode();
              llSetLinkAlpha(LINK_SET, 0.0, ALL_SIDES);
              llSleep(3.0);
              llDie();
         }
              link_message(integer sender_num, integer num, string msg, key id)
        {
        }
    }
    /////End of Script

     

    But the child prims are not getting triggered. Hope i am doing the right thing! :(

  4. Hi Wulfie,

    a) This is basic script. The other 5 scripts are having different particle effects - e.g. textures, patterns and other variables.
    b) All the 5 scripts will play at the same time - on land collision
    c) I tried linking 5 different prims with these 5 scripts but then i got the issue of "collision effect". Tried using llPassCollisions but it made me more confused over a period of time.

  5. Hi everyone,

    I am not a scripter but love to play around with it and create. I have been working on bomb-explosion script for the last few months after i found one while going thorough dozens of articles etc. 

    I made a lot of versions of the original script as well as modified it a lot. To make the bomb-explosion upon land-collision look good, i need to link around 5-6 particle scripts together placed in a prim. I have been banging my head on the wall for so many months and tried everything possible to my knowledge but have failed. 

    Would appreciate any advise, guidance. Thanks in advance! 

    Here is the script - 

    string sound = "Explode";

    explode ()
    {
        llSetStatus(STATUS_PHYSICS, FALSE); 
        llTriggerSound("Explode", 10.0);
        llParticleSystem([
     PSYS_SRC_PATTERN,
      PSYS_SRC_PATTERN_EXPLODE,
      PSYS_SRC_TEXTURE, "", 
      PSYS_SRC_MAX_AGE, 3,
      PSYS_SRC_BURST_RATE, 0.0,
      PSYS_SRC_BURST_PART_COUNT, 5,
      PSYS_SRC_BURST_RADIUS, 0,
      PSYS_SRC_BURST_SPEED_MIN, 2,
      PSYS_SRC_BURST_SPEED_MAX, 2,
      PSYS_SRC_ACCEL, <0,0,0>,
      PSYS_SRC_ANGLE_BEGIN, 0,
      PSYS_SRC_ANGLE_END, 0,
      PSYS_SRC_OMEGA, < 0., 0. , 0.>,
      PSYS_PART_START_GLOW, 0,
      PSYS_PART_END_GLOW, 0,
      PSYS_PART_MAX_AGE, 4,
      PSYS_PART_START_COLOR, <0,0,0>,
      PSYS_PART_END_COLOR, <0,0,0>,
      PSYS_PART_START_ALPHA, 1 ,
      PSYS_PART_END_ALPHA, 0 ,
      PSYS_PART_START_SCALE, <4,4,0>,
      PSYS_PART_END_SCALE, <4,4,0>,
      PSYS_PART_FLAGS, 0

      
     | PSYS_PART_EMISSIVE_MASK
     | PSYS_PART_INTERP_COLOR_MASK
     | PSYS_PART_INTERP_SCALE_MASK
     | PSYS_PART_FOLLOW_VELOCITY_MASK]);
    }
    default 
    {
         on_rez(integer startup)
         {
              llSetLinkAlpha(LINK_SET, 1.0, ALL_SIDES);
              llPreloadSound(sound);
              llSetTimerEvent(3.0);
    }
        
        timer()
        {
            llPlaySound(sound, 1.0);
              explode();
              llSetLinkAlpha(LINK_SET, 0.0, ALL_SIDES);
              llSleep(4.0);
              llDie();
        }
        
        land_collision(vector pos)
        {
              llPlaySound(sound, 1.0);
              explode();
              llSetLinkAlpha(LINK_SET, 0.0, ALL_SIDES);
              llSleep(3.0);
              llDie();
        }

    }

     

  6. Apologies for the delay in sharing my feedback!

    I am very happy and satisfied with the script you customized for me. That's awesome and exactly what i needed. I had been struggling for a long time as i had shared with you, also a few other scripters which i had contacted were too arrogant. The best part was you are very friendly, humble and understanding :)

    Thanks so much!

×
×
  • Create New...