var yourItemsId;
var itemCount;
function modTick()
{
for(i=9;i<=44;i++)
{
if(Player.getInventorySlot(i)==yourItemsId)
{
itemCount=Player.getInventorySlotCount();
addItemInventory(yourItemsId,-itemCount);
}
}
This allows you to check how many of your item are in the inventory, then remove it.
I can pm you how to put a GUI bar if you want me to.
There's the problem: ProgressBars do not resemble an experience bar in any way. I don't want to give everything away, but this is what needs to be done: put elements in an array and show images based on the array.
True. I guess it won't be a lot harder this way.
Or even you create an xp variable, and refresh the image with modTick (don't really know about the lag it would cause though)
If you refresh on exp change, I'd say none. After all, risk runs like 700 lines in modtick. Maybe more
That's right
My personal record for a mod must be 2500 lines for 400 modtick maximum :3
Edit : However modPE scripts actually are slow. For example a simple code I used with 3 combined for() to generate a custom biome takes more than 5 minutes to replace a couple of thousands blocks only.
Btw did you know that it was your challenge that inspired me for this mod ?
I assumed it was my challenge! but, I made the first ever new biome script. Congrats though! My biome took like 10 minutes to create, but thats cuz it was in a 50x100x50 span area randomly on the map. All in all, modpe is pretty slow, butI wouldn't nesacarily say that it is laggy. Back on topic, I definately think that it could handle updating gui pictures in an if statement. So, Metamorphisis, You should put a variable set to the xp, and when it changes, have modtick detect it and update the gui.
try something like this
var xp = 0;
var recordedxp = 0;
function updateGUI(){
//update gui here based on your desires
}
function modTick(){
if(xp !== recordedxp){
updateGUI();
recordedxp = xp;
}
//now add a way to get xp
how to make for the Modtick that an Widget that change everytime you get an experience?
ANY HELP WILL BE HIGHLY APPRECIATED AND WILL BE GIVEN FULL CREDITS WHEN I'VE DONE THE ENCHANTMENT MOD EXPERIENCE UPDATE
Just Having A Break in creating mods
2. ModTick().... Just set the progress of the ProgressBar with it...
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]
Like?
you will put it on all variable ?
var exp = "[1,2,3,4,5,6,7,8,9,10]";???
Just Having A Break in creating mods
There's the problem: ProgressBars do not resemble an experience bar in any way. I don't want to give everything away, but this is what needs to be done: put elements in an array and show images based on the array.
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]
If you refresh on exp change, I'd say none. After all, risk runs like 700 lines in modtick. Maybe more
Follow @Darth377Apps
Please check out my Twitter account!

I have been working on a few games!
Give me ALL THE INTERNETS!
I assumed it was my challenge! but, I made the first ever new biome script. Congrats though! My biome took like 10 minutes to create, but thats cuz it was in a 50x100x50 span area randomly on the map. All in all, modpe is pretty slow, butI wouldn't nesacarily say that it is laggy. Back on topic, I definately think that it could handle updating gui pictures in an if statement. So, Metamorphisis, You should put a variable set to the xp, and when it changes, have modtick detect it and update the gui.
try something like this
var xp = 0; var recordedxp = 0; function updateGUI(){ //update gui here based on your desires } function modTick(){ if(xp !== recordedxp){ updateGUI(); recordedxp = xp; } //now add a way to get xpFollow @Darth377Apps
Please check out my Twitter account!

I have been working on a few games!
Give me ALL THE INTERNETS!
Just Having A Break in creating mods