(C++) float to GameObject [message #330882] |
Sat, 17 May 2008 12:40 |
|
mrãçķz
Messages: 3069 Registered: August 2007
Karma: 0
|
General (3 Stars) Permabanned for trying and failing DDoS |
|
|
How can i Convert float to GameObject? i need that for a new Mod im working on =))
Thanks
|
|
|
|
|
Re: (C++) float to GameObject [message #330903 is a reply to message #330882] |
Sat, 17 May 2008 15:23 |
|
jnz
Messages: 3396 Registered: July 2006 Location: 30th century
Karma: 0
|
General (3 Stars) |
|
|
He was trying to get a building's health.
GameObject *Find_Power_Plant(int Team); //finds the first powerplant for Team,0 = Nod,1 = GDI,2 = either
GameObject *Find_Refinery(int Team); //finds the first refinery for Team,0 = Nod,1 = GDI,2 = either
GameObject *Find_Repair_Bay(int Team); //finds the first repair bay for Team,0 = Nod,1 = GDI,2 = either
GameObject *Find_Soldier_Factory(int Team); //finds the first soldier factory for Team,0 = Nod,1 = GDI,2 = either
GameObject *Find_Airstrip(int Team); //finds the first airstrip for Team,0 = Nod,1 = GDI,2 = either
GameObject *Find_War_Factory(int Team); //finds the first war factory for Team,0 = Nod,1 = GDI,2 = either
GameObject *Find_Vehicle_Factory(int Team); //finds the first airstrip for Team,if none is found,finds the first war factory for Team,0 = Nod,1 = GDI,2 = either
GameObject *Find_Com_Center(int Team); //finds the first communications center for Team,0 = Nod,1 = GDI,2 = either
|
|
|
Re: (C++) float to GameObject [message #330907 is a reply to message #330882] |
Sat, 17 May 2008 15:33 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
float barhealth = Commands->Get_Health(Find_Soldier_Factory(1));
// I want to halve the barrack health
Commands->Set_Health((Find_Soldier_Factory(1)),(barhealth/2.0f));
|
|
|
|