Home » Renegade Discussions » Mod Forum » Low Health
|
|
Re: Low Health [message #316579 is a reply to message #315780] |
Mon, 11 February 2008 13:42 |
EA-DamageEverything
Messages: 423 Registered: January 2005 Location: Germany
Karma: 0
|
Commander |
|
|
The Health Level Warning-Sound is the following= 00-n112e.wav -to be found inside the always.dat. This is used for the DeHealthCrate.
And another funny thing is changing the Sound for the TiberiumCrate (don't knwo the exact String). instead of the Sound which is used if the player turns into a Visceroid, use l06b_17_npa01.wav -this is the Warning from SP mode Mission 6 when the Laboratory explodes.
EDIT:
If you wanna hear something else if you die ingame, extract the following Sounds and rename them to dying1.wav=
m00vnsc_kill0051i1gbmg_snd.wav or
m00gbmg_dfax0003i1gbmg_snd.wav or
m00gbmg_tfea0002i1gbmg_snd.wav
[Updated on: Mon, 11 February 2008 13:48] Report message to a moderator
|
|
|
|
|
Re: Low Health [message #318127 is a reply to message #315780] |
Wed, 20 February 2008 07:17 |
EA-DamageEverything
Messages: 423 Registered: January 2005 Location: Germany
Karma: 0
|
Commander |
|
|
*bump*
If anyone is interested to write down a decent Code with an explanation where to put that into the SSGM-Sourcecode, here are the Sounds.
All spoken by the GDI-EVA. There are three Values beside the "HealthLevel Critical"-Warning and its all about Health (NOT Armor). I don't know what EVA says exactly in the english Renegade so I apolgize for the raw translation of the Text=
m00evag_dsgn0066i1evag_snd.wav "Health level at 75%"
m00evag_dsgn0067i1evag_snd.wav "Health level at 50%"
m00evag_dsgn0068i1evag_snd.wav "Health level at 25%"
The Sound from the DeHealthCrate is in my first post above and can be used when the player is under ten or five percent Health.
|
|
|
|
Re: Low Health [message #324883 is a reply to message #316585] |
Wed, 02 April 2008 05:53 |
EA-DamageEverything
Messages: 423 Registered: January 2005 Location: Germany
Karma: 0
|
Commander |
|
|
CarrierII wrote on Mon, 11 February 2008 22:30 | Sort of related, anyone intend to fix the serverside functionality that made EVA/CABAL say "GDI Weapons Factory destruction imminent"?
| BUMP, yes. All "destruction imminent" Sounds are inside the gmscripts.cpp from the SSGM source. Replace the follwoing part with this expanded one=
void MDB_SSGM_Building::Damaged(GameObject *obj, GameObject *damager, float damage) {
if ((Commands->Get_ID(damager) != 0 && !Settings->InvinBuild) && (Settings->GameMode == 1 || Settings->GameMode == 5)) {
if (damage > 0) {
if (Settings->LogBuildingDamage && ReportDamage) {
ReportDamage = false;
FDSMessage(StrFormat("The %s is under attack!",Translate_Preset(obj).c_str()),"_BUILDING");
Commands->Start_Timer(obj,this,Settings->BuildingDamageInt,1);
}
if (!Data->Mod) {
if (!OkHealth) OkHealth = true;
if (PlayHealth && (Commands->Get_Health(obj) + Commands->Get_Shield_Strength(obj)) <= ((Commands->Get_Max_Health(obj) + Commands->Get_Max_Shield_Strength(obj)) * 0.2f)) {
PlayHealth = false;
char *Announcement = "ERROR";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Advanced_Guard_Tower")) Announcement = "M00BGAT_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Barracks")) Announcement = "M00BGIB_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_War_Factory")) Announcement = "M00BGWF_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Power_Plant")) Announcement = "M00BGPP_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Refinery")) Announcement = "M00BGTR_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Obelisk")) Announcement = "M00BNOL_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Hand_of_Nod")) Announcement = "M00BNHN_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Airstrip")) Announcement = "M00BNAF_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Power_Plant")) Announcement = "M00BNPP_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Refinery")) Announcement = "M00BNTR_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Helipad")) Announcement = "M00BGHP_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Helipad")) Announcement = "M00BNHP_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Com_Center")) Announcement = "M00BGCC_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Com_Center")) Announcement = "M00BNCC_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Repair_Facility")) Announcement = "M00BGRF_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Repair_Facility")) Announcement = "M00BNRF_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Tiberium_Silo")) Announcement = "M00BGTS_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Tiberium_Silo")) Announcement = "M00BNTS_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Repair_Bay")) Announcement = "M00BNRF_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Repair_Pad")) Announcement = "M00BNRF_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Repair_Bay")) Announcement = "M00BGRF_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Repair_Pad")) Announcement = "M00BGRF_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_RepFac")) Announcement = "M00BGRF_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_NOD_RepFac")) Announcement = "M00BNRF_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"MP_GDI_ConstructionYard")) Announcement = "M00BGCY_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"MP_Nod_ConstructionYard")) Announcement = "M00BNCY_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Con_Yard_GDI")) Announcement = "M00BGCY_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Con_Yard_Nod")) Announcement = "M00BNCY_HLTH0001I1EVAN_SND.wav";
if (IsAlive) {
Commands->Create_2D_Sound(Announcement);
Commands->Start_Timer(obj,this,30.0f,22);
}
}
}
}
if (!Data->Mod) {
if ((Commands->Get_Health(obj) + Commands->Get_Shield_Strength(obj)) == (Commands->Get_Max_Health(obj) + Commands->Get_Max_Shield_Strength(obj)) && OkHealth) {
OkHealth = false;
if (PlayRepair) {
PlayRepair = false;
char *Announcement = "ERROR";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Advanced_Guard_Tower")) Announcement = "M00BGAT_DSGN0007I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Barracks")) Announcement = "M00BGIB_DSGN0008I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_War_Factory")) Announcement = "M00BGWF_DSGN0009I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Power_Plant")) Announcement = "M00BGPP_DSGN0009I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Refinery")) Announcement = "M00BGTR_DSGN0009I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Obelisk")) Announcement = "M00BNOL_DSGN0008I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Hand_of_Nod")) Announcement = "M00BNHN_DSGN0016I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Airstrip")) Announcement = "M00BNAF_DSGN0010I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Power_Plant")) Announcement = "M00BNPP_DSGN0010I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Refinery")) Announcement = "M00BNTR_DSGN0010I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Helipad")) Announcement = "M00BGHP_DSGN0001I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Helipad")) Announcement = "M00BNHP_DSGN0002I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Com_Center")) Announcement = "M00BGCC_DSGN0001I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Com_Center")) Announcement = "M00BNCC_DSGN0010I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Repair_Facility")) Announcement = "M00BGRF_DSGN0001I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Repair_Facility")) Announcement = "M00BNRF_DSGN0002I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Tiberium_Silo")) Announcement = "M00BGTS_DSGN0001I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Tiberium_Silo")) Announcement = "M00BNTS_DSGN0002I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Repair_Bay")) Announcement = "M00BNRF_DSGN0002I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Repair_Pad")) Announcement = "M00BNRF_DSGN0002I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Repair_Bay")) Announcement = "M00BGRF_DSGN0001I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Repair_Pad")) Announcement = "M00BGRF_DSGN0001I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_RepFac")) Announcement = "M00BGRF_DSGN0001I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_NOD_RepFac")) Announcement = "M00BNRF_DSGN0002I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"MP_GDI_ConstructionYard")) Announcement = "M00BGCY_DSGN0009I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"MP_Nod_ConstructionYard")) Announcement = "M00BNCY_DSGN0009I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Con_Yard_GDI")) Announcement = "M00BGCY_DSGN0009I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Con_Yard_Nod")) Announcement = "M00BNCY_DSGN0009I1EVAN_SND";
if (IsAlive) {
Create_Sound_Team(Announcement,Commands->Get_Position(obj),obj,Get_Object_Type(obj));
Commands->Start_Timer(obj,this,30.0f,23);
}
}
}
}
}
if (obj != damager && damage != 0.0f) {
if (Settings->GameMode == 2 && (Is_SoldierFactory(obj) || Is_Refinery(obj))) {
Commands->Set_Health(obj,Commands->Get_Max_Health(obj));
}
else if ((Settings->GameMode == 3 || Settings->GameMode == 4) && Is_SoldierFactory(obj)) {
Commands->Set_Health(obj,Commands->Get_Max_Health(obj));
}
if (Settings->InvinBuild) {
Commands->Set_Health(obj,Commands->Get_Max_Health(obj));
}
}
}
|
|
|
|
|
|
|
Re: Low Health [message #325049 is a reply to message #315858] |
Thu, 03 April 2008 10:50 |
|
renalpha
Messages: 1000 Registered: January 2007 Location: Holland - Zuid-Holland - ...
Karma: 0
|
General (1 Star) |
|
|
Zack wrote on Wed, 06 February 2008 15:52 |
One mistake and spammed to death with complaints
I was writing it notepad because I don't have my development environment at school :/
*hopefully fixed* :v If not, someone else can make it while I take the blame for bad scripting. :/
Header File:
class zbl_Health_Level : public ScriptImpClass {
void Created(GameObject *obj);
void Timer_Expired(GameObject *obj, int number);
int ID;
bool SentHealth;
bool SentArmour;
};
Source File:
void zbl_Health_Level::Created(GameObject *obj) {
ID = Get_Player_ID(obj);
SentHealth = false;
SentArmour = false;
Commands->Start_Timer(obj, this, 1.0f, 123);
}
void zbl_Health_Level::Timer_Expired(GameObject *obj, int number) {
if (number == 123) {
if (!SentHealth && !SentArmour) {
if (Commands->Get_Health(obj) <= 25 && !SentHealth) {
Commands->Create_2D_WAV_Sound("correction_3.wav"); // Change this
char Msg1[150];
sprintf(Msg1, "ppage %d Warning: Health Level Critical", ID);
Console_Input(Msg1);
SentHealth = true; // To avoid spamming the player! :/
}
else if (Commands->Get_Shield_Strength(obj) <= 50 && !SentArmour) {
Commands->Create_2D_WAV_Sound("correction_3.wav"); // again, change this...
char Msg1[150];
sprintf(Msg1, "ppage %d Warning: Armour strength critical", ID);
Console_Input(Msg1);
SentArmour = true; // avoid spamming the player >_>
}
Sent = true;
Commands->Start_Timer(obj, this, 1.0f, 123);
}
else { // already sent...Check to see if their health is above 25 and set it back to false
if (Commands->Get_Health(obj) > 25) {
SentHealth = false;
}
else if (Commands->Get_Shield_Strength(obj) > 50) {
SentArmour = false;
}
}
}
}
|
when compiling that i get
.\scripts.cpp(310) : error C2065: 'Sent' : undeclared identifier
Aircraftkiller wrote on Fri, 18 February 2011 23:50 | I figured some people will still go LOLOLOL STARVING CATS LOOOOLZ UR A FAG or some dumb shit like that. Thanks for not disappointing!
|
|
|
|
|
|
|
|
|
Re: Low Health [message #325382 is a reply to message #315780] |
Sun, 06 April 2008 05:49 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
You did actually attach this script to the player on his created event in the server solution somewhere right? I mean, you did actually attach in SSGM_Player::Created or something didn't you?
|
|
|
Re: Low Health [message #325385 is a reply to message #325382] |
Sun, 06 April 2008 06:19 |
|
renalpha
Messages: 1000 Registered: January 2007 Location: Holland - Zuid-Holland - ...
Karma: 0
|
General (1 Star) |
|
|
reborn wrote on Sun, 06 April 2008 07:49 | You did actually attach this script to the player on his created event in the server solution somewhere right? I mean, you did actually attach in SSGM_Player::Created or something didn't you?
|
no i just added it somewere below..
but how do i add that script to it
i did it over here
if (Settings->GameMode != 1) {
Commands->Set_Is_Visible(obj,false);
}
Attach_Script_Once(obj,"zbl_Health_Level","1");
Commands->Attach_Script(obj,"MDB_SSGM_Taunt_Key","Taunt1,h_a_a0a0_l12");
Commands->Attach_Script(obj,"MDB_SSGM_Taunt_Key","Taunt2,H_A_a0a0_L22");
it compiles but no sound.
Aircraftkiller wrote on Fri, 18 February 2011 23:50 | I figured some people will still go LOLOLOL STARVING CATS LOOOOLZ UR A FAG or some dumb shit like that. Thanks for not disappointing!
|
[Updated on: Sun, 06 April 2008 06:31] Report message to a moderator
|
|
|
Re: Low Health [message #325403 is a reply to message #315780] |
Sun, 06 April 2008 08:56 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
I would write a ::Damaged event for MDB_SSGM_Player and use the main part of Zack's function in there rather then attach this script to the player on ::Created.
Although attaching the script like:
Commands->Attach_Script(obj,"zbl_Health_Level","");
to the player object when he is ::Created should work (if the script works properly (which I think it does)).
[Updated on: Sun, 06 April 2008 08:56] Report message to a moderator
|
|
|
|
|
|
Re: Low Health [message #325683 is a reply to message #315780] |
Wed, 09 April 2008 00:30 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
If you're both attaching it to the player correctly then there's something wrong with Zacks code I guess. You need to get him to notice the topic.
I really would however just take aspects of his code and add a ::Damaged event to SSGM_player.
|
|
|
Goto Forum:
Current Time: Sun Dec 29 18:54:16 MST 2024
Total time taken to generate the page: 0.01802 seconds
|