Can I have some help with my ModPE code? It's supposed to spawn a zombie pigman, with a texture of a zombie,holding stick. But it won't spawn when I use my stick on dirt.
Can I have some help with my ModPE code? It's supposed to spawn a zombie pigman, with a texture of a zombie,holding stick. But it won't spawn when I use my stick on dirt.
Here is the code BTW.
1
function useItem(x,y,z,itemId,blockId,side)
2
{
3
if(itemId=280&blockId=3)
4
{
5
clientMessage("Please Work!");
6
spawnPigZombie(getPlayerX()+6,getPlayerY(),getPlayerZ(),280,"mob/zombie.png";
7
clientMessage("It worked!");
8
}
9
}
10
function attackHook(attacker, victim)
11
{
12
}
13
function modTick()
14
{
15
}
16
[/quote][quote=3xGaming13;/comments/30353883]
Can I have some help with my ModPE code? It's supposed to spawn a zombie pigman, with a texture of a zombie,holding stick. But it won't spawn when I use my stick on dirt.
Here is the code BTW.
1
function useItem(x,y,z,itemId,blockId,side)
2
{
3
if(itemId=280&blockId=3)
4
{
5
clientMessage("Please Work!");
6
spawnPigZombie(getPlayerX()+6,getPlayerY(),getPlayerZ(),280,"mob/zombie.png";
7
clientMessage("It worked!");
8
}
9
}
10
function attackHook(attacker, victim)
11
{
12
}
13
function modTick()
14
{
15
}
16
Haha I'm laughing at the answers. You simply must change if(itemId==280&blockId==3) to if(itemId==280 && blockId==3) Don't worry good sir! People don't keep up, you CAN spawn zombie pigman on iOS now, with 0.5. I have android, however, so I do not know what the new function is, as I have no use for it yet, but I believe you are correct. I can't wait for 0.6, I saw treebl's preview where we can now create items with new ID's And food items!
Rollback Post to RevisionRollBack
Back to modding! Follow me on Twitter @byteandahalf
To post a comment, please login or register a new account.
Here is the code BTW.
1
function useItem(x,y,z,itemId,blockId,side)
2
{
3
if(itemId=280&blockId=3)
4
{
5
clientMessage("Please Work!");
6
spawnPigZombie(getPlayerX()+6,getPlayerY(),getPlayerZ(),280,"mob/zombie.png";
7
clientMessage("It worked!");
8
}
9
}
10
function attackHook(attacker, victim)
11
{
12
}
13
function modTick()
14
{
15
}
16
CLICK SPOILER TO VIEW ANSWER
SPAWN PIGZOMBIE DOES NOT WORK
What other bugs does it have?
Java/C/C++ dev, server owner and hacker extraordinare
Back to modding! Follow me on Twitter @byteandahalf