I know there is a way to make mobs go where you want them to so how ? I thought about it alot and cant figure it out !
function procCmd() {
var cmd = cmd.split(" ");
if (cmd[0] == "steve")
{
var steve = Level.spawnMob(x,y+1,z,11,"mob/char.png"); //spawns mob, variable "steve", and uses the skin char.png
Entity.setRenderType(steve,3); //changes the rendertype of the mob steve to a player
clientMessage("<Steve> Hello!"); //clientmessage sent if item is a stick (if steve is spawned)
clientMessage("<Steve> My name is steve !");
}
}
I want it to move certain places or follow a block that is placed like you if you hold gold ingot it will follow you or when you spawn the mob it will just walk around
function useItem (x, y, z,itemId, blockId, side)//useItem Code goes here
{
if(itemId == 280)//If the item used is a stick
{
var steve = Level.spawnMob(x,y+1,z,11,"mob/char.png"); //spawns mob, variable "steve", and uses the skin char.png
Entity.setRenderType(steve,3); //changes the rendertype of the mob steve to a player
clientMessage("<Steve> Hello!"); //clientmessage sent if item is a stick (if steve is spawned)
}
}Hxdro code not mine
function useItem (x, y, z,itemId, blockId, side)//useItem Code goes here
{
if(itemId == 280)//If the item used is a stick
{
var steve = Level.spawnMob(x,y+1,z,11,"mob/char.png"); //spawns mob, variable "steve", and uses the skin char.png
Entity.setRenderType(steve,3); //changes the rendertype of the mob steve to a player
clientMessage("<Steve> Hello!"); //clientmessage sent if item is a stick (if steve is spawned)
}
}
Hxdro code not mine
Hexdro ahah :3
So you want them to follow you? Look at the companion modpe script created by natebit (pretty sure he was the creator).
function procCmd() { var cmd = cmd.split(" "); if (cmd[0] == "steve") { var steve = Level.spawnMob(x,y+1,z,11,"mob/char.png"); //spawns mob, variable "steve", and uses the skin char.png Entity.setRenderType(steve,3); //changes the rendertype of the mob steve to a player clientMessage("<Steve> Hello!"); //clientmessage sent if item is a stick (if steve is spawned) clientMessage("<Steve> My name is steve !"); } }I want it to move certain places or follow a block that is placed like you if you hold gold ingot it will follow you or when you spawn the mob it will just walk around
{
if(itemId == 280)//If the item used is a stick
{
var steve = Level.spawnMob(x,y+1,z,11,"mob/char.png"); //spawns mob, variable "steve", and uses the skin char.png
Entity.setRenderType(steve,3); //changes the rendertype of the mob steve to a player
clientMessage("<Steve> Hello!"); //clientmessage sent if item is a stick (if steve is spawned)
}
}Hxdro code not mine
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumSo you want them to follow you? Look at the companion modpe script created by natebit (pretty sure he was the creator).
Check out my game! It's an open-world, sandbox text adventure.
Follow @hexdro_
Hexdro © 2012-2015