questions about item with charges

millzy

Ultra Cool Member
Reaction score
44
how would i be able to make this item

Soul orb
every unit killed the orb will gain souls each soul increases damage by 5 max souls you can get is 10 on death you lose all the souls

the thing is i want the amount of souls the orb has to be displayed as charges e.g the orb has 8 souls there will be 8 charges
also how do i make it so that you cant click on the item to use the charges and when its set to 0(on death) the item isent removed
 

naughty

New Member
Reaction score
12
Well you'll make a trigger when the unit kills another unit:
Trigger:
  • Unit Dies
    • Events
      • Unit Dies
    • Conditions
    • Actions
      • Item - Set charges remaining in (Item carried by Killing Unit of type Soul Orb) to ((Charges remaining in (Item carried by Killing Unit of type Soul Orb)) + 1)

And another trigger when the hero dies:
Trigger:
  • Unit Dies
    • Events
      • Unit Dies
    • Conditions
    • Actions
      • Item - Set charges remaining in (Item carried by Dying Unit of type Soul Orb) to 0)


You will just add conditions. And this is handwrite so it might not be 100% accurate.

And i forgot for making it unable to be used "Stats - Actively Used = False"
 

Inflicted

Currently inactive
Reaction score
63
change something that sounds something like "Is Perishable" to False.

then when it gets to 0 charges it wont be removed.

as for the damage, id do a periodic event checking the amount of charges and setting the level of an ability given to the hero when picking up the item, try using the Item Ability "Hero Damage +5" or something like that and just set like 10 levels.

and for the limit just put an IF/ELSE statement checking that charges is not equal to 10 in naughty's first trigger.

In the case that your game may have errors, i recommend having other conditions to check for example that the killing unit is in fact a hero and that it has the item first.

il giv a demo map if you want.
 

millzy

Ultra Cool Member
Reaction score
44
well yer using a unit dies and if killing unit has my item will be alot better then
perodic event

then if unit dies set charges to 0
 

educator

New Member
Reaction score
9
naughty has the triggers for the charges, "actively used" false, "perishable" false
and the damage can be triggered
events
a unit is attacked
conditions
actions
cause (attacking unit) to deal (5*(number of charges for(attacking unit of type soul orb))
 

millzy

Ultra Cool Member
Reaction score
44
i want it to show the bonus damage so ill use the attack bonus item ability and give it 10 levels
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top