BNWCS Weapon API
To enhance your weapons for the BNWCS, you will need the "BNWCS Developer's Kit."
Splash DamageSplash damage allows you to make an object that will damage all avatars that are both wearing a BNWCS health meter, and are within a set distance from the object. To implement the Splash Damage API in one of your scripts, follow these steps:
- Place the "BNWCS.api.AoE.lsl" next to the other script(s) inside your projectile.
- Add the following line of code to your main projectile script, wherever you have code that you want to deal BNWCS Splash damage:
//---------- llMessageLinked(LINK_SET,damage,"BNWCS AoE","range"); //----------replace the word "damage" with a number (up to 100) of damage.
replace the word "range" with a number between 0 and 10. Leave the number in quotation marks. "Range" is the *radius* of the splash damage - that is to say, avatars that are less than RANGE meters from the object, will take damage, while avatars that are further than range meters, will not take damage.
Advanced Splash API Usage
- Targetted Splash
You can set the AoE API to only damage a specific avatar within range, by adding that avatar's UUID to the linked message, like so:
//---------- llMessageLinked(LINK_SET,damage,"BNWCS AoE","range|target_uuid"); //----------Where "target_uuid" is the target avatar's UUID Key. If that avatar is within range, they will take damage. Other avatars within range will not take damage.
- Confirm Splash Damage
When the Splash API successfully receives your linked message, and activates, it will send the following linked message back - so your scripts can know that the damage was sent.
//---------- llMessageLinked(LINK_SET,damage,"BNWCS AoE Sent","range|target_uuid"); //----------
- "damage" values over 100 will be ignored by the BNWCS
- The BNWCS will automatically make damage decrease slightly as distance increases.
- Very close splash damage will not "fall off" at all, and avatars will take the full damage.
- Splash damage is affected by a combat zone's "damage modifier" much less than normal damage.
- Vehicles and Targets may have armor that will reduce the damage they take from the splash API.
- The BNWCS enforces a delay between splash damage. After taking splash damage, a BNWCS will ignore all other splash damages for a number of seconds equal to:
(Splash damage maximum range), or 2, whichever is larger.
5 seconds if the source of the splash damage is inside the avatar's hitbox.
For example, a BNWCS grenade going off 3 meters from an avatar, set for a maximum of 5 meters, would cause the BNWCS to wait 5 seconds before accepting any more splash damage.