Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Release Forum » [SSGM 4.0 Plugin] Building Revival Console Commands v2.0
Re: [SSGM 4.0 Plugin] Building Revival Console Commands v2.0 [message #492030 is a reply to message #482927] Tue, 21 February 2017 23:28 Go to previous messageGo to previous message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma:
General (3 Stars)
Its a dup of Restore_Building with extra bits. I only use the function Revive_Building. We still want to set the building health. Turn the base power back on if it is a power plant. We want to apply damage to the building to force it to update. If you don't it will still look damaged until a player damage's the building.

Idk if their is a difference but Im still using 4.3 RC2 or what ever Revision 7103 is


	// Restore building health
	float max = Commands->Get_Max_Health(building);
	Commands->Set_Health(building, max);

	// Still do this to wake everything up.
	// This is needed to update the state of a building from 'dead' to 'alive on the client
	Commands->Apply_Damage(building, 1.0f, "Explosive", 0);

	// If we're a Power Plant turn on base power
	if (building->As_BuildingGameObj()->As_PowerPlantGameObj()) Power_Base(Team, true);


You want to do these 3 things still in addition to the scripts Restore_Building



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

[Updated on: Tue, 21 February 2017 23:38]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: MapFix Plugin
Next Topic: RenList 1.0.9
Goto Forum:
  


Current Time: Thu Sep 25 09:02:14 MST 2025

Total time taken to generate the page: 0.00988 seconds