-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ON=@DAMAGE together with CAN_I_DAMAGEABLE #1260
Comments
Its basically item (no weareble like armor, weapon or other types that have defined hits/maxhits for them) with can=can_i_damageable (lets say crystal that is attr_static) Yes, right now im using just hits -=xy, but then there comes another issue, which is my second PR, and the fact that the hitbar / statusbar of the item is not being updated after that. The two issues might be maybe connected, or there was missing function being called that I added. I quickly tried to summarize quote to your post. I hope it helps. |
I dont know the state of the system right now. I tried to attack items but dosnt work. Anyone knows the state of the feature? |
Its working up to the dealing dmg.
Potential Solution:
|
But can the player "attack" the item using the normal combat system? I don't know how it is right now. Should explosions damage those items? |
From what I understand and it was mentioned some time ago by someone from devs, the "attack" part is up to the user to handle it by the script. |
This is all that the flag does. |
This problem is slightly different then updating status bar with can_i_damageable. I think the problem is that if the item is not wearable, the system dont expect that. The workaround is lowering/increasing hits or maxhits manually by scripts. (HITS -=5) |
So the problem is If we do damage on the item with flag CAN_I_DAMAGEABLE, the trigger fires, but since this flag is using HITS and MAXHITS, and not MORE1L and MORE1H, it will not inflict any damage on that item.
Maybe it is connected also to the problem #1259. I think ideally the @damage lowering HITS for items with CAN_I_DAMAGEABLE, should also start the status bar update.
I was trying to inspect the CItem.cpp -> CItem::OnTakeDamage and CCItemDamageable.cpp, and I think it should be possible in CItem.cpp add check if the item is not any of the defined types, and has the CAN flag, use the hits and maxhits using the CCItemDamageable.cpp ?
The text was updated successfully, but these errors were encountered: