Started by
aoooodi2
on
Topic category: Help with MCreator software
I would like to know how to use experience for ammo in a ranged item,if u have more than 1 exp u can use the item but if u dont have exp you cant use the item,also i wanna know if theres a way to make a cooldown.
You can have it set so the item doesnt use any item ammo, I think. After that have it so in the On Player Use trigger, it runs of procedure that removes XP, I think you should be able to have it add -5 XP since otherwise you can only remove full levels, but Im not sure.
In the trigger for other requirements for using the item simply have it return Amount of XP of Event/Target Entity > 1
If having it add -5 XP doesnt do anything, you could have it instead run a command of the /experience type, that I think exists.
As for the cooldown, there should be a cooldown option, but if there isnt you could have it so while its in the players hand every tick, it increases a specific NBT by 1, by setting the NBT to that NBT + 1 every tick. And then in the requirements trigger, have it return the amount of XP, like before but include it with a And < get NBT of type _____ > 40 >.
I hope this helps.
how can i use the trigger for other requirements?
the ´´can use range item´´ procedure?
I think that's the one, yeah.
oh ok,but for some reason i cant put a procedure in there,you know why that is?
For triggers that are supposed to return a true or false statement, I think you have to make the procedure before adding it.
You'd have to make the procedure separately, then go back and add it there. I think.
ok thanks,im going to try that
The get level of event\target entity procedure is right?
can u see the image?
thanks,the experience part works well but i dont understand how to do the cooldown part
In the Item Procedures tab, there's a block called Cooldown (Provided itemstack) for (100) ticks for (Event/target entity). I think if you just put this into your procedure that runs On Player Use you should be good.
And no, I can't see the image :/
no,it dosent work.
i also need help i have a item and when you right click it will take away 5 xp and when you run out it doesnt work anymore
In the procedures for version 2021.3, there is an item "Recharge" element