Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » How do you revive a building?
How do you revive a building? [message #491760] Sat, 24 September 2016 13:23 Go to next message
roszek is currently offline  roszek
Messages: 296
Registered: June 2010
Karma: 0
Recruit
Like the war factory.

I tried Restore_Building(obj) and it does restore the building but the icons are still locked up.

I seem to recall a topic about this but can't find the answer. :/


Re: How do you revive a building? [message #491761 is a reply to message #491760] Sat, 24 September 2016 13:59 Go to previous messageGo to next message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
General (3 Stars)
http://www.renegadeforums.com/index.php?t=msg&th=40368&start=0&

http://s18.postimage.org/jc6qbn4k9/bricks3.png
Re: How do you revive a building? [message #491764 is a reply to message #491760] Sun, 25 September 2016 21:42 Go to previous messageGo to next message
dblaney1 is currently offline  dblaney1
Messages: 358
Registered: March 2014
Location: United States
Karma: 0
Commander
You call the on_revived function like this. Thats the only thing necessary that you need to do as of 4.2.

Building->As_BuildingGameObj()->On_Revived();

[Updated on: Sun, 25 September 2016 21:43]

Report message to a moderator

Re: How do you revive a building? [message #491766 is a reply to message #491760] Mon, 26 September 2016 11:07 Go to previous messageGo to next message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
General (3 Stars)
Yea hes right.

"Building revival support, there are console commands for it or you can call the new On_Revived function on any building controller object to revive it. "


http://s18.postimage.org/jc6qbn4k9/bricks3.png

[Updated on: Mon, 26 September 2016 11:07]

Report message to a moderator

Re: How do you revive a building? [message #491775 is a reply to message #491766] Thu, 29 September 2016 11:40 Go to previous messageGo to next message
ehhh is currently offline  ehhh
Messages: 2098
Registered: December 2010
Location: UK
Karma: 0
General (2 Stars)
give it a pheonix down
Re: How do you revive a building? [message #491778 is a reply to message #491760] Thu, 29 September 2016 13:24 Go to previous messageGo to next message
iRANian is currently offline  iRANian
Messages: 4308
Registered: April 2011
Karma: 0
General (4 Stars)
Why do you need to call a callback function (On_Revived()), manually? Is it because the console commands trigger it in 4.2?

Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases
Re: How do you revive a building? [message #491779 is a reply to message #491760] Sat, 01 October 2016 01:46 Go to previous messageGo to next message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
General (3 Stars)
When ever jonwill added the client fix to 4.0

Im surprised you don't know iran. It was you looking at the original functions in mp demo that started it.

Quote:




Whitedragon:

Started working on this.

Full client support, even on non-4.2 servers.

You can revive buildings with the revivebuildingbytype, revivebuildingbypreset, and revivebuildingbyname console commands, or by calling BuildingGameObj::On_Revived directly.

http://www.renegadeforums.com/index.php?t=msg&th=40362&prevloaded=1& &start=100


2.The building netcode will NOT let you toggle the "IsDestroyed" flag from "false" to "true" over the network at all no matter what you do.

I think your client fix was added to 4.2 right?


http://s18.postimage.org/jc6qbn4k9/bricks3.png

[Updated on: Sat, 01 October 2016 01:59]

Report message to a moderator

Re: How do you revive a building? [message #491782 is a reply to message #491760] Sat, 01 October 2016 07:06 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

I can confirm that based on the current 4.x codebase it will correctly set all the relavent things on the client including IsDestroyed.


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: How do you revive a building? [message #491789 is a reply to message #491760] Sun, 16 October 2016 01:35 Go to previous message
iRANian is currently offline  iRANian
Messages: 4308
Registered: April 2011
Karma: 0
General (4 Stars)
I forgot about that Blacky, yeah I was checking the netcode and it has some special check that would not set an object flag on buildings correctly when reviving.

Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases
Previous Topic: The Scorpion
Next Topic: Looking for old scripts builds
Goto Forum:
  


Current Time: Thu Dec 26 09:42:19 MST 2024

Total time taken to generate the page: 0.00864 seconds