Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Release Forum » [SSGM 4.0 Plugin] VeteranSystem ALPHA
Re: [SSGM 4.0 Plugin] VeteranSystem ALPHA [message #468848 is a reply to message #468816] Sat, 09 June 2012 14:11 Go to previous messageGo to previous message
ExEric3 is currently offline  ExEric3
Messages: 746
Registered: February 2005
Location: Slovakia
Karma:
Colonel
Xpert wrote on Sat, 09 June 2012 20:53

iRANian wrote on Sat, 09 June 2012 14:42

Dunno, try using Is_Beacon() instead.


That doesn't exist anymore.
Neither does the following:
Is_C4
Is_Building
Is_Soldier
Is_Vehicle


For Is_Beacon:
if (obj->As_PhysicalGameObj() && obj->As_PhysicalGameObj()->As_BeaconGameObj())

For Is_C4:
else if (obj->As_PhysicalGameObj() && obj->As_PhysicalGameObj()->As_C4GameObj())

For Is_Building:
if (obj->As_BuildingGameObj())

For Is_Soldier:
if (obj->As_SoldierGameObj())

For Is_Vehicle:
if (killed->As_VehicleGameObj())


So code is:


void VeteranSystem::OnObjectCreate(void *data,GameObject *obj)
{
	if (Commands->Is_A_Star(obj) && obj->As_SoldierGameObj() )
	{
		Attach_Script_Once(obj, "Veteran_Player", "");
		Update_Player(Get_Player_ID(obj), obj);
	}
	else if (obj->As_VehicleGameObj() )
	{
		Attach_Script_Once(obj, "Veteran_Vehicle", "");
	}
	[B]else if (obj->As_PhysicalGameObj() && obj->As_PhysicalGameObj()->As_C4GameObj() )[/B]
	{
		Attach_Script_Once(obj, "Veteran_C4", "");
	}
	[B]else if (obj->As_PhysicalGameObj() && obj->As_PhysicalGameObj()->As_BeaconGameObj() )[/B]
	{
		Attach_Script_Once(obj, "Veteran_Beacon", "");
	}
	else if (obj->As_BuildingGameObj() )
	{
		Attach_Script_Once(obj, "Veteran_Building", "");
	}
}


Compile log (bold are bad lines):

21>Veteran.cpp(605): error C2027: use of undefined type 'PhysicalGameObj'
21>          c:\ssgm4 beta 5\scripts\engine_ttdef.h(17) : see declaration of 'PhysicalGameObj'
21>Veteran.cpp(605): error C2227: left of '->As_C4GameObj' must point to class/struct/union/generic type
21>Veteran.cpp(609): error C2027: use of undefined type 'PhysicalGameObj'
21>          c:\ssgm4 beta 5\scripts\engine_ttdef.h(17) : see declaration of 'PhysicalGameObj'
21>Veteran.cpp(609): error C2227: left of '->As_BeaconGameObj' must point to class/struct/union/generic type


So what you think Xpert? Thx
 
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: [Textures] HD Purchase Icon Textures
Next Topic: [Skin] Stealth Black Hand "Venom" Retexture
Goto Forum:
  


Current Time: Sat Nov 02 22:07:09 MST 2024

Total time taken to generate the page: 0.00985 seconds