Saturday, April 21, 2012

Help with building ownership

I am making a custom side based off the night elves, and I am trying to make two buildings that can be built by that side, but become neutral buildings if you move your base, so the buildings are only yours while you have an ancient near them. I cant do it with regions, because I cant find a way to have the game make a region around the building when it is built in-game. I've also tried using the "Unit has specific buff" trigger, but I cant find an event that would start that trigger whenever the building gets the buff, and I cant even get the building to have a buff. The two buildings are a shop and a moon well equivalent (called a "Fountain").

Also for the fountain, I am trying to have the players food go up based on how many units are inside it (like a gold mine, except for food). Anyone have any advice?



Thanks|||Quote:






View Post

I cant do it with regions, because I cant find a way to have the game make a region around the building when it is built in-game.




In any action where you can select a region, you can create a region there by using any of the "Conversion" options from the region drop-down. So in the list that includes "Playable Map Area" there is also "Convert Points with size to Region" (for example), which will then give you options for the point (position of unit, for example), and the size of the region in height and width.

Alternatively you can create a region, assign it to a variable at map initialization, and then just move the region using the "Region - Move" action.

I would recommend not even using regions, unless you have to, though. There's better ways to do it by checking units in range or something like that.


Quote:






View Post

I've also tried using the "Unit has specific buff" trigger, but I cant find an event that would start that trigger whenever the building gets the buff, and I cant even get the building to have a buff.




Buildings never show buff-tips, even when they have the buff in question - which you might be able to tell through the art associated with the buff if it is something that attaches to the origin of the model (like an aura, for example).

No comments:

Post a Comment