featurelist.org
 
U
D
1 points - posted 215 days ago by godjonez - status: Active - 1 comments watch
Add an automated chain lighting effect.

Possible parameters:
- normal beam effect parameters excluding second end point (x,y,z,sprite,color,speed,life)
- initial damage
- initial chain radius
- possibly affected players list
Functional parameters (contains some of the regular beam parameters):
- delay between chains nodes
- beam life
- damage reduction
- radius reduction
- color
- sound file to emit on hit
- sound volume


  • adjustment function



Return: chain lightning identifier (possibly a class instance that holds the required information)

The adjustment function can be set to be called for each beam effect to be drawn. It is to provide new values for the functional parameters. This can be used to dynamically create multiple different behaviors, such as having different algorithms of how damage is calculated based on teams, previous damage and distance.

The function should receive these parameters:
- identifier (the same as received when calling the initial method)
- iteration level
- source userid
- target userid
- distance
- previous damage
- previous radius
- previous color (r,g,b,a)
- previous sound file
- previous sound volume
- previous delay
- previous life

The function should return similar information back:
- new damage
- new radius
- new color
- new sound file
- new sound volume
- new delay
- new life

Or it can also raise StopIteration to force stopping the iteration in this chain.

There should be default values for all of the functional parameters as well, including damage and radius to reduce based on some built-in function.

If the values for functional parameters were set on first call, use those as fall back if the adjustment function returns None for the associated attribute, or if the function itself is not supplied.

Comments welcome.


featurelist.org

Add this feature widget to your own website by using the following code:


Add it to forums (using bbcode):