Item to give percentage stats attribute

apostolis

New Member
Reaction score
1
Hi helpers.My todays post is for making an item to give percentage stats attribute.For examble to make an item tha gives 10%agility to the unit that is equiped with it.Any Ideas that may work???
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Trigger:
  • Set TempInteger = ((Agility of (Triggering unit) (Exclude bonuses)) x (Integer(0.10)))

To get 0.10 you need to convert an integer to a real.
 

Ignitedstar

New Member
Reaction score
1
Yeah... The problem after that is, you would have to update that value every time the unit's "base" stat changes either by level ups or items.
 

apostolis

New Member
Reaction score
1
yes but i cannot find the connction from event ot Conditition.What would it be.That it what i made

ITEM
Events
Unit - A unit Acquires an item
Conditions
(Matching item) Equal to Skull
Actions
Set Skull = (Item carried by (Triggering unit) of type Corrupted Artifact)
Hero - Modify Agility of (Triggering unit): Add ((Integer(0.15)) x (Agility of (Triggering unit) (Include bonuses)))
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Dont bother setting the Skull variable. Just move that item carried etc to the condition
 

akuzaid93

New Member
Reaction score
3
why not checks every 1 second? or the carrying units gains a level?
I believe this will works,

Set TempInteger = 0
Set TempInteger = ((Agility of (Triggering unit) (Exclude bonuses)) x (Integer(0.10)))
Hero - Modify Agility of (Triggering unit): Add ((TempInteger) x (Agility of (Triggering unit) (Exclude bonuses)))

so TempInteger will always be 0 and gives value according to attributes of owning unit.
 

NeuroToxin

New Member
Reaction score
46
@Akuzaid93
TempInteger will always be reset to the new units agility real, there is no need to reset it.

@apostolis
Are you setting their agility just when they pick up the item? Or when they acquire it more appropriately said, or, do you want it to be a thing where they gain the agi, then they gain or lose pieces of it depending on what happens in the game?
 

apostolis

New Member
Reaction score
1
NeuroToxin.I just want when a hero has the item in his inventory to take he Attribute bonus.When it is equiped with this item to gain attribute just that and if it loses the item to lose the percentage bonus
 

NeuroToxin

New Member
Reaction score
46
Heres what you can do, is the attribute bonus permanent? if not then you need a variable array of type real.
Trigger:
  • Item
    • Events
    • Unit - A Unit acquires an item
    • Conditions
    • Item type of (Item being manipulated) equal to AgilityBonus10Percent
    • Actions
    • set TempReal[1] = Agility of (Hero manipulating item) * .10
    • Hero - Add TempReal[1] Agility to (Hero manipulating item)

And then a similar trigger for if/when he drops it.
 

apostolis

New Member
Reaction score
1
ITEM
Events
Unit - A unit Acquires an item
Conditions
(Item-type of (Item being manipulated)) Equal to Dwarven Ring of Protection +4
Actions
Set TempReal = ((Agility of (Hero manipulating item) (Include bonuses)) x (1 / 10))
Hero - Modify Agility of (Hero manipulating item): Add TempReal


this is what i made with tempreal=integer but it did not worked properly.maybe i dont know how to make the one you made :((
 

Solu9

You can change this now in User CP.
Reaction score
216
Heres what you can do, is the attribute bonus permanent? if not then you need a variable array of type real.
Trigger:
  • Item
    • Events
    • Unit - A Unit acquires an item
    • Conditions
    • Item type of (Item being manipulated) equal to AgilityBonus10Percent
    • Actions
    • set TempReal[1] = Agility of (Hero manipulating item) * .10
    • Hero - Add TempReal[1] Agility to (Hero manipulating item)

And then a similar trigger for if/when he drops it.

I dont' know if Im off here. But shouldn't "set TempReal[1] = Agility of (Hero manipulating item) * .10" be *1.10?
Normally if you times a number with 0.10 it will be set to 10% of the original number instead of adding 10%.
Just a thought.
 

NeuroToxin

New Member
Reaction score
46
Wrong, we arent setting his agility in that one, we're getting 10% of it, then adding that to the heroes agility.
 
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