[ASK]increasing and decreasing allstat per hit

omniversal

New Member
Reaction score
0
I want to ask how to make when we acquire a special item (example : claw of attack ) with that item when we attack our hero stat + 1000 per hit so every times the hero with special item attack any kind of enemis ( not include building/building is immune ) the allstat of hero will increase 1000/hit and the enemis allstat that we attacked will decrease 10000 , so everytimes we attack the enemis the enemis allstat will decrease by 10000/hit

Note : please put the example map for me to understand easily and for me to able to change it to learn farther and if it possible the trigger for increasing allstat and decreasing allstat is divided ( pls in GUI version )
 

DioD

New Member
Reaction score
57
no way to drop stats negative from GUI.

other trivial.

Check unit is attacked event
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
Use that trigger. I made it quickly and it covers everything you want to have.
I don't give you map to make you find out editor and learn more about it.
Trigger:
  • Waza
    • Events
      • A unit gets attacked
    • Conditions
      • Attacker has item "claws of attack" in his inventory
    • Actions
      • If then else multiple functions
        • If - conditions
          • If Attacked unit is not <u>unit type</u> of building <b><u>or</u></b> immune to magic equal to true
        • Then - actions
          • Hero - Add X points of strength to attacker unit
          • Hero - Add X points of agility to attacker unit
          • Hero - Add X points of strength to attacker unit
          • If ((Attacked Unit) is hero equal to true) and (Agility(include bonuses) of attacked hero is more of X) and (Strength blablabla....) then (Hero - Reduce Agility of (Attacked unit) by X (Hero - Reduce Strength blablabla....) else Do nothing
        • Else - Actions
 

TomTTT

New Member
Reaction score
44
I kinda rushed it, but it works. 1000 sounds pretty much for me so i only did it 5, but you can change it in the triggers. :thup:
 

Attachments

  • Increase attributes by TomTTT.w3x
    14.7 KB · Views: 159

omniversal

New Member
Reaction score
0
I kinda rushed it, but it works. 1000 sounds pretty much for me so i only did it 5, but you can change it in the triggers. :thup:

hmm can you help to change that "condition" part of the trigger to something like this maybe:
(Item-type of (Last created item)) Equal to Claws of Attack +15 or (Item-type of (Item being manipulated)) Equal to Claws of Attack +15


and can you change this part : (Item carried by (Attacking unit) in slot (Integer A)) Equal to ITEM
<<< because i want that the trigger which increase and decrease stat are still active even when the item in any slot of hero inventory because the trigger like that i think only active if the item di the special slot !! So when i change the place of the item to other slot of my hero inventory the trigger will deactivated.

Note : Can you make it that this increase and decrease trigger is not function for building type enemy so when we hit the building our hero stat wont increase and builder stat wont decrease !! Tq :D
 

TomTTT

New Member
Reaction score
44
hmm can you help to change that "condition" part of the trigger to something like this maybe:
(Item-type of (Last created item)) Equal to Claws of Attack +15 or (Item-type of (Item being manipulated)) Equal to Claws of Attack +15


and can you change this part : (Item carried by (Attacking unit) in slot (Integer A)) Equal to ITEM
<<< because i want that the trigger which increase and decrease stat are still active even when the item in any slot of hero inventory because the trigger like that i think only active if the item di the special slot !! So when i change the place of the item to other slot of my hero inventory the trigger will deactivated.

Note : Can you make it that this increase and decrease trigger is not function for building type enemy so when we hit the building our hero stat wont increase and builder stat wont decrease !! Tq :D

Umm the thing that i did with the Integer A always works. means, try 6 times the following action: If ITEM (which we set before to what i created) in slot (Integer A) (which is the one we are on now, depending what part of the loop is this) in the attacking unit's inventory, then do bla bla bla. It should work wherever the item is in the inventory. About the attributes part, it should decrease but only to Heroes, other units have no attributes. Please explain a little more cause im not sure i got what you mean.
 

omniversal

New Member
Reaction score
0
Umm the thing that i did with the Integer A always works. means, try 6 times the following action: If ITEM (which we set before to what i created) in slot (Integer A) (which is the one we are on now, depending what part of the loop is this) in the attacking unit's inventory, then do bla bla bla. It should work wherever the item is in the inventory. About the attributes part, it should decrease but only to Heroes, other units have no attributes. Please explain a little more cause im not sure i got what you mean.

Hmmm sorry like this i mean
1.in the condition part : (Item carried by (Attacking unit) in slot (Integer A)) Equal to ITEM can you change to like this maybe :(Item-type of (Item being manipulated)) Equal to Tome of Experience
because if the trigger like this : (Item carried by (Attacking unit) in slot (Integer A)) Equal to ITEM <<< is hard for me to change the special item to other item because if the item in npc and not in the ground like your map that will become useless so if you ( maybe ) change like this : (Item-type of (Item being manipulated)) Equal to Tome of Experience << so i will be able to change the special item from tome of experience to claw of attack or to any item i want easier even if the item not in the ground ( that mean you must buy the item and the item in npc )

2.Can you change the trigger that if we hit the building our allstat wont increase and building stat wont decrease !! because in your map when i put the building and i hit it my allstat increase. That mean the building immune from increasing and decreasing trigger.

pls help again tq
 

TomTTT

New Member
Reaction score
44
Item type of item being manipulated... well, What item is being manipulated? You can't use such referring, becuase by the event, no item is benig manipulated. No more need in this ITEM thing, no variables needed. Changed it and now it works and i hope it's the way you like it.
 

Attachments

  • Increase attributes by TomTTT.w3x
    14.8 KB · Views: 158

omniversal

New Member
Reaction score
0
Item type of item being manipulated... well, What item is being manipulated? You can't use such referring, becuase by the event, no item is benig manipulated. No more need in this ITEM thing, no variables needed. Changed it and now it works and i hope it's the way you like it.


Wow tq thats what i want :D

hmm can you help me for the last bro ?
i have a problem and this map i get :

1. Can you change this map to when we acquire the special item , everytime we attack we will get gold per hit about 10% of hero base damage include damage bonus ( so we will get 10% gold/hit that base on hero base damage include bonus damage but the critical damage is not be counted ) the chance

Note : i can change the persen as i want and the trigger gold only active if we get/carry the item so the trigger will deactivated if the item droped and the item is on npc not in the ground so i can the item to any item i want easily and i dont want that item must to be click to activated and deactivated like this map

2. please add floating text everytimes we get a gold so as you know we get gold base on hero damage + bonus damage so..if our hero base damage is 100 + 100 include bonus , everytimes we attack we will get 200 gold and there will be spawn floating text above unit that we attacking and the floating text will read : +200 and the floating text will float slowly to upper and dispeard without stuck ( in this map the text is floating too when we get a gold but i dont really like the floating text because its looklike the floating text is stucking

I hope you solve my problem bro :)
 

Attachments

  • Gold.w3x
    14.7 KB · Views: 170

TomTTT

New Member
Reaction score
44
Ok so... fixed a part of it, but the variable part where you set DAMAGE to (Damage Taken) isn't working. It only refers to the Unit is taking damage event, which apparently don't exist. I tried a lot and i couldnt figure it out. Dont everything except for it... I'm sure i'll find it soon, and i'll edit this post as soon as i know how to.

EDIT: did a little research and only thing i found GUI - friendly is a damage detection system, which it's biggest part is JASS but you can edit it with GUI. You can try base your trigger on it, here it is:
http://www.thehelper.net/forums/showthread.php?t=131287
If your going by it, you still need the whole trigger, which is this:

Trigger:
  • Activate
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Claws of Holy Crap!
    • Actions
      • Set Claw[(Player number of (Owner of (Triggering unit)))] = True
      • Floating Text - Create floating text that reads HOLY CRAP! above Blood Mage 0000 &lt;gen&gt; with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set textActivated[(Player number of (Owner of (Triggering unit)))] = (Last created floating text)
      • Floating Text - Set the velocity of textActivated[(Player number of (Owner of (Triggering unit)))] to 32.00 towards 90.00 degrees
      • Floating Text - Change textActivated[(Player number of (Owner of (Triggering unit)))]: Disable permanence
      • Floating Text - Change the lifespan of textActivated[(Player number of (Owner of (Triggering unit)))] to 1.50 seconds
      • Floating Text - Change the fading age of textActivated[(Player number of (Owner of (Triggering unit)))] to 0.05 seconds


Trigger:
  • Each attack
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • Claw[(Player number of (Owner of (Attacking unit)))] Equal to True
    • Actions
      • Set DAMAGE = ((Damage taken) / 10.00) -&gt; this part.... is the issue.
      • Player - Add (Integer(DAMAGE)) to (Owner of (Attacking unit)) Current gold
      • Floating Text - Create floating text that reads (+ + (String(DAMAGE))) above (Attacking unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set textGold[(Player number of (Owner of (Attacking unit)))] = (Last created floating text)
      • Floating Text - Set the velocity of textGold[(Player number of (Owner of (Attacking unit)))] to 32.00 towards 90.00 degrees
      • Floating Text - Change textGold[(Player number of (Owner of (Attacking unit)))]: Disable permanence
      • Floating Text - Change the lifespan of textGold[(Player number of (Owner of (Attacking unit)))] to 1.50 seconds
      • Floating Text - Change the fading age of textGold[(Player number of (Owner of (Attacking unit)))] to 0.05 seconds
 

omniversal

New Member
Reaction score
0
Ok so... fixed a part of it, but the variable part where you set DAMAGE to (Damage Taken) isn't working. It only refers to the Unit is taking damage event, which apparently don't exist. I tried a lot and i couldnt figure it out. Dont everything except for it... I'm sure i'll find it soon, and i'll edit this post as soon as i know how to.

EDIT: did a little research and only thing i found GUI - friendly is a damage detection system, which it's biggest part is JASS but you can edit it with GUI. You can try base your trigger on it, here it is:
http://www.thehelper.net/forums/showthread.php?t=131287
If your going by it, you still need the whole trigger, which is this:

Trigger:
  • Activate
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Claws of Holy Crap!
    • Actions
      • Set Claw[(Player number of (Owner of (Triggering unit)))] = True
      • Floating Text - Create floating text that reads HOLY CRAP! above Blood Mage 0000 &lt;gen&gt; with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set textActivated[(Player number of (Owner of (Triggering unit)))] = (Last created floating text)
      • Floating Text - Set the velocity of textActivated[(Player number of (Owner of (Triggering unit)))] to 32.00 towards 90.00 degrees
      • Floating Text - Change textActivated[(Player number of (Owner of (Triggering unit)))]: Disable permanence
      • Floating Text - Change the lifespan of textActivated[(Player number of (Owner of (Triggering unit)))] to 1.50 seconds
      • Floating Text - Change the fading age of textActivated[(Player number of (Owner of (Triggering unit)))] to 0.05 seconds


Trigger:
  • Each attack
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • Claw[(Player number of (Owner of (Attacking unit)))] Equal to True
    • Actions
      • Set DAMAGE = ((Damage taken) / 10.00) -&gt; this part.... is the issue.
      • Player - Add (Integer(DAMAGE)) to (Owner of (Attacking unit)) Current gold
      • Floating Text - Create floating text that reads (+ + (String(DAMAGE))) above (Attacking unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set textGold[(Player number of (Owner of (Attacking unit)))] = (Last created floating text)
      • Floating Text - Set the velocity of textGold[(Player number of (Owner of (Attacking unit)))] to 32.00 towards 90.00 degrees
      • Floating Text - Change textGold[(Player number of (Owner of (Attacking unit)))]: Disable permanence
      • Floating Text - Change the lifespan of textGold[(Player number of (Owner of (Attacking unit)))] to 1.50 seconds
      • Floating Text - Change the fading age of textGold[(Player number of (Owner of (Attacking unit)))] to 0.05 seconds



hmm sorry to annoying you but can you make the demomap for me ??? because iam not to good about variable.

And for this part : Set Claw[(Player number of (Owner of (Triggering unit)))] = True
Floating Text - Create floating text that reads HOLY CRAP! above Blood Mage 0000 <gen> with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
<<< can we change this "above Blood Mage 0000 <gen>" to "Above Triggering unit" so with this any hero who acquire this item will activate the trigger and then can you make that we get the gold only base on 10% of hero base damage + bonus damage


oh ya .. and for the trigger to increase and decrease allstat hero per attack can you add to when we attack we will get 1000hp/hit (we cant get hp when we attack building ) ??

Note : pls in GUI trigger because i dont know about Jass. tq
 

TomTTT

New Member
Reaction score
44
Umm sure :) ill edit this post as soon as im done. Luckily you prefer his in GUI, cause the only thing i know in JASS is how it's called :D

EDIT: got it, but im having a little problem with editing the attributes. Maybe you can find something else to improve? Have fun, btw - items are at the top right corner of the map. You got 500K life so just go there. Check it out, it's awsome. Lots of credit belong to who made this GUI damage detection system, he rocks. Tho i did make the best i could out of it.
 

Attachments

  • Special Items.w3x
    27.4 KB · Views: 162

omniversal

New Member
Reaction score
0
Umm sure :) ill edit this post as soon as im done. Luckily you prefer his in GUI, cause the only thing i know in JASS is how it's called :D

EDIT: got it, but im having a little problem with editing the attributes. Maybe you can find something else to improve? Have fun, btw - items are at the top right corner of the map. You got 500K life so just go there. Check it out, it's awsome. Lots of credit belong to who made this GUI damage detection system, he rocks. Tho i did make the best i could out of it.

hmmm sorry. but the trigger "Display damage" is not what i want.

1.Trigger "Power of Awesomeness" is not function.

2. On trigger "Stealh clock" >>> Set goldGain = (Integer((GDD_Damage / 10.00))) << when i change the 10.00 to 100.00 its become malfunction and only get 0 gold

3. Can you please change the trigger of "Stealth Cloak" and "Power of Awesomeness" that using "GDD_Damagesource" to maybe like this "Event response to triggering unit" so even if i change the hero or acquire by other hero it wont cause malfunction . Because when i tried to change GDD_Damagesource to Event response to triggering unit and the result are malfunction. so if you change maybe like this Event response to triggering unit i dont need to change it again because it will still active the trigger even i change the hero that acquire an item and if you make variabel like this "GDD_Damagesource" it hard for me to changed.

once again sorry :eek:
 

TomTTT

New Member
Reaction score
44
The part with stealth cloak, is because when you transfer real to integer, it's making all the not complete numbers won't show up. Integer means a FULL number, while Real means a cut number. I'm not sure im saying this right cause I dont speak english very well... But the point is:
Real: 2.435
Integer: 2
Converting 2.435 to Integer = 2
Converting 2 to Real = 2.000
And if you make the stealth cloak gain only damage dealth/100, the result is somewhere about the 0.200
So now convert 0.200 to integer = 0
About the 3rd thing, im sorry but i can't help. As i said before, i took it from Weep's GUI-Friendly damage detection. It wasn't made by me. I only copied it and used it and based on it. Means i can't change anything. But you can simply understand that GDD_Damgesource = attacking unit GDD_attackedunit = Triggering unit (attacked) GDD_Damage = Damage Dealt.

About the Power of Awesomeness isn't working, i said it before, yeah, The attributes won't changed tho i have no idea why :confused:
 

omniversal

New Member
Reaction score
0
The part with stealth cloak, is because when you transfer real to integer, it's making all the not complete numbers won't show up. Integer means a FULL number, while Real means a cut number. I'm not sure im saying this right cause I dont speak english very well... But the point is:
Real: 2.435
Integer: 2
Converting 2.435 to Integer = 2
Converting 2 to Real = 2.000
And if you make the stealth cloak gain only damage dealth/100, the result is somewhere about the 0.200
So now convert 0.200 to integer = 0
About the 3rd thing, im sorry but i can't help. As i said before, i took it from Weep's GUI-Friendly damage detection. It wasn't made by me. I only copied it and used it and based on it. Means i can't change anything. But you can simply understand that GDD_Damgesource = attacking unit GDD_attackedunit = Triggering unit (attacked) GDD_Damage = Damage Dealt.

About the Power of Awesomeness isn't working, i said it before, yeah, The attributes won't changed tho i have no idea why :confused:

iam not quite understand. but thank for all your help :thup:
 

omniversal

New Member
Reaction score
0
Can you just change the floating text gold on map "GOLD" to floating text gold like the special items map of yours (when we acquire stealh clock and hit the monster we will get gold and then the floating text gold appear right ?, nah the floating text gold on the GOld map to like floating text you floating text gold on your "Special item" map )
 

TomTTT

New Member
Reaction score
44
You want me to make the floating text like i did in Special Items to your map Gold? I'll do it later and edit this post.
 

TomTTT

New Member
Reaction score
44
umm yeah sorry I forgot.. I'll edit that now.
 

Attachments

  • Gold.w3x
    14.9 KB · Views: 174
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