• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Item restrictions

Status
Not open for further replies.

Shortyish

S

Shortyish

I'm making a Capture the Flag map and i was wondering how to not let people from a team pick up their own flag. Any solutions?
 
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:
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)
 
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.
Back
Top