revive a building? [message #242839] |
Thu, 01 February 2007 19:18 |
|
jnz
Messages: 3396 Registered: July 2006 Location: 30th century
Karma: 0
|
General (3 Stars) |
|
|
is it possible with scripts.dll to revive building? and make it functional again? i done:
GameObject * def = Find_Base_Defence(atoi(buffer.substr(pos+1).c_str()));
Vector3 Pos = Commands->Get_Position(def);
Create_Building(Commands->Get_Preset_Name(def), Commands->Get_Position(def));
while this works, i want to make the building "clean" again. and redestroyable.
in this case it was the defence
[Updated on: Thu, 01 February 2007 19:19] Report message to a moderator
|
|
|
|
|
Re: revive a building? [message #242843 is a reply to message #242839] |
Thu, 01 February 2007 20:43 |
|
So far, a way to do this that doesn't require a change on the client has not been found.
One option is to destroy the building controller and then replace it. But that doesn't remove it from the building list (which leads to crashes). Another option is to make the building think its no longer dead. But there is no way I have yet found to do this without client side code.
Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
|
|
|
|
Re: revive a building? [message #242861 is a reply to message #242839] |
Fri, 02 February 2007 01:33 |
|
Cpo64
Messages: 1246 Registered: February 2003 Location: Powell River, B.C. Canada
Karma: 0
|
General (1 Star) |
|
|
What about not actually killing the building?
Just making "act" killed when it has 1 hp left?
Course I have no idea what I'm talking about, and am just shooting in the dark.
-->
|
|
|
Re: revive a building? [message #242867 is a reply to message #242839] |
Fri, 02 February 2007 02:35 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
Sure you can, if you have the time to find it. If it's created once, then the code exists. Find it and call it.
|
|
|
Re: revive a building? [message #242868 is a reply to message #242839] |
Fri, 02 February 2007 03:10 |
|
The problem is not creating the new building controller, that part is easy. The problem is that there is no way to remove the dead (and now destroyed) building controller from the building list without client side code. There is also no way to set the "building is dead" flag to "alive" without client side modifications as the client has extra code (presumably anti-cheat or something) designed to reject any data that tries to set the flag to "alive"
Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
|
|
|
Re: revive a building? [message #242869 is a reply to message #242861] |
Fri, 02 February 2007 03:38 |
|
jnz
Messages: 3396 Registered: July 2006 Location: 30th century
Karma: 0
|
General (3 Stars) |
|
|
Cpo64 wrote on Fri, 02 February 2007 08:33 | What about not actually killing the building?
Just making "act" killed when it has 1 hp left?
Course I have no idea what I'm talking about, and am just shooting in the dark.
|
i think this is very possible. although i have no idea how to impliment it
i know how to make the building invincible, but i don't know how to make it stop working. and how to detect its health at the right moment.
[Updated on: Fri, 02 February 2007 03:41] Report message to a moderator
|
|
|
Re: revive a building? [message #242870 is a reply to message #242868] |
Fri, 02 February 2007 03:43 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
Quoting WhiteDragon September 25, 2005, 04:58:42 am
Quote: | It is possible to bring buildings back to life, however you cant bring the building controller back to life. Meaning that you would have a building that basically did nothing and didnt count towards your team's building count. For example if you had a revived barracks and a regular weapons factory, you wouldnt be able to buy advanced infantry, and if the weapons factory was destroyed the game would end.
|
jonwil wrote on Fri, 02 February 2007 05:10 | The problem is not creating the new building controller, that part is easy. The problem is that there is no way to remove the dead (and now destroyed) building controller from the building list without client side code. There is also no way to set the "building is dead" flag to "alive" without client side modifications as the client has extra code (presumably anti-cheat or something) designed to reject any data that tries to set the flag to "alive"
|
Between the two of you, you have the solution. Relationships between you two are good. Do it. =]
[Updated on: Fri, 02 February 2007 03:50] Report message to a moderator
|
|
|
Re: revive a building? [message #242871 is a reply to message #242839] |
Fri, 02 February 2007 03:51 |
|
Whitedragon
Messages: 832 Registered: February 2003 Location: California
Karma: 1
|
Colonel |
|
|
That post is no longer true.
Black-Cell.net
Network Administrator (2003 - )
DragonServ, Renegade's first IRC interface bot
Creator and lead coder (2002 - )
Dragonade, Renegade's first server side modification
Lead coder (2005 - )
|
|
|
|
Re: revive a building? [message #242895 is a reply to message #242839] |
Fri, 02 February 2007 07:27 |
|
Renx
Messages: 2321 Registered: April 2003 Location: Canada
Karma: 0
|
General (2 Stars) Category Moderator |
|
|
Like I said, v00d00 is already working on it, and it apparently works for the most part.
Quote: |
Another *uncertainty* is the ability to rebuy entire buildings! (Yes it "works"!)
Its possible thanks to the work of v00d00 to 'bring back to life' entire buildings serverside...
It works seemlessly for Refineries and Powerplants (i havent tested it on CY,NY,Subpen etc buildings yet),
these buildings can be rebought by using for ex !buy PP which would restore the powerplant.
Rebuying the War Factory and Barracks works as well, the buildings do come back to life, the only "bug" is
that once the building is destroyed you will see a big "Destroyed" text on your vehicle factory in the PT,
this message will remain there until you rejoin the server, then you can purchase vehicles again, same goes
for the barracks
|
http://www.apathbeyond.com/forum/index.php?showtopic=11222&st=0
~Canucck
|
|
|
|
|
|
|
Re: revive a building? [message #242903 is a reply to message #242839] |
Fri, 02 February 2007 07:51 |
|
The nod turret is actually a vehicle.
Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
|
|
|
|
|
|
|
|
|
|