1.1.6 released. Changelog: - Removed placement of "sound,character,nazi_zombie_factory,all_sp" in mapname.csv which was causing a 1600 sounds error when trying to use a generated map with UGX Mod v1.0.x. This line has been moved to dlc3.csv in the latest update to the UGX Modtools Patch (v1.0.6) which can be downloaded from the UGX Wiki. The UGX Mod Standalone dlc3.csv will overwrite the Modtools Patch dlc3.csv, eliminating the possibility for the character sounds to be included when they shouldn't be.
Hey Trem just wanted to ask this every time I make a map with the UGX Script Placer I always spawn in with no weapon but if I hit the switch weapon button I get a super OP Colt. It's an easy fix it but any clue what could have been causing this?
Hey Trem just wanted to ask this every time I make a map with the UGX Script Placer I always spawn in with no weapon but if I hit the switch weapon button I get a super OP Colt. It's an easy fix it but any clue what could have been causing this?
Paste the generated _loadout.gsc from your mod here.
set_player_viewmodel( "viewmodel_usa_marinewet_rolledup_arms"); set_player_interactive_hands( "viewmodel_usa_marinewet_rolledup_player" ); // Uncomment this if you want "interactive" hands for Banzai
level.campaign = "american"; return; } else if( IsSubStr( level.script, "intro_" ) ) // Support for the intro movies for the campaigns { return; } else if( level.script == "credits" ) { set_player_viewmodel( "viewmodel_usa_marine_arms"); set_player_interactive_hands( "viewmodel_usa_marine_player"); level.campaign = "american"; return; }
//------------------------------------ // level.script is not a single player level. give default weapons. println ("loadout.gsc: No level listing in _loadout.gsc, giving default guns!!!! =======================");
// SRS 6/29/2008: updated to allow defaulted maps to have different level.campaign default viewarms if( IsDefined( level.campaign ) && level.campaign == "russian" ) { set_player_viewmodel( "viewmodel_rus_guard_arms"); } else { set_player_viewmodel( "viewmodel_usa_marine_arms"); level.campaign = "american"; } }
// This will precache and set the loadout rather than duplicating work. add_weapon( weapon_name ) { PrecacheItem( weapon_name ); level.player_loadout[level.player_loadout.size] = weapon_name; }
// This sets the secondary offhand type when the player spawns in set_secondary_offhand( weapon_name ) { level.player_secondaryoffhand = weapon_name; }
// This sets the the switchtoweapon when the player spawns in set_switch_weapon( weapon_name ) { level.player_switchweapon = weapon_name; }
// This sets the the action slot for when the player spawns in set_action_slot( num, option1, option2 ) {
if( num < 2 || num > 4) { if(level.script != "pby_fly") // GLocke 11/15/2007 - The flying level uses all 4 dpad slots { // Not using 1, since it's defaulted to grenade launcher. assertmsg( "_loadout.gsc: set_action_slot must be set with a number greater than 1 and less than 5" ); } }
// Glocke 12/03/07 - added precaching of weapon type for action slot if(IsDefined(option1)) { if(option1 == "weapon") { PrecacheItem(option2); level.player_loadout[level.player_loadout.size] = option2; } }
// Sets the player's handmodel used for "interactive" hands and banzai attacks set_player_interactive_hands( model ) { level.player_interactive_hands = model; PrecacheModel( level.player_interactive_hands ); }
// MikeD (4/18/2008): In order to be able to throw a grenade back, the player first needs to at // least have a grenade in his inventory before doing so. So let's try to find out and give it to him // then take it away. gave_grenade = false;
// First check to see if we are giving him a grenade, if so, skip this process. for( i = 0; i < level.player_loadout.size; i++ ) { if( WeaponType( level.player_loadout[i] ) == "grenade" ) { gave_grenade = true; break; } }
// If we do not have a grenade then try to automatically assign one // If we can't automatically do this, then the scripter needs to do by hand in the level if( !gave_grenade ) { if( IsDefined( level.player_grenade ) ) { grenade = level.player_grenade; self GiveWeapon( grenade ); self SetWeaponAmmoStock( grenade, 0 ); gave_grenade = true; }
if( !gave_grenade ) { // Get all of the AI and assign any grenade to the player ai = GetAiArray( "allies" );
println( "^3LOADOUT ISSUE: Unable to give a grenade, the player need to be given a grenade and then take it away in order for the player to throw back grenades, but not have any grenades in his inventory." ); } }
for( i = 0; i < level.player_loadout.size; i++ ) { self GiveWeapon( level.player_loadout[i] ); }
if( IsDefined( level.player_switchweapon ) ) { // the wait was added to fix a revive issue with the host // for some reson the SwitchToWeapon message gets lost // this can be removed if that is ever resolved if ( isdefined(wait_for_switch_weapon) && wait_for_switch_weapon == true ) { wait(0.5); } self SwitchToWeapon( level.player_switchweapon ); }
wait(0.5);
self player_flag_set("loadout_given"); }
give_model( class ) { // switch ( level.campaign ) // { // case "russian": // self mptype\player_rus_guard::main(); // break; // case "american": // default: // self mptype\player_usa_marine::main(); // break;
switch( self.entity_num) { case 0: character\char_zomb_player_0::main(); break; case 1: character\char_zomb_player_1::main(); break; case 2: character\char_zomb_player_2::main(); break; case 3: character\char_zomb_player_3::main(); break; }
// MikeD (3/28/2008): If specified, give the player his hands if( IsDefined( level.player_viewmodel ) ) { self SetViewModel( level.player_viewmodel ); } }
/////////////////////////////////////////////// // SavePlayerWeaponStatePersistent // // Saves the player's weapons and ammo state persistently( in the game variable ) // so that it can be restored in a different map. // You can use strings for the slot: // // SavePlayerWeaponStatePersistent( "russianCampaign" ); // // Or you can just use numbers: // // SavePlayerWeaponStatePersistent( 0 ); // SavePlayerWeaponStatePersistent( 1 ); etc. // // In a different map, you can restore using RestorePlayerWeaponStatePersistent( slot ); // Make sure that you always persist the data between map changes.
SavePlayerWeaponStatePersistent( slot ) { current = level.player getCurrentWeapon(); if ( ( !isdefined( current ) ) || ( current == "none" ) ) assertmsg( "Player's current weapon is 'none' or undefined. Make sure 'disableWeapons()' has not been called on the player when trying to save weapon states." ); game[ "weaponstates" ][ slot ][ "current" ] = current;
if ( isdefined( level.legit_weapons ) ) { // weapon doesn't exist in this level if ( !isdefined( level.legit_weapons[ weapName ] ) ) continue; }
// don't carry over C4 or claymores if ( weapName == "c4" ) continue; if ( weapName == "claymore" ) continue; level.player GiveWeapon( weapName ); level.player GiveMaxAmmo( weapName );
// below is only used if we want to NOT give max ammo // level.player SetWeaponAmmoClip( weapName, game[ "weaponstates" ][ slot ][ "list" ][ weapIdx ][ "clip" ] ); // level.player SetWeaponAmmoStock( weapName, game[ "weaponstates" ][ slot ][ "list" ][ weapIdx ][ "stock" ] ); }
set_player_viewmodel( "viewmodel_usa_marinewet_rolledup_arms"); set_player_interactive_hands( "viewmodel_usa_marinewet_rolledup_player" ); // Uncomment this if you want "interactive" hands for Banzai
level.campaign = "american"; return; } else if( IsSubStr( level.script, "intro_" ) ) // Support for the intro movies for the campaigns { return; } else if( level.script == "credits" ) { set_player_viewmodel( "viewmodel_usa_marine_arms"); set_player_interactive_hands( "viewmodel_usa_marine_player"); level.campaign = "american"; return; }
//------------------------------------ // level.script is not a single player level. give default weapons. println ("loadout.gsc: No level listing in _loadout.gsc, giving default guns!!!! =======================");
// SRS 6/29/2008: updated to allow defaulted maps to have different level.campaign default viewarms if( IsDefined( level.campaign ) && level.campaign == "russian" ) { set_player_viewmodel( "viewmodel_rus_guard_arms"); } else { set_player_viewmodel( "viewmodel_usa_marine_arms"); level.campaign = "american"; } }
// This will precache and set the loadout rather than duplicating work. add_weapon( weapon_name ) { PrecacheItem( weapon_name ); level.player_loadout[level.player_loadout.size] = weapon_name; }
// This sets the secondary offhand type when the player spawns in set_secondary_offhand( weapon_name ) { level.player_secondaryoffhand = weapon_name; }
// This sets the the switchtoweapon when the player spawns in set_switch_weapon( weapon_name ) { level.player_switchweapon = weapon_name; }
// This sets the the action slot for when the player spawns in set_action_slot( num, option1, option2 ) {
if( num < 2 || num > 4) { if(level.script != "pby_fly") // GLocke 11/15/2007 - The flying level uses all 4 dpad slots { // Not using 1, since it's defaulted to grenade launcher. assertmsg( "_loadout.gsc: set_action_slot must be set with a number greater than 1 and less than 5" ); } }
// Glocke 12/03/07 - added precaching of weapon type for action slot if(IsDefined(option1)) { if(option1 == "weapon") { PrecacheItem(option2); level.player_loadout[level.player_loadout.size] = option2; } }
// Sets the player's handmodel used for "interactive" hands and banzai attacks set_player_interactive_hands( model ) { level.player_interactive_hands = model; PrecacheModel( level.player_interactive_hands ); }
// MikeD (4/18/2008): In order to be able to throw a grenade back, the player first needs to at // least have a grenade in his inventory before doing so. So let's try to find out and give it to him // then take it away. gave_grenade = false;
// First check to see if we are giving him a grenade, if so, skip this process. for( i = 0; i < level.player_loadout.size; i++ ) { if( WeaponType( level.player_loadout[i] ) == "grenade" ) { gave_grenade = true; break; } }
// If we do not have a grenade then try to automatically assign one // If we can't automatically do this, then the scripter needs to do by hand in the level if( !gave_grenade ) { if( IsDefined( level.player_grenade ) ) { grenade = level.player_grenade; self GiveWeapon( grenade ); self SetWeaponAmmoStock( grenade, 0 ); gave_grenade = true; }
if( !gave_grenade ) { // Get all of the AI and assign any grenade to the player ai = GetAiArray( "allies" );
println( "^3LOADOUT ISSUE: Unable to give a grenade, the player need to be given a grenade and then take it away in order for the player to throw back grenades, but not have any grenades in his inventory." ); } }
for( i = 0; i < level.player_loadout.size; i++ ) { self GiveWeapon( level.player_loadout[i] ); }
if( IsDefined( level.player_switchweapon ) ) { // the wait was added to fix a revive issue with the host // for some reson the SwitchToWeapon message gets lost // this can be removed if that is ever resolved if ( isdefined(wait_for_switch_weapon) && wait_for_switch_weapon == true ) { wait(0.5); } self SwitchToWeapon( level.player_switchweapon ); }
wait(0.5);
self player_flag_set("loadout_given"); }
give_model( class ) { // switch ( level.campaign ) // { // case "russian": // self mptype\player_rus_guard::main(); // break; // case "american": // default: // self mptype\player_usa_marine::main(); // break;
switch( self.entity_num) { case 0: character\char_zomb_player_0::main(); break; case 1: character\char_zomb_player_1::main(); break; case 2: character\char_zomb_player_2::main(); break; case 3: character\char_zomb_player_3::main(); break; }
// MikeD (3/28/2008): If specified, give the player his hands if( IsDefined( level.player_viewmodel ) ) { self SetViewModel( level.player_viewmodel ); } }
/////////////////////////////////////////////// // SavePlayerWeaponStatePersistent // // Saves the player's weapons and ammo state persistently( in the game variable ) // so that it can be restored in a different map. // You can use strings for the slot: // // SavePlayerWeaponStatePersistent( "russianCampaign" ); // // Or you can just use numbers: // // SavePlayerWeaponStatePersistent( 0 ); // SavePlayerWeaponStatePersistent( 1 ); etc. // // In a different map, you can restore using RestorePlayerWeaponStatePersistent( slot ); // Make sure that you always persist the data between map changes.
SavePlayerWeaponStatePersistent( slot ) { current = level.player getCurrentWeapon(); if ( ( !isdefined( current ) ) || ( current == "none" ) ) assertmsg( "Player's current weapon is 'none' or undefined. Make sure 'disableWeapons()' has not been called on the player when trying to save weapon states." ); game[ "weaponstates" ][ slot ][ "current" ] = current;
if ( isdefined( level.legit_weapons ) ) { // weapon doesn't exist in this level if ( !isdefined( level.legit_weapons[ weapName ] ) ) continue; }
// don't carry over C4 or claymores if ( weapName == "c4" ) continue; if ( weapName == "claymore" ) continue; level.player GiveWeapon( weapName ); level.player GiveMaxAmmo( weapName );
// below is only used if we want to NOT give max ammo // level.player SetWeaponAmmoClip( weapName, game[ "weaponstates" ][ slot ][ "list" ][ weapIdx ][ "clip" ] ); // level.player SetWeaponAmmoStock( weapName, game[ "weaponstates" ][ slot ][ "list" ][ weapIdx ][ "stock" ] ); }
Ensure you have the latest version of the script placer as this file does not match the file that the script placer places. Either the version you have is old or you replaced the updated file.
Ensure you have the latest version of the script placer as this file does not match the file that the script placer places. Either the version you have is old or you replaced the updated file.
Well recently I have had to replace things in my mod tools, because I was an idiot and hit the converter option by accident. Thanks for clarifying that though Saje I really do appreciate it !
Last Edit: August 09, 2014, 04:09:24 am by ValenciaRicardo1
Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
Well recently I have had to replace things in my mod tools, because I was an idiot and hit the converter option by accident. Thanks for clarifying that though Saje I really do appreciate it !
Tom BMX has a modified converter.exe on his downloads section that prevents converter from ruining your raw directory - I suggest using it