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