RedEagle_P1. 905 Posted May 13, 2019 (edited) I have a few questions relating to the city roleplay I am working on: 1) Is there a way I can stop people from chopping down trees without a label or without permission? Edited May 13, 2019 by RedEagle_P1. Share this post Link to post Share on other sites
Houp 237 Posted May 14, 2019 I would listen in Event listener to On create for entity class Tree. In the script I would set trees to be indestructible. Share this post Link to post Share on other sites
Indomitus 388 Posted May 14, 2019 Would it work to use an event listener checking for damage for entity class Tree, and reset the tree's HP if the player doesn't meet the criteria? 1 Share this post Link to post Share on other sites
RedEagle_P1. 905 Posted May 15, 2019 On 5/14/2019 at 12:33 AM, Houp said: I would listen in Event listener to On create for entity class Tree. In the script I would set trees to be indestructible. Well I want people with a certain label to be able to cut them down. On 5/14/2019 at 5:53 AM, Indomitus said: Would it work to use an event listener checking for damage for entity class Tree, and reset the tree's HP if the player doesn't meet the criteria? Trying that without luck: Nothing happens on damage. Share this post Link to post Share on other sites
Houp 237 Posted May 16, 2019 Works fine for me. So check if target player has specific label. Check if target entity is considered as Tree Check if you can do damage to a tree (is it indestructible from the start?) Share this post Link to post Share on other sites
Oliver Hope 261 Posted May 16, 2019 17 hours ago, RedEagle_P1. said: Nothing happens on damage. are you sure your character has the label? Share this post Link to post Share on other sites
Igor Q. 519 Posted May 16, 2019 It would be alot easier imo to set tree HP to 100,000 and when damaging a tree if the player has a label deal a bonus 50,000 damage. Share this post Link to post Share on other sites
Indomitus 388 Posted May 16, 2019 Did a bit of testing with the idea tonight, and I've noticed that ON DAMAGE does not capture a player's action if they are using the Iron Saw. There is an ON SAW event, but it does not trigger until the sawing is complete (which would be too late). Share this post Link to post Share on other sites
jchob 354 Posted June 11, 2019 On 5/17/2019 at 12:14 AM, Indomitus said: Did a bit of testing with the idea tonight, and I've noticed that ON DAMAGE does not capture a player's action if they are using the Iron Saw. There is an ON SAW event, but it does not trigger until the sawing is complete (which would be too late). Yep, you can stop player to use weapons or axe on trees (setting them to indestructible, and if player belong to a label, then he can destroy the tree). In the other hand, you cannot stop player for using the saw to "saw down"... Because the ON SAW event trigger, is triggered after the tree is down. Also for "ON Plant". We need it to trigger before player starts using the saw Share this post Link to post Share on other sites
Hunter-Over-Fire 123 Posted March 26, 2020 Interesting method. Share this post Link to post Share on other sites