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

Item restrictions

Status
Not open for further replies.
Level 25
Joined
May 11, 2007
Messages
4,650
Event: a unit acquires an item
Condition: item type of acquired item equal to red flag
Action:
If owner of hero manipulating item equal to player 1 then hero - drop item from hero manipulating item.
else ---

repeat for every player (just copy and change to player 2, player 3, and make a new item for the other team).

PM me if you don't understand/need halp.
 
Last edited:
Level 9
Joined
Apr 3, 2008
Messages
700
LordDz, I think that your way will allow to move flag as it will not drop at the same point where it was picked.
It's a bit more complexive.
Smth like
  • Melee Initialization
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Flag A
          • ((Triggering player) is in (All allies of Player 1 (Red))) Equal to True
        • Then - Actions
          • Set TempPoint = <Position of Flag A>
        • Else - Actions
          • Set TempPoint = <Position of Flag B>
      • Item - Create (Item-type of (Item being manipulated)) at TempPoint
      • Custom script: call RemoveLocation( udg_TempPoint )
      • Item - Remove (Item being manipulated)
 
Level 7
Joined
Jul 20, 2008
Messages
377
Problem: The position of the flag is now the position of the unit.

Just store the position of the flag BEFORE it can be picked up. When it's dropped, update the flag location variables.
 
Status
Not open for further replies.
Top