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

How to 'Item slot = empty ?'

Status
Not open for further replies.
Level 20
Joined
Jul 14, 2011
Messages
3,213
I've been testing. You can check the items life. If it's greater than 0 it means the slot is busy. If it's equal to 0 it means the slot is empty since minimum item life is at least 0.001.

Doesn't show anything if I have something in slot 1 (obviously).

  • Melee Initialization
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
      • (Current life of (Item carried by Paladin 0000 <gen> in slot 1)) Equal to 0.00
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Game - Display to (All players) the text: (- Slot + ((String((Integer A))) + ( holds: + (Name of (Item carried by Paladin 0000 <gen> in slot (Integer A))))))
          • Game - Display to (All players) the text: (Item life: + (String((Current life of (Item carried by Paladin 0000 <gen> in slot (Integer A))))))))
attachment.php
 

Attachments

  • Test.jpg
    Test.jpg
    82 KB · Views: 400
Last edited:
Level 4
Joined
Jul 17, 2011
Messages
55
like this?

  • check
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item carried by Mountain King 0000 <gen> in slot (Integer A)) Equal to No item
            • Then - Actions
              • Game - Display to (All players) the text: ((Item slot + (String((Integer A)))) + is empty.)
            • Else - Actions
              • Game - Display to (All players) the text: (Name of (Item carried by Mountain King 0000 <gen> in slot (Integer A)))

test map below:
 

Attachments

  • test.w3x
    8.8 KB · Views: 38
Level 20
Joined
Jul 14, 2011
Messages
3,213
Yeah.. but I've never seen that boolean "Item carried Equal to No Item"... Otherwise, as said before, check if the item hp is greater than 0, if it's there's an item.
 
Status
Not open for further replies.
Top