so I have an adventure map that I am making, but I am also making a mod and texture pack to go with it. so I threw in some code to try to get an item to teleport you, send a client message, set your spawn, and clear your inventory of that item. but the clear inventory part is really screwing the mod over and crashing it.
ModPE.setItem(432,"blaze_rod",0,"Start Journey");
function useItem(x,y,z,blockId,itemId,side){
if(getCarriedItem()==432){
Entity.setPosition(Player.getEntity(),109,76,54);
Level.setSpawn(109,76,54);
clientMessage("You woke up blah blah blah on and on");
Heard of an app called AppNana? It's an app that rewards you for installing games, testing apps, watching adds, with Google Play, Amazon, and iTunes gift cards, and more! And the app, is completely free!
An easy way of earning Nanas is to add other people's Invite Codes. Whenever you invite someone or get invited, you get 2.5k nanas!
My code is t3305123, pm me your codes so we can just keep gettin nanas for doing pretty much nothing at all!
Heard of an app called AppNana? It's an app that rewards you for installing games, testing apps, watching adds, with Google Play, Amazon, and iTunes gift cards, and more! And the app, is completely free!
An easy way of earning Nanas is to add other people's Invite Codes. Whenever you invite someone or get invited, you get 2.5k nanas!
My code is t3305123, pm me your codes so we can just keep gettin nanas for doing pretty much nothing at all!
[p]Try this[/p]
ModPE.setItem(432,"blaze_rod",0,"Start Journey");[/p]
function useItem(x,y,z,blockId,itemId,side){[/p]
if(itemId==432){[/p]
Entity.setPosition(Player.getEntity(),109,76,54);[/p]
Level.setSpawn(109,76,54);[/p]
clientMessage("You woke up blah blah blah on and on");[/p]
Player.addItemInventory(432,-1,0);[/p]
}[/p]
}[/p]
If that doesnt work just change the places of -1 and 0[/p]
clientMessage("You woke up blah blah blah on and on");
Player.addItemInventory(432,-1,0);
}
}
If that doesnt work just change the places of -1 and 0
aha! thank you soio much
Rollback Post to RevisionRollBack
Heard of an app called AppNana? It's an app that rewards you for installing games, testing apps, watching adds, with Google Play, Amazon, and iTunes gift cards, and more! And the app, is completely free!
An easy way of earning Nanas is to add other people's Invite Codes. Whenever you invite someone or get invited, you get 2.5k nanas!
My code is t3305123, pm me your codes so we can just keep gettin nanas for doing pretty much nothing at all!
Heard of an app called AppNana? It's an app that rewards you for installing games, testing apps, watching adds, with Google Play, Amazon, and iTunes gift cards, and more! And the app, is completely free!
An easy way of earning Nanas is to add other people's Invite Codes. Whenever you invite someone or get invited, you get 2.5k nanas!
My code is t3305123, pm me your codes so we can just keep gettin nanas for doing pretty much nothing at all!
function levelEventHook(entity,eventType,x,y,z,data){
clientMessage ("blah blah blah");
}
Try this function then open a door
And kindly give credits to everyone who helped
cuz I'm looking forward to this mod
Yes ik it work for a door but nothing happened.
and I will.
Rollback Post to RevisionRollBack
Heard of an app called AppNana? It's an app that rewards you for installing games, testing apps, watching adds, with Google Play, Amazon, and iTunes gift cards, and more! And the app, is completely free!
An easy way of earning Nanas is to add other people's Invite Codes. Whenever you invite someone or get invited, you get 2.5k nanas!
My code is t3305123, pm me your codes so we can just keep gettin nanas for doing pretty much nothing at all!
Exploit. Everything.
To post a comment, please login or register a new account.
so I have an adventure map that I am making, but I am also making a mod and texture pack to go with it. so I threw in some code to try to get an item to teleport you, send a client message, set your spawn, and clear your inventory of that item. but the clear inventory part is really screwing the mod over and crashing it.
ModPE.setItem(432,"blaze_rod",0,"Start Journey");
function useItem(x,y,z,blockId,itemId,side){
if(getCarriedItem()==432){
Entity.setPosition(Player.getEntity(),109,76,54);
Level.setSpawn(109,76,54);
clientMessage("You woke up blah blah blah on and on");
Player.clearInventorySlot(Player.getSelectedSlotId());
}
}
what is wrong with this plz tell me
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI think nothing is wrong...
Try this to find the error:
function useItem(x,y,z,blockId,itemId,side){
try{
if(getCarriedItem()==432){
Entity.setPosition(Player.getEntity(),109,76,54);
Level.setSpawn(109,76,54);
clientMessage("You woke up blah blah blah on and on");
Player.clearInventorySlot(Player.getSelectedSlotId());
}
}catch(error){
clientMessage("This is the Error: " + error);
}
}
Cant the mod will crash before that will return
Still doesnt work. Crashes again.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumNo. Or the problem is anywhere else.
ModPE.setItem(432,"blaze_rod",0,"Start Journey");[/p]
function useItem(x,y,z,blockId,itemId,side){[/p] if(itemId==432){[/p] Entity.setPosition(Player.getEntity(),109,76,54);[/p] Level.setSpawn(109,76,54);[/p] clientMessage("You woke up blah blah blah on and on");[/p] Player.addItemInventory(432,-1,0);[/p] }[/p] }[/p]
If that doesnt work just change the places of -1 and 0[/p]
aha! thank you soio much
I have one more thing..
How do I get this to work?
I looked on Connor's github page list but there's nothing on it about this hook.
function levelEventHook(event,eventType,x,y,z,data){
clientMessage("blah blah blah");
}
No problem
function levelEventHook(entity,eventType,x,y,z,data){
clientMessage ("blah blah blah");
}
Try this function then open a door
And kindly give credits to everyone who helped
cuz I'm looking forward to this mod
Nyimak
Yes ik it work for a door but nothing happened.
and I will.