Okay if you're here you probably don't know how to make/install ModPE Scripts! So we will go ahead and get started! Go down below to get started!
The Basics!
[SPOILER] Okay so lets start with the basics! I believe in learning on the job! So examine the code in the spoiler! [SPOILER] [CODE}
function useItem(x,y,z,itemId,blockId,side)
{
if(itemId==280)//The 280 stands for the ID of the item/block. This ID is for a stick the most commonly used itemId in ModPE!
{
addItemInventory(10,64);/*This is the most basic function in ModPE. "addItemInventory" does exactly what it sounds like, adds that item and number to your inventory!
The 10 is the ID for lava, the 64 stands for the amount. */
}
} [/CODE] [/SPOILER] Okay so you just witnessed the most simple script known to man! BUT! That is how you will learn. VERY, VERY, VERY, Simply! Okay so ignore everything above the "if(itemId==280)" and focus on the if and below. Now you probably noticed the "//<put text here>" those are called "comments" they allow you to leave messages without them actually being in the code. They are helpful because they will remind you and others of what to do! There is also a different comment that can be multiple lines of text. You can do this by " /* put text here" Then to end it just add a " */"
END OF THE FIRST LESSON!! REMEMBER THIS IS A WIP! MORE WILL BE ADDED!
PLEASE FOR THE LOVE OF GOD DO NOT GO OUT AND RELEASE THIS MOD OR ANY EQUALLY SIMPLE:
Okay if you're here you probably don't know how to make/install ModPE Scripts! So we will go ahead and get started! Go down below to get started!
Okay so lets start with the basics! I believe in learning on the job! So examine the code in the spoiler!
[SPOILER]
[CODE}
function useItem(x,y,z,itemId,blockId,side)
{
if(itemId==280)//The 280 stands for the ID of the item/block. This ID is for a stick the most commonly used itemId in ModPE!
{
addItemInventory(10,64);/*This is the most basic function in ModPE. "addItemInventory" does exactly what it sounds like, adds that item and number to your inventory!
The 10 is the ID for lava, the 64 stands for the amount. */
}
}
[/CODE]
[/SPOILER]
Okay so you just witnessed the most simple script known to man!
BUT!
That is how you will learn. VERY, VERY, VERY, Simply!
Okay so ignore everything above the "if(itemId==280)" and focus on the if and below.
Now you probably noticed the "//<put text here>" those are called "comments" they allow you to leave messages without them actually being in the code. They are helpful because they will remind you and others of what to do! There is also a different comment that can be multiple lines of text. You can do this by " /* put text here" Then to end it just add a " */"
END OF THE FIRST LESSON!! REMEMBER THIS IS A WIP! MORE WILL BE ADDED!
PLEASE FOR THE LOVE OF GOD DO NOT GO OUT AND RELEASE THIS MOD OR ANY EQUALLY SIMPLE:
"Stick givez you <PUT TEXT HERE>"
Hello, parking meter!
hahahaha ! lol u failed on your mod loly
and to pig ! good post ! keep it up just fix mistakes !