Jump to content
Sign in to follow this  
RedEagle_P1.

Questions

Recommended Posts

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 by RedEagle_P1.

Share this post


Link to post
Share on other sites

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

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?

  • Upvote 1

Share this post


Link to post
Share on other sites
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: 079fe4b995100abd53f22e5706818d88.png

deb2280a0709b3697b6bc68a60c202da.png

 

Nothing happens on damage. 

Share this post


Link to post
Share on other sites

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
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

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

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
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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×