Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » revive a building?
revive a building? [message #242839] Thu, 01 February 2007 19:18 Go to next message
jnz is currently offline  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 Razz

[Updated on: Thu, 01 February 2007 19:19]

Report message to a moderator

Re: revive a building? [message #242840 is a reply to message #242839] Thu, 01 February 2007 19:24 Go to previous messageGo to next message
Tankkiller is currently offline  Tankkiller
Messages: 192
Registered: February 2006
Location: Oklahoma, OK!
Karma: 0
Recruit
Well, You took my idea (or someones before this ones) really far, In Love hope it works for main buldings Big Grin

http://i186.photobucket.com/albums/x78/a-10_man/sig.jpg

BYE, BYE FLAME TANK!!!
Re: revive a building? [message #242842 is a reply to message #242839] Thu, 01 February 2007 20:33 Go to previous messageGo to next message
Renx is currently offline  Renx
Messages: 2321
Registered: April 2003
Location: Canada
Karma: 0
General (2 Stars)
Category Moderator
v00d00 was working on this, but most likely stopped momentarily to work on RG 1.032.

~Canucck

http://www.sloganizer.net/en/style7,Espion.png

Blazer

...RG made me ugly

[Updated on: Thu, 01 February 2007 20:35]

Report message to a moderator

Re: revive a building? [message #242843 is a reply to message #242839] Thu, 01 February 2007 20:43 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

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 #242859 is a reply to message #242839] Fri, 02 February 2007 01:15 Go to previous messageGo to next message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma: 0
General (3 Stars)
that sucks, although i got the AGT to kill me again with that script. although now, it is invinicble.
Re: revive a building? [message #242861 is a reply to message #242839] Fri, 02 February 2007 01:33 Go to previous messageGo to next message
Cpo64 is currently offline  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 Go to previous messageGo to next message
reborn is currently offline  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 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

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 Go to previous messageGo to next message
jnz is currently offline  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 Razz

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 Go to previous messageGo to next message
reborn is currently offline  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 Go to previous messageGo to next message
Whitedragon is currently offline  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 #242894 is a reply to message #242871] Fri, 02 February 2007 07:22 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3809
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Do it the complex way. Make a vehicle preset with scripts on it that change the model on health (for damage) and then put special PCTs inside that only buy specific thing (buildings, advanced soldiers, ect).

Re: revive a building? [message #242895 is a reply to message #242839] Fri, 02 February 2007 07:27 Go to previous messageGo to next message
Renx is currently offline  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

http://www.sloganizer.net/en/style7,Espion.png

Blazer

...RG made me ugly
Re: revive a building? [message #242896 is a reply to message #242839] Fri, 02 February 2007 07:41 Go to previous messageGo to next message
SeargentSarg is currently offline  SeargentSarg
Messages: 478
Registered: November 2006
Karma: 0
Commander
Can't you buy dead turrets in black cell?

[Updated on: Fri, 02 February 2007 07:41]

Report message to a moderator

Re: revive a building? [message #242897 is a reply to message #242895] Fri, 02 February 2007 07:41 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3809
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Well that might take a while to come out, so while waiting it is a good idea to suggest the second best options.

Re: revive a building? [message #242899 is a reply to message #242839] Fri, 02 February 2007 07:45 Go to previous messageGo to next message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma: 0
General (3 Stars)
i know how to make it so you can buy vecs again after the vec factory had died
smae goes for bar/hon
Re: revive a building? [message #242900 is a reply to message #242839] Fri, 02 February 2007 07:48 Go to previous messageGo to next message
SeargentSarg is currently offline  SeargentSarg
Messages: 478
Registered: November 2006
Karma: 0
Commander
As far as I know..

The Nod Turret preset is set as a building. Correct my if I am wrong.. But if it is set as a building, and it is destroyed (you see the turret without the head) and in black cell you can pay to revive it.. Which therefore would create a revived building..


Re: revive a building? [message #242903 is a reply to message #242839] Fri, 02 February 2007 07:51 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

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
Re: revive a building? [message #242905 is a reply to message #242839] Fri, 02 February 2007 07:55 Go to previous messageGo to next message
SeargentSarg is currently offline  SeargentSarg
Messages: 478
Registered: November 2006
Karma: 0
Commander
I think thats funny, I could have sworn it was a building, thanks for clearing that up.

Re: revive a building? [message #242910 is a reply to message #242903] Fri, 02 February 2007 08:24 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3809
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
jonwil wrote on Fri, 02 February 2007 07:51

The nod turret is actually a vehicle.



Thank goodness think about how dumb it would be to have you hole team defending a turret because it was your last building.


Re: revive a building? [message #242912 is a reply to message #242910] Fri, 02 February 2007 08:29 Go to previous messageGo to next message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma: 0
General (3 Stars)
Jerad Gray wrote on Fri, 02 February 2007 15:24

jonwil wrote on Fri, 02 February 2007 07:51

The nod turret is actually a vehicle.



Thank goodness think about how dumb it would be to have you hole team defending a turret because it was your last building.


rofl
Re: revive a building? [message #242913 is a reply to message #242899] Fri, 02 February 2007 08:29 Go to previous messageGo to next message
Cat998
Messages: 1081
Registered: January 2004
Location: Austria, Vienna
Karma: 0
General (1 Star)
Moderator/Captain

gamemodding wrote on Fri, 02 February 2007 15:45

i know how to make it so you can buy vecs again after the vec factory had died
smae goes for bar/hon


how ?


When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter then "Yes"

Programming is like sex: one mistake and you have to support it for the rest of your life

Want the best answers? Ask the best questions!

"So long, and thanks for all the fish."
Re: revive a building? [message #242914 is a reply to message #242839] Fri, 02 February 2007 08:29 Go to previous messageGo to next message
SeargentSarg is currently offline  SeargentSarg
Messages: 478
Registered: November 2006
Karma: 0
Commander
I forgot about the building part. Every building dead except for turret = building = You protect it and u die easily.. gg.

Re: revive a building? [message #242917 is a reply to message #242839] Fri, 02 February 2007 08:32 Go to previous messageGo to next message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma: 0
General (3 Stars)
can't you do it with
void Set_Can_Generate_Soldiers(int team,bool cangenerate); 
void Set_Can_Generate_Vehicles(int team,bool cangenerate); 


? i should of tested before i posted Razz
Re: revive a building? [message #242919 is a reply to message #242913] Fri, 02 February 2007 08:39 Go to previous messageGo to previous message
Jerad2142 is currently offline  Jerad2142
Messages: 3809
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Cat998 wrote on Fri, 02 February 2007 08:29

gamemodding wrote on Fri, 02 February 2007 15:45

i know how to make it so you can buy vecs again after the vec factory had died
smae goes for bar/hon


how ?


Yo0u could also make those fake purchase terminals (like what RA:APB uses for their helicopter purchase system).


Previous Topic: DM Map Idea
Next Topic: Mix Maps
Goto Forum:
  


Current Time: Thu Nov 14 08:18:14 MST 2024

Total time taken to generate the page: 0.01238 seconds