Home » Renegade Discussions » Mod Forum » Buying Back Dead Buildings
Re: Buying Back Dead Buildings [message #315214 is a reply to message #315207] |
Sun, 03 February 2008 03:45   |
 |
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma:
|
General (3 Stars) |
|
|
hatstand wrote on Sun, 03 February 2008 04:42 | shouldnt be *that* hard to do.... just grab the status of the building, wrap that into an if statement, have another if statement related to the cost of the building, then crate a new controller... the wf/airstrip/refineries might be a bit harder to do though, what with the zones, etc.....
|
Building controllers must be created on the start of the map, you cannot simply create a new one if one is dead.
You also can't really create a "spare" one either...
You have to actually bring it back from the dead.
V00d00 managed to do this, however he said that when you join the map, the client is told of the building is dead or not, when it is set to dead then the only way a client can be told that the controller is alive again is if he exits the map then rejoins for the purchase terminals to work again.
Not really a major problem for something like an AGT (although still an issue), but it's a bit of a problem for other buildings.
The server that Zunnie and Iwar created that MP-Gaming is running now makes use of this in it's ultra aow server. I may actually have a copy of the source code for it somewhere but I didn't write it and it isn't really mine to distribute.
TBH it's a totally crappy way of doing it imo, I mean honestly.. Leave and rejoin?
There are other ways of achieving the same effect, but in the strictest sense, no one has really successfully managed to bring a building back from the dead server side without the need for clients to exit then rejoin the server.
If I was going to attempt this, I would look into doing it a little more sneaky, I would perhaps try to set the health of all the buildings to 2001, then when the health of the building reaches 1, I would set it's skin type to Blamo, remove the power from the building and either move/destroy or disable somehow the purchase terminals. If it was a weapons factory then I would destroy any vehichle created immediately and refund the price to the purchaser, and apply that same type of method to the other buildings. Essentially rendering them dead (although on the PT I guess they would still show up).
Then if I wanted to bring it back to life (although really it never died) I would set it's health to 2001 again and change it's skin type back to normal.
You would also have to allow for win conditions too (i.e if all buildings health where at 1 for a particular team, then I would destroy that teams controllers).
That still isn't preferable, and just because that's the way I would do it, it doesn't mean that's the best way by a very long shot. There must be a way to do it properly, but it's deffinately out of my reach. Perhaps Silent_Kane might one day shed some light on it, I was told by v00d00 (I think) some time ago that he had managed to do it, but I never saw this for myself.
|
|
|
 |
|
Buying Back Dead Buildings
By: _SSnipe_ on Sat, 02 February 2008 18:50
|
 |
|
Re: Buying Back Dead Buildings
By: Veyrdite on Sat, 02 February 2008 22:23
|
 |
|
Re: Buying Back Dead Buildings
By: _SSnipe_ on Sat, 02 February 2008 23:35
|
 |
|
Re: Buying Back Dead Buildings
By: hatstand on Sun, 03 February 2008 02:42
|
 |
|
Re: Buying Back Dead Buildings
By: reborn on Sun, 03 February 2008 03:45
|
 |
|
Re: Buying Back Dead Buildings
By: Ethenal on Sun, 03 February 2008 03:46
|
 |
|
Re: Buying Back Dead Buildings
|
 |
|
Re: Buying Back Dead Buildings
By: reborn on Sun, 03 February 2008 04:11
|
 |
|
Re: Buying Back Dead Buildings
By: _SSnipe_ on Sun, 03 February 2008 11:58
|
 |
|
Re: Buying Back Dead Buildings
By: Yrr on Sun, 03 February 2008 15:00
|
 |
|
Re: Buying Back Dead Buildings
By: reborn on Sun, 03 February 2008 15:16
|
 |
|
Re: Buying Back Dead Buildings
By: Yrr on Sun, 03 February 2008 16:40
|
 |
|
Re: Buying Back Dead Buildings
By: reborn on Sun, 03 February 2008 17:32
|
 |
|
Re: Buying Back Dead Buildings
By: Yrr on Sun, 03 February 2008 18:04
|
 |
|
Re: Buying Back Dead Buildings
By: reborn on Mon, 04 February 2008 03:24
|
 |
|
Re: Buying Back Dead Buildings
By: _SSnipe_ on Mon, 04 February 2008 08:24
|
 |
|
Re: Buying Back Dead Buildings
|
 |
|
Re: Buying Back Dead Buildings
By: reborn on Sun, 03 February 2008 16:29
|
 |
|
Re: Buying Back Dead Buildings
By: _SSnipe_ on Sun, 03 February 2008 20:17
|
 |
|
Re: Buying Back Dead Buildings
By: cnc95fan on Mon, 04 February 2008 10:49
|
 |
|
Re: Buying Back Dead Buildings
By: reborn on Mon, 04 February 2008 10:57
|
 |
|
Re: Buying Back Dead Buildings
|
 |
|
Re: Buying Back Dead Buildings
By: reborn on Mon, 04 February 2008 14:20
|
 |
|
Re: Buying Back Dead Buildings
By: Sir Kane on Tue, 05 February 2008 03:30
|
 |
|
Re: Buying Back Dead Buildings
|
 |
|
Re: Buying Back Dead Buildings
By: Yrr on Tue, 05 February 2008 13:31
|
 |
|
Re: Buying Back Dead Buildings
|
 |
|
Re: Buying Back Dead Buildings
By: jnz on Tue, 05 February 2008 14:21
|
 |
|
Re: Buying Back Dead Buildings
|
 |
|
Re: Buying Back Dead Buildings
By: Yrr on Wed, 06 February 2008 10:19
|
 |
|
Re: Buying Back Dead Buildings
|
 |
|
Re: Buying Back Dead Buildings
|
Goto Forum:
Current Time: Tue Feb 18 21:36:29 MST 2025
Total time taken to generate the page: 0.01727 seconds
|