The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hitted body parts and durability of items
Author Message
Baeguth
Apprentice
*

Posts: 12
Likes Given: 4
Likes Received: 0 in 0 posts
Joined: Aug 2017
Reputation: 0



Post: #1
Hitted body parts and durability of items
Hello!

I was making a new combat system by overriding the combat triggers.
Right now I'm blocked with durability of items. I will try to make some questions/sentences. Thank you for all your help:


  1. Every time an item gets damaged, the hits points are reduced by 1? If yes can i increase the hitspoints reduction someway?
  2. How can i "force" a precise piece of armor to be damaged while in combat?
  3. LOCAL.ITEMDAMAGECHANCE Sets the chance for the hitted part of the body (Armor or shield, if any) to be damaged (Default: 40). 100 is damaged for sure, 0 is not damaged?
  4. How can i "force" a precise layer of the body to be damaged while in combat?
  5. Is there any way to show while clicking once the item, its durability after its name?
(This post was last modified: 08-12-2017 12:09 AM by Baeguth.)
08-12-2017 12:08 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: Hitted body parts and durability of items
1. By default i think one, you can override the damage in @ItemDamage
2. LOCAL.ItemDamageLayer in @GetHit, layer values in are in sphere_defs.scp and you should put there only valid layer.
3. Yes, 0 no damage, 100 always damage.
4. You can't, but you can use LOCAL.ItemDamageLayer then check if the layer is armored by using ISARMOR function.
5. If you enable tooltips, the item durability is shown on the tooltip. Without tooltips, a player have to rely on arms lore for seeing how many hitpoints the item has, you can avoid this by using @ItemClick trigger and displaying the durability by message/sysmessage and so on.
08-12-2017 12:34 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)