So I can't believe I just discovered this problem. :/
I have multiple buildings, controlled by the computer, one on each team. The computers control the creeps, farming mobs, w\e you want to call them; But they also control the buildings that I had all items, and upgrades for their respective teams to buy from. I used the method to emulate a WC3 Shop, from one of the Bifuu tutorials if I remember correctly, if it was someone else's, I apologize.
As a easy debug, just to make sure everything worked, I had all the items cost nothing. My map is nearing completion of the basic setup stages, so I started adding prices in.
Now I find my problem. My buildings are just giving control to the other player, but they are still belonging to the computer. When I try and buy an upgrade, it says 'You cannot spend another Players resources.'. It is trying to spend the computers resources instead of mine for the upgrade. Is there any way I can fix this, short of making all my shops contain dummy abilities, which I can use to run triggers that subtract resources from the player who used it, and then give the unit...? That would be a incredibly massive and annoying undertaking.
You could have the research ability for the upgrades that you want the player to be able to purchase on the units themselves in a submenu. You can probably make it so the upgrade buttons dont work unless they are near the "upgrade building".
This does not work. It A- gives the player control of the creeps. B- the player only has control, its not his building, hes still trying to buy for the computer, rather than from the computer. What you just said is the trigger version, to give everything he owns, of the behavior that the building has.
I may have a potential solution for this. For the buildings with upgrades, make it so that there is one of the same building for each player STACKING on each other on the same location(ignore placement). Also, give each player control of ONE of these buildings. Now, to make it error free, make a trigger that detects if a player is selecting ANY of these buildings, then clear the unit selection and give the correct building to his selection instead.
I hope i didn't confuse you with that. =D
It may be a LITTLE of a hassle, but it's better off than making individual dummy abilities, as you said. =)
I've followed the same tutorial as you mentioned but i do not have this problem.
I got a question do you have the shop placed as neutral?
because I did this, i hope this helps.
Edit: maybe you can send the map where it is in so I can take a look at it.
So I can't believe I just discovered this problem. :/
I have multiple buildings, controlled by the computer, one on each team. The computers control the creeps, farming mobs, w\e you want to call them; But they also control the buildings that I had all items, and upgrades for their respective teams to buy from. I used the method to emulate a WC3 Shop, from one of the Bifuu tutorials if I remember correctly, if it was someone else's, I apologize.
As a easy debug, just to make sure everything worked, I had all the items cost nothing. My map is nearing completion of the basic setup stages, so I started adding prices in.
Now I find my problem. My buildings are just giving control to the other player, but they are still belonging to the computer. When I try and buy an upgrade, it says 'You cannot spend another Players resources.'. It is trying to spend the computers resources instead of mine for the upgrade. Is there any way I can fix this, short of making all my shops contain dummy abilities, which I can use to run triggers that subtract resources from the player who used it, and then give the unit...? That would be a incredibly massive and annoying undertaking.
Maybe give the player temporary control of the building upon selection, then when it's deselected, give the control back to the cpu?
That should do the trick.
You could have the research ability for the upgrades that you want the player to be able to purchase on the units themselves in a submenu. You can probably make it so the upgrade buttons dont work unless they are near the "upgrade building".
@Dijall: Go
Mmmm, the problem with this idea, is when people inevitably grief and don't move away from the building, or just leave while on the building.
@s3rius: Go
This does not work. It A- gives the player control of the creeps. B- the player only has control, its not his building, hes still trying to buy for the computer, rather than from the computer. What you just said is the trigger version, to give everything he owns, of the behavior that the building has.
@barakatx2: Go
This idea however, has potential. Still a bit of work, but not nearly as much as recreating dummy abilities.
Thanks everybody for the ideas.
I may have a potential solution for this. For the buildings with upgrades, make it so that there is one of the same building for each player STACKING on each other on the same location(ignore placement). Also, give each player control of ONE of these buildings. Now, to make it error free, make a trigger that detects if a player is selecting ANY of these buildings, then clear the unit selection and give the correct building to his selection instead.
I hope i didn't confuse you with that. =D
It may be a LITTLE of a hassle, but it's better off than making individual dummy abilities, as you said. =)
Hello,
I've followed the same tutorial as you mentioned but i do not have this problem. I got a question do you have the shop placed as neutral? because I did this, i hope this helps.
Edit: maybe you can send the map where it is in so I can take a look at it.
@khazr: Go
You, kind sir, are my new best friend. Have my children. :3
It works perfectly now that I made the owner of the building neutral instead of the computer, thank you much.