Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

About particle collision?

Weco Wise
Registered User
Join date: 23 Jan 2007
Posts: 1
09-14-2007 06:25
  Hello! I am an fresh SL developer from Taiwan. My project is to develop a game. A player fight with a monster which can spurt fire. I expect the monster could sense a player “collides” with fire.

  I use the texure for fire. Hence, the particle system is adopted. I discover the llCollisionSprite() method might be useful. I don't sure how to use it. Do I misunderstand the method? Could anyone show me an example somewhere? Or, I just get toward wrong direction?

  Please forgive the questions from a freshman! You any suggestion and correction are greatly appreciated!
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
09-14-2007 07:55
The llCollision commands control what happens if that prim is physical and bumps into something.

llCollisionSound() would control the sound that is played - the wood on wood noise (I highly recommend putting an llCollisionSound(" ";); in every physical vehicle), and llCollisionSprite() would be to change the particle texture that is used.

Particles are rendered client-side only, so therefore if you want to make some script that will interact if someone *should* get hit by a particle effect, you will need to fire off physical prims with scripts when the particle goes off (basically invisible bullets is the easiest way to think of it), or you can use a sensor to detect if someone is standing where the particle would be at the time of emission.
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
09-14-2007 09:28
Right -- particles are just for show. They never have any effects.

Your monster can rez a prim in the approximate location of the fire particles (and at the same time). This prim can be invisible, and can detect collision with the avatar either by collision or by being nonphysical and checking its interior (volume) for the presence of avatars.

Or you can use a scan to detect avatars in a cone projecting from the object containing the script, up to a max distance.

Sorry but I don't remember the corresponding LSL calls offhand!
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
09-14-2007 10:58
The best thing for beginners is the sticky at the top of the forum here:

/54/46/121753/1.html

Read it, then read the Wikis:

http://www.lslwiki.net
http://wiki.secondlife.com/wiki/LSL_Portal

Start playing with scripts and learn how the scripting system works, then you will be ready to get into a specific application.