• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How to allow only 3 teams to target an creep shop ?

Status
Not open for further replies.
Level 8
Joined
Aug 8, 2011
Messages
297
How to allow only 3 teams to target an creep shop ?

I got a problem in Footmen Frenzy map, players from other team can from fx left corners shops... is there a way i can make it possible that only 3 players from top left corner can buy from the shop in there base ?
 
Level 4
Joined
Aug 5, 2011
Messages
99
go to the properties of the unit... double click it and just change the owner. if they arent placed at start or u wanne keep the color, u can do it with a trigger
  • trigger
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit - Change ownership of your shop 0005 <gen> to Player 1 (Red) and Retain color
 
Level 5
Joined
Jul 18, 2010
Messages
159
and you need only one...
let me explain

3 Players are allied
1 Player has shop
2 other players that are allied can buy items at this shop
so you need only one owner...

or make 4 players team 3 Human and 1 AI make them allied and make the shop owner equal to AI player

understand?


edit:
oh and if you want to make only 3 teams (like in topic name) not players, can buy in this shop... you have to make additional player (for example 12 Brown) and make him owner of the shop then use triggers to set alliance with these teams players with him
 
Level 5
Joined
Jul 18, 2010
Messages
159
give me few minutes

edit:
You can make trigger which will change owner when the first one will leave the game

edit2:
oh you don't need it :) you can still buy when the owner leaves the game ;)
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Well you could clear the selection when an enemy selects the shop...

Something like this:

  • Clear Selection
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
      • Player - Player 5 (Yellow) Selects a unit
      • Player - Player 6 (Orange) Selects a unit
      • Player - Player 7 (Green) Selects a unit
      • Player - Player 8 (Pink) Selects a unit
      • Player - Player 9 (Gray) Selects a unit
      • Player - Player 10 (Light Blue) Selects a unit
      • Player - Player 11 (Dark Green) Selects a unit
      • Player - Player 12 (Brown) Selects a unit
    • Conditions
      • Multiple ConditionsAnd - All (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to (==) Goblin Merchant
          • ((Triggering player) is an enemy of (Owner of (Triggering unit))) Equal to (==) True
    • Actions
      • Selection - Clear selection for (Triggering player)
 
Last edited:
Level 14
Joined
Apr 20, 2009
Messages
1,543
I thought this was pretty basic.. Really, really basic actually..
There are other solutions though, but this seemed the easiest one in my eyes.

If you're having problems doing this, just tell us and we'll explain how to do it correctly and how it works.
Also, you might want to read up on some GUI tutorials if you are having trouble with this trigger, this is fundamental basics of GUI.


Here is what you'll need to use in the trigger:
  • Clear Selection
    • Events
      • Player - Selection Event
    • Conditions
      • And - Multiple Conditions
        • Conditions
          • Unit-Type Comparison
          • Boolean Comparison
    • Actions
      • Selection - Clear Selection For Player
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Yeah, you could also take a look at arcane vault.

Shop Sharing and Shop Purchase Item abilities.
Items Made instead of Items Sold.

Should fix your problem too...
There are lots of solutions actually, it's just a matter of what you preferr.
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
maybe, but i cant find an option like that... someone knows an already implentet option to give allied units rights buying items ?

Yes, it's in my previous post xD
Just look at Arcane Vault.
If you put 2 arcane vaults on the map one of yourself and one of the enemy you'll see that you're unabled to buy items from the enemy shop but only from your own.

Just add these two abilities to the shop:
Shop Sharing and Shop Purchase Item
Then make sure that you put the items in the Items Made section instead of Items Sold.
Now the owner or shared owner of the shop are the only ones that can buy items from the shop.
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
the shop is not selling items, its selling units, what to do then ?

"Just add these two abilities to the shop:
Shop Sharing and Shop Purchase Item" this i have done now :)

Ow, I've missread. That kind of changes the situation. Just give me a while to figure it out ;)

EDIT: if you remove the Select Unit ability you will be unabled to buy units from enemy shops.
However you will be abled to buy units from your own shop at all times, even when no one is in range of the shop.

(Forget about the Shop Sharing and Shop Purchase Item part)
 
Last edited:
Status
Not open for further replies.
Top