I created an item for this unit, but he doesn't use it when i trigger him to

TooSlowFcker

New Member
Reaction score
10
also, when the player enters the region, he doesn't get money for each person he saves
please help me
[
Code:
Untitled Trigger 003
    Events
        Unit - A unit enters Starting Pointss <gen>
    Conditions
        (Unit-type of (Triggering unit)) Equal to YOUR SLAVE BIATCH
        (Number of units in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Wisp))) Greater than or equal to 1
    Actions
        Set red = (Number of players in PlayerGroupJail)
        Unit Group - Pick every unit in wispunitgroup and do (Unit - Kill (Picked unit))
        Player Group - Pick every player in PlayerGroupJail and do (Unit - Create 1 YOUR SLAVE BIATCH for (Picked player) at (Random point in Starting Pointss <gen>) facing Default building facing degrees)
        Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Human\Resurrect\ResurrectCaster.mdl
        For each (Integer A) from 1 to red, do (Player - Add 25 to (Triggering player) Current gold)
        Player Group - Pick every player in PlayerGroupJail and do (Player Group - Remove (Picked player) from PlayerGroupJail)
        Camera - Pan camera for (Owner of (Last created unit)) to (Position of (Last created unit)) over 1.00 seconds
        For each (Integer A) from 1 to red, do (Game - Display to (All players) the text: |c00ff03032|r|c00ff...)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Last created unit)) Equal to YOUR SLAVE BIATCH
            Then - Actions
                Hero - Create divine potion and give it to (Triggering unit)
                Hero - Create divine potion and give it to (Last created unit)
                Set item = (Last created item)
                Hero - Order (Last created unit) to use item
                Hero - Order (Triggering unit) to use item
            Else - Actions
it's really long
i want it so when they are revived, they're invulnerable, so i gave them a potion to use, but they dont use it
 

Jolly chap*

New Member
Reaction score
34
OMG. You triple posted. Within 24 hours of each post. Just edit your posts please.

EDIT: It won't work because you tell the Unit to Right-click an item. You have to left-click it to make it work. :)
 

Tyman2007

Ya Rly >.
Reaction score
74
If a hero isn't using the item then it won't work.

If a unit is using a hero's inventory and you use it with that unit the game will crash.
 

Jolly chap*

New Member
Reaction score
34
If a hero isn't using the item then it won't work.

If a unit is using a hero's inventory and you use it with that unit the game will crash.
Really? What about that Bear Syllabus uses in DotA? Doesn't it have Hero Inventory too? And it's just an ordinary unit as well.
 

Jolly chap*

New Member
Reaction score
34
Have you not read my post? Tell the unit to Left-Click the potion instead of Right-Clicking it. And make sure if the unit is not a Hero, add Hero Inventory ability to it. I do hope your unit is a Hero though?
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
you cannot order a unit to "left-click" anything. order him to use the item, it got to be somewhere under hero.
 

TooSlowFcker

New Member
Reaction score
10
yeah i did use the hero trigger use item
but whenever they spawn they never use it unless they have like 4 potions
 

Tyman2007

Ya Rly >.
Reaction score
74
Really? What about that Bear Syllabus uses in DotA? Doesn't it have Hero Inventory too? And it's just an ordinary unit as well.

i don't play DOTA because people play it way to much and are real bastards when it's your first or second time playing because you aren't very good. You either start playing dota when it started to get popular or don't start playing at all.

What i meant to say about units can't use items with a hero inventory that modifies attributes, like if a unit with a hero inventory picks up a tome then the game crashes.
 

Zeromatter

New Member
Reaction score
20
I believe that he's trying to make the unit use a potion of invulnerability. This *shouldn't* be a problem because normal units can be invulnerable too.

What I suggest you checking is if your unit *can* use items. The normal Inventory - Human (or whatever) has it set to NOT use items. (IE: They can pick up items, but not use it.)

Also make sure that the unit using the item actually has an inventory. If there's no inventory on the unit, obviously he cannot use it.
 
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