Like please help I'm having a heavy time saving this stuff it's annoying g cause everyone is doing more and more I want to test them but without the saving messing up I can't do crap
Treebl, I had this idea while I was working on a horse mod. What if you added this:
function spawnZombie(x,y,z,image)//spawns a Zombie but you can choose the image - useful if you changed the image to an NPC skin and specified the image as NPC.png, but the only problem is it doesn't support hostile/not hostile so the next one is better
//OR
function spawnMob(x,y,z,type,image,hostile)
//this would be applied to create any type of mob and could be used to make a working mobspawner with few blocks. Also, you could spawn a zombie change the image to NPC.png and make it peaceful, and make peaceful mobs as well... see next line
function getPositionX(BlockId) //also getPositionY and getPositionZ
//calls the position of all of a type of block. can be used to find the position of a structure and spawn it. Also, in war maps, if you were to apply this method, you could devise a weapon using for example a nether reactor core and if you were to hit it with say a torch then it would locate a structure (say a gold tower someone built) and move it to your treasury using setPositionRelative
//and the last two functions i request are..
function gameStart()
//and
function gameEnd()
//EXAMPLE OF APPLICATION
//a simple mod that allows a user to place a cake block in a wooden house to create a bakery and call a baker
function gameStart() //when the game starts
{
function spawnMob(getPositionX(92),getPositionY(92),getPositionZ(92),32,Baker.png,false) //spawn a zombie (32 is the id for zombie) at the position of cake (92), give it the image of a baker (Baker.png) and make it peaceful (hostility is false)
}
//of course you would have to turn off the script or it would just spawn it every time you opened the map
(i realize that the tabs might not have come out but you get the idea)
Also, my mod won't save or load, so could someone try it out for me? PLEASE READ THE COMMENTS IN THE CODE; if you are a beginner to code and are just copy/pasting then look for the '//' and words next to them; it will be in red I think.
function useItem(ItemId,BlockId)
{
if(ItemId==296&&BlockId==247) //if you use wheat on a nether reactor
{
var i=2;//set the distance variable used in the next functions to 1
function setTile(getPlayerX()+i,getPlayerY(),getPlayerZ()+i,85);
function setTile(getPlayerX()+i,getPlayerY(),getPlayerZ(),85);
function setTile(getPlayerX(),getPlayerY(),getPlayerZ()+i,85);
function setTile(getPlayerX()+i,getPlayerY(),getPlayerZ()-i,85);
function setTile(getPlayerX()-i,getPlayerY(),getPlayerZ()+i,85);
function setTile(getPlayerX()-i,getPlayerY(),getPlayerZ()-i,85);
function setTile(getPlayerX(),getPlayerY(),getPlayerZ()-i,85);//all of the above setTiles create wooden fence posts to make a stable/pen for the horse
function setTile(getPlayerX()-i,getPlayerY(),getPlayerZ(),85);//and this creates a fence gate behind you
function spawnCow(getPlayerX(),getPlayerY(),getPlayerZ(),cow.png)//this spawns a cow if you want it wearing the horse picture you must download the picture and place it in "/var/mobile/applications/(now look for minecraftpe it will be one of them)/minecraftpe.app/" and in the code above change cow.png to horse.png or the name of the skin
}
}
function useItem(ItemId,BlockId)
{
var itembeingused=getCarriedItem();
if (itembeingused=334)//if you use leather on the victim (any animal but supposed to be used on the horse/cow) and this also acts as a replacement for the saddle. I have seen before that in other mods when you edit in a block it just stays this red square in inventory so you ouldn't even know you had a saddle and you can't place it on the cow without a cow so it would be useless to edit it in
{
function rideAnimal(attacker, victim)//simply ride the animal in this case the horse/cow
}
}
Maybe the load problem is just for me so in that case the script code is "kt7ziz".
Sweet another new MODPE treebl you are a awesome guy keep up the hard work!
What's modTick?
It's a new callback, but instead of getting called when a player hurts an animal or taps the ground, it's triggered on every Minecraft tick (1/20th of a second) so you can time events and make repeated events happen.
This was implemented in BlockLauncher with the temporary callback bl_tickHook, so any scripts that uses that now-renamed call will need an update.
It's a new callback, but instead of getting called when a player hurts an animal or taps the ground, it's triggered on every Minecraft tick (1/20th of a second) so you can time events and make repeated events happen.
This was implemented in BlockLauncher with the temporary callback bl_tickHook, so any scripts that uses that now-renamed call will need an update.
Hmmm I get it a little bit more haha but could you show that in an example?
The scripting site won't load for me on my device! I hit the Create New Script button and nothing happens... I even tried loading my Script ID and still nothing... Am I the only one having this problem? I'm on iOS.
Yeah ahaha i kept hitting the button, then realized you hit the button once, and you'll see that the your scripts tab above fills up with them press it once, then select your new mod that you should have named, then press load
Rollback Post to RevisionRollBack
Back to modding! Follow me on Twitter @byteandahalf
Welcome come to my world!!!!
Keep up with the good job on your mods
function spawnZombie(x,y,z,image)//spawns a Zombie but you can choose the image - useful if you changed the image to an NPC skin and specified the image as NPC.png, but the only problem is it doesn't support hostile/not hostile so the next one is better //OR function spawnMob(x,y,z,type,image,hostile) //this would be applied to create any type of mob and could be used to make a working mobspawner with few blocks. Also, you could spawn a zombie change the image to NPC.png and make it peaceful, and make peaceful mobs as well... see next line function getPositionX(BlockId) //also getPositionY and getPositionZ //calls the position of all of a type of block. can be used to find the position of a structure and spawn it. Also, in war maps, if you were to apply this method, you could devise a weapon using for example a nether reactor core and if you were to hit it with say a torch then it would locate a structure (say a gold tower someone built) and move it to your treasury using setPositionRelative //and the last two functions i request are.. function gameStart() //and function gameEnd() //EXAMPLE OF APPLICATION //a simple mod that allows a user to place a cake block in a wooden house to create a bakery and call a baker function gameStart() //when the game starts { function spawnMob(getPositionX(92),getPositionY(92),getPositionZ(92),32,Baker.png,false) //spawn a zombie (32 is the id for zombie) at the position of cake (92), give it the image of a baker (Baker.png) and make it peaceful (hostility is false) } //of course you would have to turn off the script or it would just spawn it every time you opened the map(i realize that the tabs might not have come out but you get the idea)Also, my mod won't save or load, so could someone try it out for me? PLEASE READ THE COMMENTS IN THE CODE; if you are a beginner to code and are just copy/pasting then look for the '//' and words next to them; it will be in red I think.
function useItem(ItemId,BlockId) { if(ItemId==296&&BlockId==247) //if you use wheat on a nether reactor { var i=2;//set the distance variable used in the next functions to 1 function setTile(getPlayerX()+i,getPlayerY(),getPlayerZ()+i,85); function setTile(getPlayerX()+i,getPlayerY(),getPlayerZ(),85); function setTile(getPlayerX(),getPlayerY(),getPlayerZ()+i,85); function setTile(getPlayerX()+i,getPlayerY(),getPlayerZ()-i,85); function setTile(getPlayerX()-i,getPlayerY(),getPlayerZ()+i,85); function setTile(getPlayerX()-i,getPlayerY(),getPlayerZ()-i,85); function setTile(getPlayerX(),getPlayerY(),getPlayerZ()-i,85);//all of the above setTiles create wooden fence posts to make a stable/pen for the horse function setTile(getPlayerX()-i,getPlayerY(),getPlayerZ(),85);//and this creates a fence gate behind you function spawnCow(getPlayerX(),getPlayerY(),getPlayerZ(),cow.png)//this spawns a cow if you want it wearing the horse picture you must download the picture and place it in "/var/mobile/applications/(now look for minecraftpe it will be one of them)/minecraftpe.app/" and in the code above change cow.png to horse.png or the name of the skin } } function useItem(ItemId,BlockId) { var itembeingused=getCarriedItem(); if (itembeingused=334)//if you use leather on the victim (any animal but supposed to be used on the horse/cow) and this also acts as a replacement for the saddle. I have seen before that in other mods when you edit in a block it just stays this red square in inventory so you ouldn't even know you had a saddle and you can't place it on the cow without a cow so it would be useless to edit it in { function rideAnimal(attacker, victim)//simply ride the animal in this case the horse/cow } }Maybe the load problem is just for me so in that case the script code is "kt7ziz".
(modTick() gets called every 1/20th of a second (more info and example coming soon)
NEW EDITOR!
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumAwesome!
Back to modding! Follow me on Twitter @byteandahalf
What's modTick?
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumIt's a new callback, but instead of getting called when a player hurts an animal or taps the ground, it's triggered on every Minecraft tick (1/20th of a second) so you can time events and make repeated events happen.
This was implemented in BlockLauncher with the temporary callback bl_tickHook, so any scripts that uses that now-renamed call will need an update.
Hmmm I get it a little bit more haha but could you show that in an example?
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumNice work. c: +1 c:
Check out my game! It's an open-world, sandbox text adventure.
Follow @hexdro_
Hexdro © 2012-2015
Ho do you create a new item?
Back to modding! Follow me on Twitter @byteandahalf
Back to modding! Follow me on Twitter @byteandahalf