• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Item Ability Level Up As Time Pass

Status
Not open for further replies.
Level 3
Joined
Nov 8, 2009
Messages
46
But its level of Item Ability. It still works? And when the hero(EACH HERO) hold that item it starts counting and stop when it is drop on the ground.
 
Level 3
Joined
Nov 15, 2012
Messages
32
1. Run one-shot Countdown Timer which elapse in 600.00 seconds and give unit abilities when a heroes acquire the item
2. If the heroes lose the item then remove the abilities and reset the Countdown Timer, else you can create a new Real variable as checkpoint of the Countdown Timer
3. If the Countdown Timer elapsed while the heroes still holding the item it will increase the abilities level

this way you can either have the abilities reset to level 1 or retain its level whether the heroes drop and re-acquire the item

I'll only give you the idea since I'm too lazy to make test map for someone else
 

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
No. U cant do like the above. U must create 2 items, each has different stats. Then create a countdown timer. When the timer elapsed, remove the current item and create a next level item, then give that item to the hero. I'll type u the trigger as soon as I could.
EDIT: U must create the 1st level item as undropable. Else it will make it very hard to make the trigger for it.
 
Level 3
Joined
Apr 6, 2012
Messages
22
  • Replacing Item
  • Events
    • Time - Every 600.0 seconds of game time
  • Conditions
  • Actions
    • For every (Integer A) from 1 to [MaxLevelOfYourItem] do Actions:
      • For every (Integer B) from 1 to [AmountOfHeroesToCheck] do Actions:
        • If (Conditions) then (Actions) else (Actions)
          • Hero[(Integer B)] has item of type Item[(Integer A)]
        • Actions
          • Item - Remove Item[(Integer A)] from Hero[(Integer B)]
          • Item - Add Item[((Integer A)+1)] to Hero[(Integer B)]
        • Else
Typed this straight into THW, so it might have some syntax problems but I believe it should do what you want it to...

You need 2 variables for this to work though (to be initiated earlier):
Hero[] = A unit array which contains all the units which you want to be affected by the item level ups.
Item[] = An item-type array which contains the item to be leveled up and all its different levels (which each have a different ability).

EDIT: Alternative method (not tested either):
  • Start Item Timer
  • Events
    • Hero - Hero aquires an item of type MyItem
  • Conditions
  • Actions
    • Countdown Timer - Start a non-repeating countdown timer with duration 600.0 seconds
    • Set MyItemLVLTimer[(Player number(Owner of (Triggering unit)))] = (Last created countdown timer)
    • Set MyItem_PlayerHasItem[(Player number(Owner of (Triggering unit)))] = True
  • Level up items
  • Events
    • Time - MyItemLVLTimer[1] expires
    • Time - MyItemLVLTimer[2] expires
    • Time - MyItemLVLTimer[3] expires
    • ...
  • Conditions
  • Actions
    • For every (Integer A) from 1 to 12 do Actions
      • If (Conditions) then (Actions) else (Actions)
        • Time remaining for MyItemLVLTimer[(Integer A)] Equal to 0.00
        • MyItem_PlayerHasItem[(Integer A)] Equal to True
      • Actions
        • Set MyItem_PlayerHasItem[(Integer A)] = False
        • Item - Remove MyItem from Hero[(Integer A)]
        • Item - Add MyItemLV2 to Hero[(Integer A)]
      • Else
Should probably not use this method though. I'm currently quite tired and just looking at it it doesn't feel right. Maybe someone can just use this as a template and improve on its method for you.
 

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
^ Wont work well. If the player can calculate the when the timer expires, before that, he threw the item out, it wont be leveled up and will never be leveled up again.
Therefore, I suggest u check if the hero still has that item or not. If he has, level up it (like what u show in ur trigger). If he doesnt, add him to a unit group. Whenever the hero acquire that item after being added to the unit group, he will instantly leveled up. After the leveled up, remove him from the unit group.
 
Status
Not open for further replies.
Top