Jump to content

Buildings Fun Fact


Handepsilon

Recommended Posts

  • Totem Arts Staff

- They're one single actor, and cannot be reconstructed

- You can make multiple towers with ease

- You can make multiple production structure, but when one is down, the others are rendered useless

- You can't make more than a single Strip, but you can make multiple Air towers

Link to comment
Share on other sites

Yea, when the buildings were implemented, it was assumed that there would only ever be one of each in the map. There is also a LOT of code all over that manually searches through actors in the level for a building of a type, and then does logic on the first one it finds, like checking it's health or status. The one it finds is arbitrary, so having two of the same building could cause unexpected behavior in a lot of things.

For example:

-The purchase system could use a foreachactor() to search through the buildings, and find a war factory, then check it's health. If it's dead, then is could say vehicles aren't available. It could stop at the first one it finds, so the "first" war factory dictates if the purchasing system works, while the seconds one does nothing.

-The HUD could again, loop through each actor, and for each one it finds, check the health, and if it's dead, disable the hud icon. If it doesn't return after the first one, the last one it finds will be the final value it sets, so on the HUD, the icon is tied to the "last" war factory in the map.

So yea, ideally the code would take this sort of thing into account, and be setup to handle it, but that's unfortunately not the way it was implemented. I would strongly recommend against using more than one building in a map, because it's untested, and will most likely have some weird behavior. It may look like it's working on the surface, but there was never any "standard" way of accessing the buildings implemented, so each feature programmed by different people does it differently, and thus, may react differently when the original shared assumption that there was only one of each is wrong.

Link to comment
Share on other sites

One problem might be that destroying the Powerplant might only deactivate one Obelisk.

If I may suggest, the towers would be the only thing you need fix 2 of. It was the only structure in original Ren that functioned when 2 were present as well. Same thing you describe, worked in old Ren when 2 structures were placed EXCEPT for towers. 2 towers in old Ren functioned right and many maps had them when custom maps were designed with 40-64 player per match/team was the case.

It also sounds easy to recode just the towers if anything to function right with just 1 since they appear mostly already working anyway. They may already work depending on situation of PP. If they don't, I suggest it be valuable if they did. You'd only need rephrase and reorganize the order of the checks for the tower to pp and pp to tower, and it would do a lot of good for the mapmaking community

Please? Thank you.

Link to comment
Share on other sites

  • Totem Arts Staff

Will do, but I might try to beat you up to it.

nyehahahaha >:D

Edit : According to the Power Plant Internal class, the destruction of PP will do check on all buildings and turn on the 'No Power' boolean

Edit 2 : Confirmed, both Obelisks had both their lasers offline upon PP blowing up

Link to comment
Share on other sites

Yea, It's not really so much a problem of "not possible" but "not intended". It could definitely get modified to work properly with multiple buildings of each type, ideally finding/checking buildings would be all done through the Rx_Game or a helper class, instead of manually checking the level for them. It's just a matter of someone spending the time to re-factor and then test the changes, but imo, it's not something that's really high priority. (Altho it would definitely be cool)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...