jchob 354 Posted January 7, 2020 Hello. Maybe this was asked already, but we need a way to track where arrows, bullets musket balls, etc land. Or what item they hit. We can't get a ON damage for players. Actually I can make a work around with spawning a trigger zone and enabling/disabling it to follow a player. But only throwing grenades will trigger it. Idea is, one example: shooting a "poison arrow" to damage a player over time. I can make it work with NPCs because they have a ON damage event. I then check what active weapon is active on the player that is shooting. That kinda check if it is a template bow and then I can script the poison HP. Hope I make sense. ?? Share this post Link to post Share on other sites
Indomitus 388 Posted January 7, 2020 There is a way to rig an event listener to capture ON DAMAGE for players. I have one in use as part of a custom hit point system in one of my game modes I'm working on. I'll have to look it over when I get home, but I do know it can be done. Share this post Link to post Share on other sites
Igor Q. 519 Posted January 7, 2020 The easiest solution would be to use an event listener for damage. You could have the bow deal a specific amount of damage as an "ID" and use that to trace back to who shot it. For example bow 1 = 1dmg Bow 2 = 2 damage If there is no trigger entity and the damage amount = .... Then Do X action Share this post Link to post Share on other sites
Indomitus 388 Posted January 7, 2020 It's easier than that. I'll post screenshots after work. Share this post Link to post Share on other sites
jchob 354 Posted January 8, 2020 (edited) 6 hours ago, Indomitus said: There is a way to rig an event listener to capture ON DAMAGE for players. I have one in use as part of a custom hit point system in one of my game modes I'm working on. I'll have to look it over when I get home, but I do know it can be done. I didnt find anything on event listener that handles that. It might not be the easy way then... If you can show me some pics ? Edited January 8, 2020 by jchob Share this post Link to post Share on other sites
Indomitus 388 Posted January 8, 2020 (edited) 1. Set your Event Listener to "Interaction Between 2 Entities." Set Trigger Object to "Any Entity" and Target Object to "Any Player". You can now select ON DAMAGE as the event. 2. In the On Damage event, my system checks if the Target Entity (damaged player) has a specific Entity Storage, then passes the info to that for the calculations. 3. The first thing to check is the Trigger Entity. You can use the "Is Entity" tile to verify it's an object (and not the ground) which will narrow it down to other players or animals (and maybe cars?)... OR check it against an array such as the list of players in a Role or Label. My system adjusts for all damage, depending on what caused it, so I have script for both. Edited January 8, 2020 by Indomitus Share this post Link to post Share on other sites
jchob 354 Posted January 8, 2020 (edited) 2 hours ago, Indomitus said: 1. Set your Event Listener to "Interaction Between 2 Entities." Set Trigger Object to "Any Entity" and Target Object to "Any Player". You can now select ON DAMAGE as the event. 2. In the On Damage event, my system checks if the Target Entity (damaged player) has a specific Entity Storage, then passes the info to that for the calculations. 3. The first thing to check is the Trigger Entity. You can use the "Is Entity" tile to verify it's an object (and not the ground) which will narrow it down to other players or animals (and maybe cars?)... OR check it against an array such as the list of players in a Role or Label. My system adjusts for all damage, depending on what caused it, so I have script for both. Omg, I feel so dumb now.. Yeah between 2 entities. I've used it many times before. Maybe I should put down the smokes. Lol Lets pretend I didnt ask it ? Edited January 8, 2020 by jchob Share this post Link to post Share on other sites
Indomitus 388 Posted January 8, 2020 (edited) To kind of backtrack a little, if you only want to detect PvP damage, you can set both to "Any Player". (I got a little caught up in my specific settings, since I'm detecting all damage.) ...this is mostly for the sake of other players who need to learn how to do it, and find this thread. Edited January 8, 2020 by Indomitus 1 Share this post Link to post Share on other sites
jchob 354 Posted January 8, 2020 It's like I always overthink on things. For example, some time ago I wanted to make a "driver" for cars. So only certain players could drive the car. Thus, I made all engines on/off depending on the players I wanted.... 2 days after I realized there was a tile called SET vehicle driver ? ahaha 1 Share this post Link to post Share on other sites
jchob 354 Posted January 8, 2020 (edited) @Adam Snellgrove would it be better to move this to the Editor Help subforum, I think.I have a new question/problem/bug? Edited January 8, 2020 by jchob Share this post Link to post Share on other sites
jchob 354 Posted January 8, 2020 (edited) @Igor Q. @Indomitus I'm testing the poison "thing" that once a NPC is damaged it will loose HP over time. I use a time trigger over 10 seconds and it "takes HP" from the NPC. The problem is, NPC doesn't die. It keeps walking at same spot. Yes... walking at same spot, i'm not crazy Although if I hit NPC again it dies this time. Anyway, for what i'm doing that wouldn't be a problem because I don't want players to die. Instead of, when their HP is bellow a certain amount, I'm going to set their position to the "starting point". Well, take a look: Edited January 8, 2020 by jchob Share this post Link to post Share on other sites
Igor Q. 519 Posted January 8, 2020 Use the "damage" logic not set hp imo. Could be a bug though? @Adam Snellgrove Share this post Link to post Share on other sites
Adam Snellgrove 1451 Posted January 8, 2020 Maybe. If you could make a seperate forum post about this in the bug section @jchob (just copy what you just said here), we'll look at it tomorrow with the bug team. Share this post Link to post Share on other sites