Drop, hide, and give items?

warroom99

New Member
Reaction score
15
i created a skill which summons a unit with an inventory...

so when the summoned unit dies i would hide the items until it summons another one, then i will give the newly summoned unit the item i hid...

what events/actions should i use?

*btw the summoned unit is summoned via trigger
 

rodead

Active Member
Reaction score
42
use the event -unit a unit spawn a summoned unit and store the items of the summoned unit upon death when it is created again give the stored items to the summoned units and so on.
 

Tom Jones

N/A
Reaction score
437
I would set up the item types of the items I wanted on the "summoned" unit at map initialization:
Code:
Setup Summons Items
    Events
        Map initialization
    Conditions
    Actions
        Set Summoned_ItemType[1] = Claws of Attack +15
        Set Summoned_ItemType[2] = Crown of Kings +5
        Set Summoned_ItemType[3] = Kelen's Dagger of Escape
        Set Summoned_ItemType[4] = Mask of Death
        Set Summoned_ItemType[5] = Orb of Frost
        Set Summoned_ItemType[6] = Tome of Power
And then when you "summon" the unit trough the trigger I would add this loop:
Code:
For each (Integer A) from 1 to 6, do (Actions)
    Loop - Actions
        Hero - Create Summoned_ItemType[(Integer A)] and give it to *The "Summoned" Unit*
 

darkbeer

Beer is Good!
Reaction score
84
hm, i think he means the summon has an empty inventory and can pickup items, so you cant set them up at map initalizion. (only a guess^^)

so i would do it like this:

global Variables: Item array: Summon_Item
First Trigger, executed when unit is summoned
Code:
Summon
    Ereignisse
        Unit - Unit summons another untit // EDIT: when ur unit is summoned through a trigger you simply need to adept the actions below and add them to the trigger that creates ur summon
    Bedingungen
        (Unit-type of (Summoned unit)) Gleich UR Unit Type
    Aktionen
        For each (Integer A) from 1 to 6, do (Actions)
            Schleifen - Aktionen
                Item - Show Summon_Item[(Integer A)]
                Held - Give Summon_Item[(Integer A)] to (Summoned unit)
        Trigger - Add to Summon Dies <gen> the event (Einheit - (Summoned unit) Stirbt)

Second Trigger, executed when summon dies
Code:
Summon Dies
    Ereignisse
    Bedingungen
    Aktionen
        For each (Integer A) from 1 to 6, do (Actions)
            Loop - Aktionen
                Set Summon_Item[(Integer A)] = (Item carried by (Triggering unit) in slot (Integer A))
                Held - Drop (Item carried by (Triggering unit) in slot (Integer A)) 
                Item - Hide (Summon_Item (Integer A))
from (Triggering unit)

Note: Sorry for having a german warcraft version^^, THIS IS NOT MUI
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top