Difference between revisions of "Category:LSL Combat2"
(Introduction, headlines, use them fancy define rows I saw on experience tools. I just put introduction together based on what Rider wrote and some of the descriptions of stuff and what I know so far ¯\_(ツ)_/¯) |
m |
||
Line 42: | Line 42: | ||
==Scripting== | ==Scripting== | ||
{| | {| | ||
{{LSL DefineRow|key|[[llRezObjectWithParams]](string inventory, list params)|New }} | {{LSL DefineRow|key|[[llRezObjectWithParams]](string inventory, list params)|New function for rezzing objects with a variety of parameters, particularly useful for avoiding the overhead of starting a script for each bullet}} | ||
{{LSL DefineRow|void|[[llAdjustDamage]](integer number, float new_damage)|Modifies the amount of damage that will be applied by the current [[on_damage]] event after it has completed processing}} | {{LSL DefineRow|void|[[llAdjustDamage]](integer number, float new_damage)|Modifies the amount of damage that will be applied by the current [[on_damage]] event after it has completed processing}} | ||
{{LSL DefineRow|void|[[llDamage]](key target, float damage, integer damage_type)|Delivers damage to tasks and agent in the same region of {{LSLGC|Constants/Damage Types|DAMAGE_TYPE_*}}. Negative damage can be used to heal instead}} | {{LSL DefineRow|void|[[llDamage]](key target, float damage, integer damage_type)|Delivers damage to tasks and agent in the same region of {{LSLGC|Constants/Damage Types|DAMAGE_TYPE_*}}. Negative damage can be used to heal instead}} |
Revision as of 20:50, 19 May 2024
Help Portal: |
Avatar | Bug Fixes | Communication | Community | Glossary | Land & Sim | Multimedia | Navigation | Object | Video Tutorials | Viewer | Wiki | Misc |
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
The Combat2 is an enhancement to the Linden Combat system.
This is not meant to be a complete combat system on its own but to provide the tools that allow you to do that.
In Second Life there are a host of combat communities scattered across the grid. These communities use a wide variety of combat systems, HUDs and weapon systems. Some are completely custom, relying on scripts to arbitrate health and damage, while others are based on the Linden Lab Combat System (LLCS). See Combat for more.
The goal of the Combat2 project is to provide a coherent set of tools and systems that allow the residents to create complex and compelling combat systems using a common and easy to use framework.
Introduced are new concepts:
- Damage events
- If a script (object, vehicle or attachment) has a damage event this will be called first before damage is applied and scripts may modify the actual amount of damage
- Objects can have health
- Combat log records all damage events, damage adjustments and kills
- Contains system generated combat log messages by a specific system ID that scripts can filter to
- Scripts may write to this channel if not restricted by the region
- Region-wide settings, region owners may:
- Throttle damage to limit how much damage a single source may inflict on a target per second
- Select a number of options as to what happens when agent health drops to 0 such as:
- Teleport home (same as old LLCS)
- Teleport to region's telehub
- Teleport to parcel's landing point
- No action
- Set a brief period of invulnerability, during which agents may neither deal nor receive damage
- Whether health is reset to 100% on death
- Tweak the speed of health regeneration per second
- Whether scripts are allowed to adjust damage or write to the combat log
Testing
Start playing with it and build interesting things.
There are two regions on the beta grid open and available for testing:
Scripting
• key | llRezObjectWithParams(string inventory, list params) | – | New function for rezzing objects with a variety of parameters, particularly useful for avoiding the overhead of starting a script for each bullet | |
• void | llAdjustDamage(integer number, float new_damage) | – | Modifies the amount of damage that will be applied by the current on_damage event after it has completed processing | |
• void | llDamage(key target, float damage, integer damage_type) | – | Delivers damage to tasks and agent in the same region of DAMAGE_TYPE_*. Negative damage can be used to heal instead | |
• list | llDetectedDamage(integer number) | – | Returns a list describing a single damage event within an on_damage event | |
• key | llDetectedRezzer(integer number) | – | Returns a key that is the UUID of the object or avatar that rezzed the detected object | |
• float | llGetHealth(key id) | – | Returns the current health of an avatar or object in the region | |
• event | on_damage(integer num_detected) | – | Triggered when damage has been inflicted on an avatar or task in the world but before damage has been applied or distributed | |
• event | final_damage(integer num_detected) | – | Triggered after after all on_damage events in all scripts and attachments have processed and damage has been applied to the avatar or distributed to all seated avatars | |
• event | on_death() | – | Triggered on all attachments worn by an avatar when that avatar's health reaches 0 (-- Does this trigger on objects too Rider?) | |
• integer | COMBAT_CHANNEL | – | Channel reserved for combat related log events broadcast to the entire region | |
• key | COMBAT_LOG_ID | – | Scripts may filter llListen calls to this ID to receive only system generated combat log messages |
Additional
- llGetEnv — Several new values are added
- "allow_damage_adjust" — Are scripts allowed to adjust damage
- "restrict_combat_log" — Are scripts allowed to write to the combat log
- "restore_health" — Is health reset to 100% on death
- "invulnerability_time" — Invulnerablitiy time applied after avatar death
- "damage_throttle" — The maximum number of points of damage a single source may inflict on a target per second
- "health_regen_rate" — The speed of health regeneration in hitpoints per second
- "death_action" — Set the action to take when an avatar dies in the region
- llGetObjectDetails
- OBJECT_HEALTH — Retrieves the health of an avatar or prim
- OBJECT_DAMAGE — Retrieves the amount of damage a prim inflicts on collision
- OBJECT_DAMAGE_TYPE — Retrieves the type of damage a prim inflicts on collision
- llRezObjectWithParams
- REZ_DAMAGE — The amount of damage applied to an agent upon collision with this object
- REZ_DAMAGE_TYPE — The damage type to apply when this prim collides with another object
- Combat Log has been added which allows for auditing damage events, there is a channel reserved at COMBAT_CHANNEL which will contain system generated combat log messages by COMBAT_LOG_ID and scripts may listen and additionally also write to this channel if the region allows it (see "restrict_combat_log" above)
Related
- Thread on the Second Life community forums by Rider Linden announcing the project: Pew! Pew! Pew! Linden Damage & Combat 2.0
- Feedback for suggesting, voting and commenting on ideas
Pages in category "LSL Combat2"
The following 21 pages are in this category, out of 21 total.