Item boolean?

Tawnttoo

New Member
Reaction score
36
Does there exist a boolean to check if the target of an action is an item? I'm trying to restrict players from destroying/taking items that don't belong to them. I'm using this trigger:
Trigger:
  • NoItemDestruction
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Issued order) Equal to (Order(smart))
          • (Issued order) Equal to (Order(attack))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Not equal to (Owner of (Target item of issued order))
        • Then - Actions
          • Unit - Pause (Triggering unit)
          • Unit - Order (Triggering unit) to Stop
          • Unit - Unpause (Triggering unit)
          • Floating Text - Create floating text that reads This item is not mi... above (Triggering unit) with Z offset 5.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Floating Text - Show (Last created floating text) for (Player group((Owner of (Triggering unit))))
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.40 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds
        • Else - Actions
However, this trigger fires every time you use the "smart" and "attack" orders to an object, including enemy units. Any solutions?
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
its an item comparison

if (target item of issued order) Equal No item
 

Tawnttoo

New Member
Reaction score
36
It worked with
Code:
(Target item of issued order) [U]Not equal[/U] to No item
Thanks!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top