Started by
jeux2119
on
Topic category: Advanced modding
I dont have anything so far i tried but it all seems to fail i have my ai and tool done
but anyways im trying to make a gui pop out when right clicked and you can use the currency to summon the selected minion
for example there would be a normal necromancer so necro would cost 5 norm would cost 1
you use currency and summon the mob on me
You would need to set up the GUI and the currency. Then on the tool set up a "when item right clicked" and use the procedure "open screen for {entity} and pass location ... GUI". In the GUI you would need to create your buttons and way to insert the currency. Then on the button set up a procedure like "if get currency = 5 summon mob" or whatever you need.
oh sorry i mentioned that wrong i meant whenever you kill a entity it gives currency
For that you would need to set up a global variable/NBT to store he currency. Then crate your trigger (player kills entity) and do (set global variable to (get global variable + [currency amount]))
im not sure there is a player kills entity trigger
Use "entity dies" and then set an if statement for if source entity is type player/server player
im sorry i am not so good at variables and nbt too but im trying to make any ai when they die to my weapon they will drop a brain
oh wow you replied fast
im trying it out let me see if it works
it works thanks
No worries. For the currency, use a global variable if you are storing the currency to the player. use an NBT if you are storing the currency to an item.
Global variables are located on the main page, under the big plus button there are tabs. One is for Global Variables.
NBT data for items is located under the "items" tab in a procedure..
For dropping the brains I would recommend doing under the "entity dies" trigger create an if statement - "if main hand of source entity = [your item/weapon]" "do drop gem [your item/brain]
wow thanks
i didnt think to do that
hey by any chance do you know how to select if the player has 2 brains in there inventory
as the summon system is from a gui and i want better zombies to cost more so do you know
Yes you can do an "if entity has [brain] in inventory" "do for each item in inventory as item iterator" "do if item iterator = [brain] and get item size of item iterator is greater than it equal to [your number]" "do summon zombie"