| 02-24-2003, 07:49 PM | #1 |
I'm trying to have shops that only sell to heros from a certain team. Any suggestions? I understand triggers and MPQ file editing pretty well. |
| 02-24-2003, 09:19 PM | #2 |
Try having the shop owned by that team instead of neutral passive. |
| 02-24-2003, 10:00 PM | #3 |
Ownership of a team is half the problem, the other half i think is the select hero ability (neutral building, 'aneu'). If you set the select hero ability to target allies, it still doesnt work. (although you can likely lower the targeting radius). A way to handle this is to just be mean and destroy the items as the other team tryies to buy them, Or making the shops themselves ahve a lethal attack. (This also allows people to gun down their allies who might be trying take 'their' items unfortunately, hehe). If you wanted to make sure they didnt lose cash, you could keep a list of all the items and restore gold via that. But you are better off just deleting the item when they buy it, or physically guarding the vendor. Eye PS: The expansion pack is promising allied shops. |
| 02-25-2003, 02:15 AM | #4 |
Thanks. Yeah, I figured that the 'select hero' ability was the problem, but I was hoping there was some way to make a region around the shop that is as big as the 'select hero' ablity's range, and only enable that ability when memebers of a certain team were in the region. I'm not sure how to implement that correctly though, or even if it'd work if I did. Any more ideas? P.S. Expansion team shops will be sweet. |
| 02-25-2003, 02:19 AM | #5 |
You could go with the old sc method. And have a trigger which detects when a unit of team x is within range of building to give ownership to that player, move the items to the hero via some triggers. Then when the player is exits the region, or dies give the building back to its original owner (computer most likely). |
| 02-25-2003, 02:26 AM | #6 |
Try making a trigger thats if a unit acquires an item within range of the shop owned by player then drop the item and remove it. (im not sure if theres a "buys item" event) |
| 02-25-2003, 03:30 AM | #7 |
much much much simpler soln. Event: Player selects MY shop Condition: Triggering player is an enemy of owner of My Shop Action: if( get local player = triggering player ) then clear selection shouldnt desync but no promises |
| 02-25-2003, 04:54 AM | #8 | |
Quote:
The problem with clear selection is, it clears it for all players, if you try to remedy this with select unit, it will selects the unit for all players in certain cases. :bgrun: |
| 02-25-2003, 07:39 AM | #9 |
operating phrase there is: if (get local player = triggering player) then do clear selection |
| 02-25-2003, 01:27 PM | #10 |
Meh, using 'Local Player' and 'Select Unit' trigger desynchs b.net maps for me every time. =( For stuff like this, it is MUCH easier just to wait for the xpack. It's like sea units... why bother making 100000 regions and triggers when it'll be a full feature of Frozen Throne? |
| 02-25-2003, 05:20 PM | #11 |
Actually, the select unit, local player thing might work for me since my map is probably not going on battle net anyway. I'll try it when I get the chance and if it still doesn't work, I'll ask for more opinions. Thanks. |
| 02-25-2003, 08:24 PM | #12 |
Why dont you make 2 regions, one around the shop and one outside of region 1. If unit owned by ENEMY(player group varialbe) enters 1 move unit instantly to region 2 Simple and clean.... |
