Current 4.1 SSGM bugs/mistakes [message #489308] |
Wed, 17 September 2014 21:43 ![Go to next message Go to previous message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/custom_avatars/20487.jpg) |
Xpert
Messages: 1588 Registered: December 2005 Location: New York City
Karma:
|
General (1 Star) |
|
|
I decided to get back into my coding again for a little and I am in the process of converting my plugins to 4.1. In the meantime, I've also come across a few SSGM problems.
1. DNA drops
When it comes to the tier 3 class characters, it doesn't randomize properly.
Toggle Spoiler
void SSGM_Powerup_Mobius::Custom(GameObject *obj, int message, int param, GameObject *sender)
{
if (message == CUSTOM_EVENT_POWERUP_GRANTED)
{
int RandomNum = Commands->Get_Random_Int(1,2);
if (RandomNum == 1)
{
Change_Character(sender,"CnC_Ignatio_Mobius_ALT2");
}
else if (RandomNum == 2)
{
Change_Character(sender,"CnC_Ignatio_Mobius");
}
}
}
It will never reach the random number of 2. With the way SSGM's current randomizer works.
Same for stuff like:
Toggle Spoiler
void SSGM_Powerup_Havoc::Custom(GameObject *obj, int message, int param, GameObject *sender)
{
if (message == CUSTOM_EVENT_POWERUP_GRANTED)
{
int RandomNum = Commands->Get_Random_Int(1,4);
if (RandomNum == 1)
{
Change_Character(sender,"CnC_GDI_MiniGunner_3Boss");
}
else if (RandomNum == 2)
{
Change_Character(sender,"CnC_GDI_MiniGunner_3Boss_ALT2");
}
else if (RandomNum == 3)
{
Change_Character(sender,"CnC_GDI_MiniGunner_3Boss_ALT3");
}
else if (RandomNum == 4)
{
Change_Character(sender,"CnC_GDI_MiniGunner_3Boss_ALT4");
}
}
}
In this one, it will never reach the random number of 4.
2. Missing or incorrect powerup sounds.
The armor sounds are wrong:
Toggle Spoiler
else if ( (strstr(Commands->Get_Preset_Name(obj),"CnC_POW_Armor_Max")) || (strstr(Commands->Get_Preset_Name(obj),"POW_Armor_100")) )
{
Send_Message_Player(sender,104,234,40,"Full Body Armor acquired.");
Create_2D_WAV_Sound_Player(sender,"m00prba_aqob0004i1evag_snd.wav");
}
else if (strstr(Commands->Get_Preset_Name(obj),"CnC_POW_Armor_Max"))
{
Send_Message_Player(sender,104,234,40,"Full Body Armor acquired.");
Create_2D_WAV_Sound_Player(sender,"m00prba_aqob0004i1evag_snd.wav");
}
else if (strstr(Commands->Get_Preset_Name(obj),"POW_Armor_100"))
{
Send_Message_Player(sender,104,234,40,"Kevlar Vest Armor acquired.");
Create_2D_WAV_Sound_Player(sender,"m00prkv_aqob0004i1evag_snd.wav");
}
else if (strstr(Commands->Get_Preset_Name(obj),"POW_Armor_050"))
{
Send_Message_Player(sender,104,234,40,"Breast Plate Armor acquired.");
Create_2D_WAV_Sound_Player(sender,"m00prbp_aqob0004i1evag_snd.wav");
}
It should be like this:
Toggle Spoiler
else if (strstr(Commands->Get_Preset_Name(obj),"POW_Pistol_Player"))
{
Send_Message_Player(sender,104,234,40,"Automatic Pistol acquired.");
Create_2D_WAV_Sound_Player(sender,"m00pwap_aqob0004i1evag_snd.wav");
}
else if ( (strstr(Commands->Get_Preset_Name(obj),"CnC_POW_Armor_Max")) || (strstr(Commands->Get_Preset_Name(obj),"POW_Armor_100")) )
{
Send_Message_Player(sender,104,234,40,"Full Body Armor acquired.");
Create_2D_WAV_Sound_Player(sender,"m00prba_aqob0004i1evag_snd.wav");
}
else if (strstr(Commands->Get_Preset_Name(obj),"POW_Armor_050"))
{
Send_Message_Player(sender,104,234,40,"Kevlar Vest Armor acquired.");
Create_2D_WAV_Sound_Player(sender,"m00prkv_aqob0004i1evag_snd.wav");
}
else if (strstr(Commands->Get_Preset_Name(obj),"POW_Armor_025"))
{
Send_Message_Player(sender,104,234,40,"Breast Plate Armor acquired.");
Create_2D_WAV_Sound_Player(sender,"m00prbp_aqob0004i1evag_snd.wav");
}
Also missing the Personal Ion Cannon (PIC) sound:
Toggle Spoiler
else if (strstr(Commands->Get_Preset_Name(obj),"POW_PersonalIonCannon_Player"))
{
Send_Message_Player(sender,104,234,40,"Personal Ion Cannon acquired.");
Create_2D_WAV_Sound_Player(sender,"m00pwpi_aqob0004i1evag_snd.wav");
if (!SBHCanPickupDropWeapons)
{
if (strcmp(Commands->Get_Preset_Name(sender),"CnC_Nod_FlameThrower_2SF") == 0)
{
Remove_Weapon(sender,"Weapon_PersonalIonCannon_Player");
}
}
}
Timed C4 and Remote C4 currently has 1 sound for 1 of the C4 presets each. Here's the additional ones:
Toggle Spoiler
else if ( (strstr(Commands->Get_Preset_Name(obj),"POW_MineTimed_Player")) || (strstr(Commands->Get_Preset_Name(obj),"CnC_POW_MineTimed_Player_01")) || (strstr(Commands->Get_Preset_Name(obj),"CnC_POW_MineTimed_Player_02")) )
{
Send_Message_Player(sender,104,234,40,"Timed C4 acquired.");
Create_2D_WAV_Sound_Player(sender,"m00pact_aqob0004i1evag_snd.wav");
if (!SBHCanPickupDropWeapons)
{
if (strcmp(Commands->Get_Preset_Name(sender),"CnC_Nod_FlameThrower_2SF") == 0)
{
Remove_Weapon(sender,"Weapon_MineTimed_Player");
Remove_Weapon(sender,"CnC_Weapon_MineTimed_Player");
Remove_Weapon(sender,"CnC_Weapon_MineTimed_Player_2Max");
}
}
}
if ( (strstr(Commands->Get_Preset_Name(obj),"POW_MineRemote_Player")) || (strstr(Commands->Get_Preset_Name(obj),"CnC_POW_MineRemote_01")) || (strstr(Commands->Get_Preset_Name(obj),"CnC_POW_MineRemote_02")) )
{
Send_Message_Player(sender,104,234,40,"Remote C4 acquired.");
Create_2D_WAV_Sound_Player(sender,"m00pac4_aqob0004i1evag_snd.wav");
if (!SBHCanPickupDropWeapons)
{
if (strcmp(Commands->Get_Preset_Name(sender),"CnC_Nod_FlameThrower_2SF") == 0)
{
Remove_Weapon(sender,"Weapon_MineRemote_Player");
Remove_Weapon(sender,"CnC_Weapon_MineRemote_Player");
Remove_Weapon(sender,"CnC_Weapon_MineRemote_Player_2Max");
}
}
}
This fixes the double repair gun issue when you pickup a weak gun while having the stronger one and vice versa.
Toggle Spoiler
else if (strstr(Commands->Get_Preset_Name(obj),"POW_RepairGun_Player"))
{
if (Has_Weapon(sender,"CnC_Weapon_RepairGun_Player_Special"))
{
Send_Message_Player(sender,104,234,40,"Maintenance Tool Battery acquired.");
Create_2D_WAV_Sound_Player(sender,"m00parp_aqob0004i1evag_snd.wav");
Remove_Weapon(sender,"Weapon_RepairGun_Player");//remove the dubplicate weak repairgun
if (!SBHCanPickupDropWeapons)
{
if (strcmp(Commands->Get_Preset_Name(sender),"CnC_Nod_FlameThrower_2SF") == 0)
{
Remove_Weapon(sender,"CnC_Weapon_RepairGun_Player_Special");
}
}
}
else
{
Send_Message_Player(sender,104,234,40,"Maintenance Tool acquired.");
Create_2D_WAV_Sound_Player(sender,"m00pwrp_aqob0001i1evag_snd.wav");
if (!SBHCanPickupDropWeapons)
{
if (strcmp(Commands->Get_Preset_Name(sender),"CnC_Nod_FlameThrower_2SF") == 0)
{
Remove_Weapon(sender,"CnC_Weapon_RepairGun_Player_Special");
}
}
}
}
There's a space in the messages when doing !c4.
Toggle Spoiler
StringClass msg;
msg.Format("ppage %d Remote: %d - Proximity: %d - Total: %d - Limit: %d",Get_Player_ID(Player),Remote,Prox,Remote+Prox,Get_Mine_Limit());
Console_Input(msg);
It's between the words Remote and Proximity. You'll see it.
Keycard sounds if you want to add them:
Toggle Spoiler
else if (strstr(Commands->Get_Preset_Name(obj),"Level_01_Keycard"))
{
Send_Message_Player(sender,104,234,40,"Level-1 Security Key acquired.");
Create_2D_WAV_Sound_Player(sender,"00-n090e.wav");
}
else if (strstr(Commands->Get_Preset_Name(obj),"Level_02_Keycard"))
{
Send_Message_Player(sender,104,234,40,"Level-2 Security Key acquired.");
Create_2D_WAV_Sound_Player(sender,"00-n092e.wav");
}
else if (strstr(Commands->Get_Preset_Name(obj),"Level_03_Keycard"))
{
Send_Message_Player(sender,104,234,40,"Level-3 Security Key acquired.");
Create_2D_WAV_Sound_Player(sender,"00-n094e.wav");
}
Also, the current crate system; it has always been a bug but the points crate and money crate doesn't randomize properly either. You will never get depoints and you will never get demoney.
The spy crate still works even after the person kills a building.
Can easily apply this:
Toggle Spoiler
Apply this in the crate code
Commands->Set_Is_Visible(sender,false);
And then attach this script on the object create.
void SSGM_Crate_Building::Killed(GameObject *obj,GameObject *killer)
{
Commands->Set_Is_Visible(killer,true); // to reverse the spy crate effect after killing a building
}
void Crate::OnObjectCreate(void *data,GameObject *obj)
{
if (obj->As_PhysicalGameObj() && obj->As_PhysicalGameObj()->As_PowerUpGameObj())
{
if (stristr(Commands->Get_Preset_Name(obj),"crate"))
{
Attach_Script_Once(obj,"SSGM_Crate","");
}
}
else if (obj->As_BuildingGameObj())
{
Attach_Script_Once(obj,"SSGM_Crate_Building","");
}
}
It's basically a duplicate of the old methods in SSAOW.
And finally, the vehicle wreckages shouldn't have a timer to set the skin to blamo. Just set the skin to SkinVehicleHeavy instead of Light and remove the timer.
![http://i32.photobucket.com/albums/d42/XpertMaverick/xpertyankee.jpg](http://i32.photobucket.com/albums/d42/XpertMaverick/xpertyankee.jpg)
Creator of NetGuard, an IRC network regulator.
Developer of the CloudyServ 0.982-X project.
Developer of the CloudyServ Ren-X bot.
Part time streamer - https://twitch.tv/gg_wonder
|
|
|