Now I Learning JavaScript first, to know the all basic off scripting and "var" can you tell me about variable? sorry my bad english because i am malaysian
Variables are kind of like short cuts to access bigger more complex commands so you can assign a variable of "fish_Taco" to say "I ate 50 fish tacos last night and now I have diabetes" so now when you write an "if" statement you can tell the computer to print out the variable "fish_Taco" which means that whole sentence I wrote earlier. Now you can use variables with pretty much everything. Hope that's what you meant I didn't really understand what you were trying to say.
Here is a simple script that you can use to build upon:
function useItem(x, y, z, itemId, blockId, side) {
if (itemId==280&&blockId==1) {
clientMessage("You touched stone with a stick");
addItemInventory(3,5,0);
Level.settile(x,y,z,7);
}}
//If you touch a stone block with a stick there will be a message, the player will get 5 dirt, and stone will turn into bedrock.
There is a good wiki with all functions listed (if you know the basics of java or javascript, or android, you will make it only with the wiki) - all functions and hooks are listed with descriptions. Link
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Check out all my other Minecraft PE scripts and the permissions on my site: wilco375.github.io
It has a lot of basic and more advanced information on it
Check out all my other Minecraft PE scripts and the permissions on my site: wilco375.github.io
function useItem(x, y, z, itemId, blockId, side) {
if (itemId==280&&blockId==1) {
clientMessage("You touched stone with a stick");
addItemInventory(3,5,0);
Level.settile(x,y,z,7);
}}
//If you touch a stone block with a stick there will be a message, the player will get 5 dirt, and stone will turn into bedrock.
Link