• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

if you pick up one item, and then pick up another of same sort, how to make him die?

Status
Not open for further replies.
Level 6
Joined
Dec 6, 2009
Messages
168
Hi!
I want to know how to make a unit die if he picks up two of same items.

For example: I got my paladin, he picks up Potion of Divinity and uses it. And I want to make him die if he picks up Potion of Divinity again and uses it.
(if he not uses it he shall stay alive).

So I hope maby someone knows how to do this, cause it whould be helpfull for many people I think :ogre_haosis: .

THX!
 
  • Item Death
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Scroll of the Beast
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Key time) is stored as a Integer of (Key (Triggering unit)) in I_Hash) Equal to False
        • Then - Actions
          • Hashtable - Save 1 as (Key time) of (Key (Triggering unit)) in I_Hash
        • Else - Actions
          • Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in I_Hash
          • Unit - Kill (Triggering unit)
 

Attachments

  • Item Death.w3x
    16.9 KB · Views: 36
Level 6
Joined
Dec 6, 2009
Messages
168
thx alot:D

Hmm, while I am on this, on my map I got different ''Fruit items'' so if you use one you get a power. but theese aint the same items, so what if I whould use one of them and pick up another and use it. how to make the guy die then?

Still thx! (this was the thing I actually needed help with.... sorry for not being this clear:()
 
Status
Not open for further replies.
Top