Solved hey! plz help

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

illco

Member
Jul 18, 2018
4
0
0
25
Hi, first

I want to make it turn into a tree when I put water on the grass.
I think we can use the on place syntax. It's hard.
need your help.

Thank you.
 
Hey, it's easier than you think :emoji_slight_smile:
code_language.skript:
on rightclick on grass:
    player's tool is water bucket
    grow a regular tree above the clicked block
You obviously change the "regual tree" part to the type of tree you wish to grow. The list of existing tree types can be found here.
 
Last edited:
  • Like
Reactions: illco
Wow, thank you. But after the installation, the water is still around the tree, and I want to deal with this!
 
I see, try to cancel the event so no water gets poured. The "cancel event" effect is one of the most useful things you can have out there. What it basically does is, as the name says, it cancels whatever event it belongs to. Cancelling a rightclick event will make as if the player had never clicked on the grass with the water bucket, but the following code will still be executed.
code_language.skript:
on rightclick on grass:
    player's tool is water bucket
    cancel event
    grow a regular tree above the clicked block
This is also useful for preventing griefing for example.
 
I see, try to cancel the event so no water gets poured. The "cancel event" effect is one of the most useful things you can have out there. What it basically does is, as the name says, it cancels whatever event it belongs to. Cancelling a rightclick event will make as if the player had never clicked on the grass with the water bucket, but the following code will still be executed.
code_language.skript:
on rightclick on grass:
    player's tool is water bucket
    cancel event
    grow a regular tree above the clicked block
This is also useful for preventing griefing for example.

The sound event seems to be an error.

indentation error: expected 4 spaces, but found 1 tab (command.sk, line 3: cancel event')
 
The sound event seems to be an error.

indentation error: expected 4 spaces, but found 1 tab (command.sk, line 3: cancel event')
Ah, the issue here is, when you pasted my code, you had to replace all the spaces that look like tabs by actual tabs. Here in the forums, when you paste code, all tabs are replaced with spaces, so if you do that you should be good to go.
 
  • Like
Reactions: Snow-Pyon and illco
what the... oh That's true :emoji_grin:
You've done it perfectly for beginners.
Thank you for your time.
Have a nice day!
 
Status
Not open for further replies.