I not sure how to do the modpe function function useItem(x,y,z,itemId,blockId,side mod so i need to know how to make a block spawn
Also I want to make an weapon cause a explosions.
function useItem(x,y,z,itemId,blockId,side)
{
if(itemId==262)
{
setTile(x,y+1,z,10);
}
}
The setTile script which AuthenticPixel posted would REPLACE the block you tap. If would want PLACE the block you have put 'y+1' instead of just 'y'. This makes the designated block be added on top of the block you pressed.
And with spawning the block I want to make an instant build mod so how to place more than one block with the same click
And what is pm
To place more than one block you just need to add more times the function setTile().
Like this:
function useItem(x,y,z,itemId,blockId,side)
{
if(itemId==280)//If your item is a stick
{
setTile(x,y,z,PlaceTheBlockIdHere)
setTile(x,y,z,PlaceTheBlockIdHere)
setTile(x,y,z,PlaceTheBlockIdHere)
}
}
You can use the function setTile() how many times you want.
PM is Personal Message.
To send me a PM, click in my name to go to my profile, and click in "send me a message".
I not sure how to do the modpe function function useItem(x,y,z,itemId,blockId,side mod so i need to know how to make a block spawn
Also I want to make an weapon cause a explosions.
If you want one which blows up upon attacking, here's the code.
function useItem (x,y,z,itemId,blockId)
{
if(getCarriedItem()=="whatever itemId you want")
{
Level.explode(x,y,z,"radius");
}
}
Rollback Post to RevisionRollBack
Zu'u los drog!
I am secretly a modder, who works only for himself, seldom publishes.
I just took the Minecraft Noob test! Check out what I scored. Think you can beat me?!
To take the test, check out http://minecraftnoobtest.com/test.php
To post a comment, please login or register a new account.
Also I want to make an weapon cause a explosions.
Like this:
function useItem(x,y,z,itemId,blockId,side) { if(itemId==280)//If your item is a stick { setTile(x,y,z,PlaceTheBlockIdHere) } }And you can make a item cause explosion with the function Level.Explode().
Like this:
function useItem(x,y,z,itemId,blockId,side) { if(itemId==280)//If your item is a stick { Level.explode(x,y,z,PlaceTheRadiusHere) } }I hope I helped you
any other question send me a PM.
http://www.twitter.com/AuthenticPixel
{
if(itemId==262)
{
setTile(x,y+1,z,10);
}
}
The setTile script which AuthenticPixel posted would REPLACE the block you tap. If would want PLACE the block you have put 'y+1' instead of just 'y'. This makes the designated block be added on top of the block you pressed.
Want GUI Templates? Done!
https://github.com/BeATz-UnKNoWN/ModPE_Scripts/wiki/ModPE-Script-Templates
P.S. Feel free to follow me so you know when I post "awesome" content and make the MCForums a brighter place (totally).
If you need to contact me you can either shoot a Kik message to beatz_unknown or send an email to [email protected]
To place more than one block you just need to add more times the function setTile().
Like this:
function useItem(x,y,z,itemId,blockId,side) { if(itemId==280)//If your item is a stick { setTile(x,y,z,PlaceTheBlockIdHere) setTile(x,y,z,PlaceTheBlockIdHere) setTile(x,y,z,PlaceTheBlockIdHere) } }You can use the function setTile() how many times you want.
PM is Personal Message.
To send me a PM, click in my name to go to my profile, and click in "send me a message".
Thanks man
http://www.twitter.com/AuthenticPixel
If you want one which blows up upon attacking, here's the code.
function useItem (x,y,z,itemId,blockId) { if(getCarriedItem()=="whatever itemId you want") { Level.explode(x,y,z,"radius"); } }I am secretly a modder, who works only for himself, seldom publishes.
i will pm you my script soon might be a few days.
AuthenticPixel
and
QyMineAsap
Ok, i need help finding out how to use the Side peramater of function useItem, i need some help with this for my mod, oh and *bump*
This google+ is what ill comment on vids on
My Google+
My YouTube Is ‹ HungryBoy02 › My Blog Is The Obsidian Sword
I just took the Minecraft Noob test! Check out what I scored. Think you can beat me?!
To take the test, check out
http://minecraftnoobtest.com/test.php