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

[Solved] Make item undropable in death

Status
Not open for further replies.
Level 13
Joined
Oct 28, 2019
Messages
523
I´ve made an item undropable, when it dies (not exploding) the item dont drops,
but if the unit dies by explosion, it drops the itens when die, why this is happening, ive did a trigger that if a unit drops that item,
remove item from game, but is not working.

obs: theres other itens that dropps when unit dies, but this cannot

1675507813442.png
 
Level 13
Joined
Oct 28, 2019
Messages
523
Can you post the trigger? Maybe something is wrong with it

Also, make sure your units have this line set to false just in case

View attachment 423837
But have item that must drop in death, this specific cant be droped... as I explained, if killed normal it dont drops the item, but if killed by artilhary (exploded) the item drops....

how can I do a trigger like this: ]

An item appears in map
item type equal to..
remove item from game
 
Level 24
Joined
Feb 27, 2019
Messages
833
I dont know of any Event that detects when an item appears in map but you can achieve what you want in another way.

This will work for units. Set the item value of "Stats - Dropped when carrier dies" to True and use the trigger bellow.
  • Remove Item
    • Events
      • Unit - A unit Loses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Crown of Kings +5
    • Actions
      • Item - Remove (Item being manipulated)
This will make it so that Heroes cant lose the item. The action is probably not available in versions older than about 1.32 or 1.31.
  • Hero Acquire Item
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Crown of Kings +5
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Item - Set Item: (Item being manipulated)'s Boolean Field: Dropped When Carrier Dies ('idrp') to Value: False
If the action isnt available you can instead replace the item with an identical item but with "Stats - Dropped when carrier dies" set to False.
  • Hero Acquire Item
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Crown of Kings +5
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Item - Remove (Item being manipulated)
      • Hero - Create Crown of Kings +5 and give it to (Triggering unit)
 
Level 13
Joined
Oct 28, 2019
Messages
523
I dont know of any Event that detects when an item appears in map but you can achieve what you want in another way.

This will work for units. Set the item value of "Stats - Dropped when carrier dies" to True and use the trigger bellow.
  • Remove Item
    • Events
      • Unit - A unit Loses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Crown of Kings +5
    • Actions
      • Item - Remove (Item being manipulated)
This will make it so that Heroes cant lose the item. The action is probably not available in versions older than about 1.32 or 1.31.
  • Hero Acquire Item
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Crown of Kings +5
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Item - Set Item: (Item being manipulated)'s Boolean Field: Dropped When Carrier Dies ('idrp') to Value: False
If the action isnt available you can instead replace the item with an identical item but with "Stats - Dropped when carrier dies" set to False.
  • Hero Acquire Item
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Crown of Kings +5
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Item - Remove (Item being manipulated)
      • Hero - Create Crown of Kings +5 and give it to (Triggering unit)
Worked TY for reply.

Other question,
An unit has 1 claw of attack +3, if it picks other claw +3
the item turns in claw + 6.... help

  • Bounty 20
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Bounty Hunter 10
      • ((Hero manipulating item) has an item of type Bounty Hunter 10) Equal to True
    • Actions
      • Item - Remove (Item carried by (Hero manipulating item) of type Bounty Hunter 10)
      • Item - Remove (Item carried by (Hero manipulating item) of type Bounty Hunter 10)
      • Wait 0.10 seconds
      • Hero - Create Bounty Hunter 20 and give it to (Hero manipulating item)
this dont wo
 
Level 13
Joined
Oct 28, 2019
Messages
523
solved
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (UnitDwarf has an item of type Bounty Hunter 4) Equal to True
      • (UnitDwarf has an item of type Bounty Hunter 5) Equal to True
      • (UnitDwarf has an item of type Bounty Hunter 10) Equal to True
    • Then - Actions
      • Item - Remove (Item carried by UnitDwarf of type Bounty Hunter 1)
      • Item - Remove (Item carried by UnitDwarf of type Bounty Hunter 4)
      • Item - Remove (Item carried by UnitDwarf of type Bounty Hunter 5)
      • Item - Remove (Item carried by UnitDwarf of type Bounty Hunter 10)
      • Wait 0.10 seconds
      • Hero - Create Bounty Hunter 20 and give it to UnitDwarf
    • Else - Actions
      • Hero - Create Bounty Hunter 1 and give it to UnitDwarf
Im making item stack, the stack can varies 1-20, each "stack" is more strong than other, ive made 7 itens (1,2,3,4,5,10,20) stacks
making the unit more stronger with stacks I didnt know, so I decided make this way
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,875
Waits and global variables are just asking for trouble. Remember, that variable can get changed to something else during the Wait. The only exception is if you know for a fact that your trigger can't run again during that time.

Either use an Event Response that acts like a local variable or use a local variable.

According to this, (Hero manipulating item) will work just fine:
 
Status
Not open for further replies.
Top