Sell Items only for a specific Faction

dyablohunter

New Member
Reaction score
2
I know not even the latest DOTA map has this... and maybe there is a good reason, maybe not. The fact that u can buy items from the enemy's base vendors is pretty stupid. I have been trying to come up with a way to make "taverns" item selling units that only sell items to their allies (I only have 2 factions for those who wonder).
I have only found 2 ways of making it happen which I don't like:

1. Make the selling units Permanently Invisible so only their allies can see them, but this makes them very transparent and I rather like the pretty colors of the original unit models :).... glowy ^^.
2. Give them a powerfull attack like the one that the magical fountain of DOTA has so the enemies won't think of ever getting close :).

There must be another way... ok Now I remembered.. I actually found the way (I think..), I used the original abilities of the "Arcane Vault" on the selling units and it worked but the problem was that it worked at any range and I couldn't change it. My guess is I screwed something up in the shop sharing and item selling system.
S.O.S It's urgent... pls help.
 

Exide

I am amazingly focused right now!
Reaction score
448
Maybe you could have a trigger:

Events:
A player selects a unit
Conditions
Triggering unit equal to Shop 1
Triggering unit equal to Shop 2
Triggering unit equal to Shop 3, etc.
Actions
If then else
Or, multiple conditions:
Triggering Player equal to Player 1 (Red)
Triggering Player equal to Player 2 (Blue)
Triggering Player equal to Player 3 (Teal), etc.
Then
Deselect Triggering unit for Triggering Player.
Else


I made this trigger without World Editor (as you can see) so it will not be 100% accurate. I hope you get the idea, though. :p
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
Make the shops player-owned.
If your map is like DotA (5v5) then make Player Red and Player 6 (forgot the color) to own the shops, and make the Shop Select ability (I forgot the name, it's the ability that allows units/Heroes to buy items) target only Allied.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> A player selects a unit

Selection events already lag behind in single player.
Even more so on bnet.
If you know the hotkeys, there's plenty time enough to buy anything before you lose the selection.
Heck, there's time enough to read the hotkeys first...
 

dyablohunter

New Member
Reaction score
2
I don't really feel like using trigers.. like AceHart said, they cause lag.
The arcane vault's abilities work.. items only show up for the allies of the owner of the selling unit, but it works at any range. I have to change that.. don't know how.
 

dyablohunter

New Member
Reaction score
2
Try my method.
Have you read Post #3?

Yes I tried that in 10 million times with 10 million adjustments before I posted my problem, thanx for trying but that most certainly does not work. The units that sell the items are owned by Computers from each faction (2 computers: alliance and horde). Does not work :) sorry, I did read your post, every word.... as it's in my interest. Anybody else have a better idea? pls?

> it works at any range

Then put some decent values... on the "shop sharing" ability.

450 range for casting (selling), 450 also for activating... Did I forget to say that I am not really a noob? I know how shop sharing, item selling and item purchase abillities work.
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
Well.... you haven't said that it didn't worked....at least until now

So does it work now?
 

dyablohunter

New Member
Reaction score
2
It doesn't work... I decided to make some kewl runes that have an attack similar to the magical fountain on DOTA, I placed them near the vendors and I don't think anybody will try to get close 2 times after he dies ^^, well unless anybody else has a better ideea or solution I will have to stick to them.
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
How about ordering a unit that is approaching <casting range of Shop Sharing> from the shop to Stop? He won't be able to get near.
 

dyablohunter

New Member
Reaction score
2
That won't work for me, because the units have to be able to pass through that area and you can still use the spell "blink" to get in and out.
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
Well, check if a unit is ordered to Blink into the region (which contains the shop) and order it to Stop.
 

dyablohunter

New Member
Reaction score
2
I allready made my finall decision, I will use the runes with attack, and I don't think u can stop a unit from casting an ability, only after you start using or activate that ability will the unit be ordered to STOP. Maybe u can do that in JASS but it's like alien hierogliphics to me so... u can consider this topic closed. And I want to thank all of you for trying to help.
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
Nope, you can do it in Trigger Editor (GUI)

Code:
Trigger
   Events
      Unit - A Unit Begins casting an ability
   Conditions
      (Ability being cast) Equal to Blink
   Actions
      Set L = (Target point of ability being cast)
      If / Then / Else
         If - Conditions
            ((Region <gen> contains L) Equal to True)
         Then - Actions
            Unit - Order (Triggering Unit) to Stop
         Else - Actions
      Custom Script: call RemoveLocation(udg_L)

The Region <gen> is a region that don't want blinkers to Blink to.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top