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: However, this trigger fires every time you use the "smart" and "attack" orders to an object, including enemy units. Any solutions?
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))
- Conditions
- Or - Any (Conditions) are true
- 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
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events