• 0

    posted a message on Item requires hero to be in region to use

    Hey everyone so i got a fairly simple question but cant figure it out. So i have creep have a 50% chance to drop items on death "Scrap Material". Now my hero can pick these up and use them anywhere. I want to make it were the hero is required to be next to a refinery to use them. heres all the triggers and data i use.

    Events

    Unit - Any Unit dies

    Local Variables

    Random Integer = 0 <Integer>

    Conditions

    (Owner of (Triggering unit)) == 11

    Actions

    Variable - Set Random Integer = (Random integer between 1 and 2)

    General - If (Conditions) then do (Actions) else do (Actions)

    If

    Random Integer == 1

    Then

    Unit - Create 1 Scrap Material for player (Killing player) at (Position of (Triggering unit)) facing 270.0

    degrees (No Options)

    Then i have my unit (item), Item, and ability all setup. When the item is used it adds 1 vespian gas to player 11, whos resource pool is used for team creep upgrades.

    So this trigger drops the item which can then be picked up and is put in the heros inventory. and i want the item to only be able to be used when the here is in a certain region which is going to have a refinery in it.

    Thanks for your continued help and resources.

    Posted in: Data
  • To post a comment, please or register a new account.