• 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.

[Trigger] Few Various Questions. I'm back!

Status
Not open for further replies.
Level 3
Joined
Sep 20, 2007
Messages
30
Hello everyone! Long time no see! I have few questions. Please answer it...

=========================================
1. This is the most important question. How i can make an item's charge increased if my hero pick an same-type item? The item charge will increased by the same number of the picked item. I think this is one of dota's triggers.

==========================================

2. How can i set the exp drops if a unit dies? Is every unit's exp drop same? Must i use trigger?

==========================================

3. If i buy an item, and i have same item shop on the map, how can i make the shop's item replenish interval cooldown is exactly same with other shops? Exactly that i've just meant is men same exactly with the cooldown spin too.

==========================================

4. Is anyone know what is GEM mode? It's occur when i click the wisp icon on bottom-left corner on the screen.

==========================================

5.Is anyone know what is the function of "Array" on the variable? HOw can i use that and When i must use that?

==========================================

6. Is anyone know elevator? what is the use of that thing?

==========================================

7. There are a "Target unit of issued order/abilty being cast". And why there aren't "Target point of issued order/abilty being cast"? Which trigger can be use in position of that function?

==========================================

8. How can i order a unit to cast my custom spell?

==========================================

9. How can i make a random number which used for 3 or more actions? Example:
-Random from 1 to 100
-If <30 then attack
-if 31<<60 then starfall
-if 61<<99 then impale
-if 100 then heal

==========================================

That's all. thank you very9 much!
 
Level 5
Joined
Jan 15, 2007
Messages
199
1. This is the most important question. How i can make an item's charge increased if my hero pick an same-type item? The item charge will increased by the same number of the picked item. I think this is one of dota's triggers.

  • Stack Tomes
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Last created item)) Equal to Tome of Experience
      • (Item carried by (Triggering unit) of type Tome of Experience) Not equal to No item
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Tome of Experience
            • Then - Actions
              • Item - Set charges remaining in (Item carried by (Triggering unit) in slot (Integer A)) to ((Charges remaining in (Item being manipulated)) + (Charges remaining in (Item carried by (Triggering unit) in slot (Integer A))))
              • Item - Remove (Item being manipulated)
            • Else - Actions
The item must have charges for this to work

2. How can i set the exp drops if a unit dies? Is every unit's exp drop same? Must i use trigger?

I am fairly sure the exp depends on the level of the dying unit, the level of the unit (if it is not a hero) can be found in Stats - Level.

If you want to customize it you must use triggers.

5.Is anyone know what is the function of "Array" on the variable? HOw can i use that and When i must use that?

This is for example having a variable with a value for each player, and you use something like this:

  • Kill Count
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set Kills[(Player number of (Owner of (Triggering unit)))] = (Kills[(Player number of (Owner of (Triggering unit)))] + 1)
7. There are a "Target unit of issued order/abilty being cast". And why there aren't "Target point of issued order/abilty being cast"? Which trigger can be use in position of that function?

There is a target point of issued order/ability being cast.

They are useful for custom abilities, such as an ability that adds experience to a target hero like:

  • Add Exp
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Add Experience
      • ((Target unit of ability being cast) is A Hero) Equal to True
    • Actions
      • Hero - Add 1000 experience to (Target unit of ability being cast), Hide level-up graphics
8. How can i order a unit to cast my custom spell?

  • Custom script: call IssueTargetOrder( udg_MyUnit, "(Orderstring)", udg_TheTarget )
9. How can i make a random number which used for 3 or more actions? Example:
-Random from 1 to 100
-If <30 then attack
-if 31<<60 then starfall
-if 61<<99 then impale
-if 100 then heal

  • Randomness
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set IntegerVariable = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • IntegerVariable Less than or equal to 33
        • Then - Actions
          • Unit - Order (Triggering unit) to Attack (Random unit from (Last created unit group))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • IntegerVariable Less than or equal to 66
            • Then - Actions
              • Unit - Order (Triggering unit) to Night Elf Priestess Of The Moon - Starfall
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • IntegerVariable Less than or equal to 99
                • Then - Actions
                  • Unit - Order (Triggering unit) to Undead Crypt Lord - Impale (Random unit from (Last created unit group))
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • IntegerVariable Equal to 100
                    • Then - Actions
                      • Unit - Order (Triggering unit) to Human Priest - Heal (Random unit from (Last created unit group))
                    • Else - Actions
 
Level 14
Joined
Nov 18, 2007
Messages
1,084
==========================================

4. Is anyone know what is GEM mode? It's occur when i click the wisp icon on bottom-left corner on the screen.

==========================================

I think Gem Mode lets you see stuff in the World Editor like you can hear unit's voices if you click on them and if you delete something, the editor plays its death animation.
 
Status
Not open for further replies.
Top