Posts: 3,054
Threads: 268
Joined: Feb 2011
Reputation:
63
SPECIAL FOR SuperNovaAO.
THE TOPIC THAT IS STARTED BY ~ME~.
Quote:Hey, guyz, I'm making my mod DefendTheHouse and I need to make ALL the players (2 teams) to have their own base, only one spawn point for each team. for example nuketown. How to make one team ALWAYS spawn near green&white house and another nearby yellow house?
it seems that i need to use _globallogic_spawn.gsc but i dunno how. requesting for help...
THNX Big Grin
there, in that thread, Ivankec said that he needed coordinates, but i asked him for code. still silence.
Posts: 6,052
Threads: 429
Joined: Oct 2010
cant remeber where its posted and i am rly too lazy to look into the gsc file(s).
Posts: 3,054
Threads: 268
Joined: Feb 2011
Reputation:
63
come on, find few mins to look there. i can even give you _globallogic_spawn.gsc here it is
PHP Code: #include common_scripts\utility; #include maps\mp\_utility;
TimeUntilSpawn( includeTeamkillDelay ) { if ( level.inGracePeriod && !self.hasSpawned ) return 0; respawnDelay = 0; if ( self.hasSpawned ) { result = self [[level.onRespawnDelay]](); if ( isDefined( result ) ) respawnDelay = result; else respawnDelay = GetDvarInt( "scr_" + level.gameType + "_playerrespawndelay" ); if ( includeTeamkillDelay && self.teamKillPunish ) respawnDelay += mapsmpgametypes_globallogic_player::TeamKillDelay(); }
waveBased = (GetDvarInt( "scr_" + level.gameType + "_waverespawndelay" ) > 0);
if ( waveBased ) return self TimeUntilWaveSpawn( respawnDelay ); return respawnDelay; }
maySpawn() { if ( isDefined( level.maySpawn ) && !( self [[level.maySpawn]]() ) ) { return false; } if ( level.inOvertime ) return false;
if ( level.numLives ) { if ( level.teamBased ) gameHasStarted = ( level.everExisted[ "axis" ] && level.everExisted[ "allies" ] ); else gameHasStarted = (level.maxPlayerCount > 1) || ( !isOneRound() && !isFirstRound() );
if ( !self.pers["lives"] && gameHasStarted ) { return false; } else if ( gameHasStarted ) { // disallow spawning for late comers if ( !level.inGracePeriod && !self.hasSpawned && !level.wagerMatch ) return false; } } return true; }
TimeUntilWaveSpawn( minimumWait ) { // the time we'll spawn if we only wait the minimum wait. earliestSpawnTime = gettime() + minimumWait * 1000; lastWaveTime = level.lastWave[self.pers["team"]]; waveDelay = level.waveDelay[self.pers["team"]] * 1000; if( waveDelay == 0 ) return 0; // the number of waves that will have passed since the last wave happened, when the minimum wait is over. numWavesPassedEarliestSpawnTime = (earliestSpawnTime - lastWaveTime) / waveDelay; // rounded up numWaves = ceil( numWavesPassedEarliestSpawnTime ); timeOfSpawn = lastWaveTime + numWaves * waveDelay; // avoid spawning everyone on the same frame if ( isdefined( self.waveSpawnIndex ) ) timeOfSpawn += 50 * self.waveSpawnIndex; return (timeOfSpawn - gettime()) / 1000; }
stopPoisoningAndFlareOnSpawn() { self endon("disconnect");
self.inPoisonArea = false; self.inBurnArea = false; self.inFlareVisionArea = false; self.inGroundNapalm = false; }
spawnPlayer() { pixbeginevent( "spawnPlayer_preUTS" );
self endon("disconnect"); self endon("joined_spectators"); self notify("spawned"); level notify("player_spawned"); self notify("end_respawn");
self setSpawnVariables(); if (!self.hasSpawned) { //if this is the first spawn, kicking off a thread to start the gamplay music self thread sndStartMusicSystem (); } if ( level.teamBased ) self.sessionteam = self.team; else { self.sessionteam = "none"; self.ffateam = self.team; }
hadSpawned = self.hasSpawned;
self.sessionstate = "playing"; self.spectatorclient = -1; self.killcamentity = -1; self.archivetime = 0; self.psoffsettime = 0; self.statusicon = ""; self.damagedPlayers = []; if ( GetDvarInt( #"scr_csmode" ) > 0 ) self.maxhealth = GetDvarInt( #"scr_csmode" ); else self.maxhealth = mapsmpgametypes_tweakables::getTweakableValue( "player", "maxhealth" ); self.health = self.maxhealth; self.friendlydamage = undefined; self.hasSpawned = true; self.spawnTime = getTime(); self.afk = false; if ( self.pers["lives"] && ( !isDefined( level.takeLivesOnDeath ) || ( level.takeLivesOnDeath == false ) ) ) { self.pers["lives"]--; if ( self.pers["lives"] == 0 ) level notify( "player_eliminated" ); } self.lastStand = undefined; self.revivingTeammate = false; self.burning = undefined;
self.disabledWeapon = 0; self resetUsability(); self.diedOnVehicle= undefined;
if ( !self.wasAliveAtMatchStart ) { if ( level.inGracePeriod || mapsmpgametypes_globallogic_utils::getTimePassed() < 20 * 1000 ) self.wasAliveAtMatchStart = true; } //self clearPerks();
// self setClientDvar( "cg_thirdPerson", "0" ); self setDepthOfField( 0, 0, 512, 512, 4, 0 ); if( level.console ) self setClientDvar( "cg_fov", "65" ); { pixbeginevent("onSpawnPlayer"); if ( IsDefined( level.onSpawnPlayerUnified ) && GetDvarInt( #"scr_disableunifiedspawning" ) == 0 ) { self [[level.onSpawnPlayerUnified]](); } else { self [[level.onSpawnPlayer]](); } if ( IsDefined( level.playerSpawnedCB ) ) { self [[level.playerSpawnedCB]](); } pixendevent(); } self mapsmpgametypes_missions::playerSpawned(); pixendevent( "END: spawnPlayer_preUTS" );
level thread mapsmpgametypes_globallogic::updateTeamStatus(); pixbeginevent( "spawnPlayer_postUTS" ); self thread stopPoisoningAndFlareOnSpawn();
self StopBurning(); assert( mapsmpgametypes_globallogic_utils::isValidClass( self.class ) ); self mapsmpgametypes_class::setClass( self.class ); self mapsmpgametypes_class::giveLoadout( self.team, self.class ); if ( level.inPrematchPeriod ) { self freeze_player_controls( true ); //self _disableWeapon(); self setClientDvar( "scr_objectiveText", mapsmpgametypes_globallogic_ui::getObjectiveHintText( self.pers["team"] ) );
team = self.pers["team"]; //CDC New music system if( isDefined( self.pers["music"].spawn ) && self.pers["music"].spawn == false ) { if (level.wagerMatch) { music = "SPAWN_WAGER"; } else { music = game["music"]["spawn_" + team]; } self thread mapsmpgametypes_globallogic_audio::set_music_on_player( music, false, false ); self.pers["music"].spawn = true; } if ( level.splitscreen ) { if ( isDefined( level.playedStartingMusic ) ) music = undefined; else level.playedStartingMusic = true; }
// thread maps\mp\gametypes\_hud_message::oldNotifyMessage( game["strings"][team + "_name"], undefined, game["icons"][team], game["colors"][team], music ); thread mapsmpgametypes_hud_message::oldNotifyMessage( game["strings"][team + "_name"], undefined, game["icons"][team], game["colors"][team] ); if ( isDefined( game["dialog"]["gametype"] ) && (!level.splitscreen || self == level.players[0]) ) { if( !isDefined( level.inFinalFight ) || !level.inFinalFight ) { if( level.hardcoreMode ) self mapsmpgametypes_globallogic_audio::leaderDialogOnPlayer( "gametype_hardcore" ); else self mapsmpgametypes_globallogic_audio::leaderDialogOnPlayer( "gametype" ); } }
thread mapsmpgametypes_hud::showClientScoreBar( 5.0 ); } else { self freeze_player_controls( false ); self enableWeapons(); if ( !hadSpawned && game["state"] == "playing" ) { pixbeginevent("sound"); team = self.team; //CDC New music system TODO add short spawn music if( isDefined( self.pers["music"].spawn ) && self.pers["music"].spawn == false ) { self thread mapsmpgametypes_globallogic_audio::set_music_on_player( "SPAWN_SHORT", false, false ); self.pers["music"].spawn = true; } if ( level.splitscreen ) { if ( isDefined( level.playedStartingMusic ) ) music = undefined; else level.playedStartingMusic = true; } thread mapsmpgametypes_hud_message::oldNotifyMessage( game["strings"][team + "_name"], undefined, game["icons"][team], game["colors"][team] ); if ( isDefined( game["dialog"]["gametype"] ) && (!level.splitscreen || self == level.players[0]) ) { if( !isDefined( level.inFinalFight ) || !level.inFinalFight ) { if( level.hardcoreMode ) self mapsmpgametypes_globallogic_audio::leaderDialogOnPlayer( "gametype_hardcore" ); else self mapsmpgametypes_globallogic_audio::leaderDialogOnPlayer( "gametype" );
if ( team == game["attackers"] ) self mapsmpgametypes_globallogic_audio::leaderDialogOnPlayer( "offense_obj", "introboost" ); else self mapsmpgametypes_globallogic_audio::leaderDialogOnPlayer( "defense_obj", "introboost" ); } }
self setClientDvar( "scr_objectiveText", mapsmpgametypes_globallogic_ui::getObjectiveHintText( self.pers["team"] ) ); thread mapsmpgametypes_hud::showClientScoreBar( 5.0 ); pixendevent("sound"); } }
if ( GetDvar( #"scr_showperksonspawn" ) == "" ) setdvar( "scr_showperksonspawn", "1" );
// Make sure that we dont show the perks on spawn if we are in hardcore. if ( level.hardcoreMode ) setdvar( "scr_showperksonspawn", "0" );
if ( !level.splitscreen && GetDvarInt( #"scr_showperksonspawn" ) == 1 && game["state"] != "postgame" ) { pixbeginevent("showperksonspawn"); //Checks to make sure perks are allowed. - Leif if ( GetDvarInt( #"scr_game_perks" ) == 1) { perks = mapsmpgametypes_globallogic::getPerks( self );
self mapsmpgametypes_hud_util::showPerk( 0, perks[0], 10); self mapsmpgametypes_hud_util::showPerk( 1, perks[1], 10); self mapsmpgametypes_hud_util::showPerk( 2, perks[2], 10); self mapsmpgametypes_hud_util::showPerk( 3, perks[3], 10); } self thread mapsmpgametypes_globallogic_ui::hideLoadoutAfterTime( 3.0 ); self thread mapsmpgametypes_globallogic_ui::hideLoadoutOnDeath(); pixendevent("showperksonspawn"); } pixendevent( "END: spawnPlayer_postUTS" ); waittillframeend; self notify( "spawned_player" );
self mapsmpgametypes_gametype_variants::onPlayerSpawn();
self logstring( "S " + self.origin[0] + " " + self.origin[1] + " " + self.origin[2] );
setdvar( "scr_selecting_location", "" ); self thread mapsmpgametypes_hardpoints::killstreakWaiter(); //self thread maps\mp\_artillery::artilleryWaiter(); self thread mapsmp_mortar::mortarWaiter();
self thread mapsmp_vehicles::vehicleDeathWaiter(); self thread mapsmp_vehicles::turretDeathWaiter(); /# if ( GetDvarInt( #"scr_xprate" ) > 0 ) self thread mapsmpgametypes_globallogic_score::xpRateThread(); #/ //self thread maps\mp\gametypes\_globallogic_utils::testHPs(); //self thread maps\mp\gametypes\_globallogic_utils::testShock(); //self thread maps\mp\gametypes\_globallogic_utils::testMenu(); if ( game["state"] == "postgame" ) { assert( !level.intermission ); // We're in the victory screen, but before intermission self mapsmpgametypes_globallogic_player::freezePlayerForRoundEnd(); } }
spawnSpectator( origin, angles ) { self notify("spawned"); self notify("end_respawn"); in_spawnSpectator( origin, angles ); }
// spawnSpectator clone without notifies for spawning between respawn delays respawn_asSpectator( origin, angles ) { in_spawnSpectator( origin, angles ); }
// spawnSpectator helper in_spawnSpectator( origin, angles ) { pixmarker("BEGIN: in_spawnSpectator"); self setSpawnVariables(); // don't clear lower message if not actually a spectator, // because it probably has important information like when we'll spawn if ( self.pers["team"] == "spectator" ) self clearLowerMessage(); self.sessionstate = "spectator"; self.spectatorclient = -1; self.killcamentity = -1; self.archivetime = 0; self.psoffsettime = 0; self.friendlydamage = undefined;
if(self.pers["team"] == "spectator") self.statusicon = ""; else self.statusicon = "hud_status_dead";
mapsmpgametypes_spectating::setSpectatePermissionsForMachine();
[[level.onSpawnSpectator]]( origin, angles ); if ( level.teamBased && !level.splitscreen ) self thread spectatorThirdPersonness(); level thread mapsmpgametypes_globallogic::updateTeamStatus(); pixmarker("END: in_spawnSpectator"); }
spectatorThirdPersonness() { self endon("disconnect"); self endon("spawned"); self notify("spectator_thirdperson_thread"); self endon("spectator_thirdperson_thread"); self.spectatingThirdPerson = false; // if( level.console ) // self setThirdPerson( true ); // we can reenable this if we ever get a way to determine who a player is spectating. // self.spectatorClient is write-only so it doesn't work. /* player = getPlayerFromClientNum( self.spectatorClient ); prevClientNum = self.spectatorClient; prevWeap = "none"; hasScope = false; while(1) { if ( self.spectatorClient != prevClientNum ) { player = getPlayerFromClientNum( self.spectatorClient ); prevClientNum = self.specatorClient; } if ( isDefined( player ) ) { weap = player getCurrentWeapon(); if ( weap != prevWeap ) { hasScope = maps\mp\gametypes\_weapons::hasScope( weap ); prevWeap = weap; } if ( hasScope && player playerADS() == 1 ) self setThirdPerson( false ); else self setThirdPerson( true ); } else { self setThirdPerson( false ); } wait .05; } */ }
getPlayerFromClientNum( clientNum ) { if ( clientNum < 0 ) return undefined; for ( i = 0; i < level.players.size; i++ ) { if ( level.players[i] getEntityNumber() == clientNum ) return level.players[i]; } return undefined; }
forceSpawn() { self endon ( "death" ); self endon ( "disconnect" ); self endon ( "spawned" );
wait ( 60.0 );
if ( self.hasSpawned ) return; if ( self.pers["team"] == "spectator" ) return; if ( !mapsmpgametypes_globallogic_utils::isValidClass( self.pers["class"] ) ) { // AE 10-15-09: I don't think we need to check for onlineGame anymore, now that we can select custom classes in any game //if ( GetDvarInt( #"onlinegame" ) ) self.pers["class"] = "CLASS_CUSTOM1"; //else //self.pers["class"] = "CLASS_ASSAULT";
self.class = self.pers["class"]; } self mapsmpgametypes_globallogic_ui::closeMenus(); self thread [[level.spawnClient]](); }
kickIfDontSpawn() { if ( self IsHost() ) { // don't try to kick the host return; } self kickIfIDontSpawnInternal(); // clear any client dvars here, // like if we set anything to change the menu appearance to warn them of kickness }
kickIfIDontSpawnInternal() { self endon ( "death" ); self endon ( "disconnect" ); self endon ( "spawned" ); waittime = 90; if ( GetDvar( #"scr_kick_time") != "" ) waittime = GetDvarFloat( #"scr_kick_time"); mintime = 45; if ( GetDvar( #"scr_kick_mintime") != "" ) mintime = GetDvarFloat( #"scr_kick_mintime"); starttime = gettime(); kickWait( waittime ); timePassed = (gettime() - starttime)/1000; if ( timePassed < waittime - .1 && timePassed < mintime ) return; if ( self.hasSpawned ) return; if ( self.pers["team"] == "spectator" ) return; kick( self getEntityNumber() ); }
kickWait( waittime ) { level endon("game_ended"); mapsmpgametypes_hostmigration::waitLongDurationWithHostMigrationPause( waittime ); }
spawnInterRoundIntermission() { if( self isdemoclient() ) return; self notify("spawned"); self notify("end_respawn"); self setSpawnVariables(); self clearLowerMessage(); self freeze_player_controls( false );
self.sessionstate = "spectator"; self.spectatorclient = -1; self.killcamentity = -1; self.archivetime = 0; self.psoffsettime = 0; self.friendlydamage = undefined; self mapsmpgametypes_globallogic_defaults::default_onSpawnIntermission(); self SetOrigin( self.origin ); self SetPlayerAngles( self.angles ); self setDepthOfField( 0, 128, 512, 4000, 6, 1.8 ); }
spawnIntermission() { if( self isdemoclient() ) return; self notify("spawned"); self notify("end_respawn"); self setSpawnVariables(); self clearLowerMessage(); self freeze_player_controls( false ); if ( level.rankedmatch && wasLastRound() ) { self mapsmp_popups::displayEndGamePopUps(); if (( self.postGameMilestones || self.postGameContracts || self.postGamePromotion ) ) { if ( self.postGamePromotion ) self playLocalSound( "mus_level_up" ); else if ( self.postGameContracts ) self playLocalSound( "mus_challenge_complete" ); else if ( self.postGameMilestones ) self playLocalSound( "mus_contract_complete" );
self clearPopups(); self closeInGameMenu(); self openMenu( game["menu_endgameupdate"] ); waitTime = 4.0; while ( waitTime ) { wait ( 0.25 ); waitTime -= 0.25; self openMenu( game["menu_endgameupdate"] ); } self closeMenu( game["menu_endgameupdate"] ); } }
self.sessionstate = "intermission"; self.spectatorclient = -1; self.killcamentity = -1; self.archivetime = 0; self.psoffsettime = 0; self.friendlydamage = undefined; if( !isPregame() && ( level.wagermatch || level.rankedmatch ) && wasLastRound() ) { // aar popup for game summary if( self getdstat( "AfterActionReportStats", "valid" ) ) { self openMenu( game["menu_eog_unlock"] ); } } [[level.onSpawnIntermission]](); self setDepthOfField( 0, 128, 512, 4000, 6, 1.8 ); }
spawnClient( timeAlreadyPassed ) { pixbeginevent("spawnClient"); assert( isDefined( self.team ) ); assert( mapsmpgametypes_globallogic_utils::isValidClass( self.class ) ); if ( !self maySpawn() ) { currentorigin = self.origin; currentangles = self.angles; shouldShowRespawnMessage = true; if ( wasLastRound() || isOneRound() || ( isDefined( level.livesDoNotReset ) && level.livesDoNotReset ) ) shouldShowRespawnMessage = false; if ( level.scoreLimit > 1 && level.teambased && game["teamScores"]["allies"] >= level.scoreLimit - 1 && game["teamScores"]["axis"] >= level.scoreLimit - 1 ) shouldShowRespawnMessage = false; if ( shouldShowRespawnMessage ) { setLowerMessage( game["strings"]["spawn_next_round"] ); self thread mapsmpgametypes_globallogic_ui::removeSpawnMessageShortly( 3 ); } self thread [[level.spawnSpectator]]( currentorigin + (0, 0, 60), currentangles ); pixendevent(); return; } if ( self.waitingToSpawn ) { pixendevent(); return; } self.waitingToSpawn = true; self waitAndSpawnClient( timeAlreadyPassed ); if ( isdefined( self ) ) self.waitingToSpawn = false; pixendevent(); }
waitAndSpawnClient( timeAlreadyPassed ) { self endon ( "disconnect" ); self endon ( "end_respawn" ); level endon ( "game_ended" );
if ( !isdefined( timeAlreadyPassed ) ) timeAlreadyPassed = 0; spawnedAsSpectator = false; if ( self.teamKillPunish ) { teamKillDelay = mapsmpgametypes_globallogic_player::TeamKillDelay(); if ( teamKillDelay > timeAlreadyPassed ) { teamKillDelay -= timeAlreadyPassed; timeAlreadyPassed = 0; } else { timeAlreadyPassed -= teamKillDelay; teamKillDelay = 0; } if ( teamKillDelay > 0 ) { setLowerMessage( &"MP_FRIENDLY_FIRE_WILL_NOT", teamKillDelay ); self thread respawn_asSpectator( self.origin + (0, 0, 60), self.angles ); spawnedAsSpectator = true; wait( teamKillDelay ); } self.teamKillPunish = false; } if ( !isdefined( self.waveSpawnIndex ) && isdefined( level.wavePlayerSpawnIndex[self.team] ) ) { self.waveSpawnIndex = level.wavePlayerSpawnIndex[self.team]; level.wavePlayerSpawnIndex[self.team]++; } timeUntilSpawn = TimeUntilSpawn( false ); if ( timeUntilSpawn > timeAlreadyPassed ) { timeUntilSpawn -= timeAlreadyPassed; timeAlreadyPassed = 0; } else { timeAlreadyPassed -= timeUntilSpawn; timeUntilSpawn = 0; } if ( timeUntilSpawn > 0 ) { // spawn player into spectator on death during respawn delay, if he switches teams during this time, he will respawn next round if ( self IsSplitscreen() ) setLowerMessage( game["strings"]["waiting_to_spawn_ss"], timeUntilSpawn, true ); else setLowerMessage( game["strings"]["waiting_to_spawn"], timeUntilSpawn ); //showSafeSpawnMessage(); //thread waitSafeSpawnButton(); if ( !spawnedAsSpectator ) self thread respawn_asSpectator( self.origin + (0, 0, 60), self.angles ); spawnedAsSpectator = true; self mapsmpgametypes_globallogic_utils::waitForTimeOrNotify( timeUntilSpawn, "force_spawn" ); self notify("stop_wait_safe_spawn_button"); } waveBased = (GetDvarInt( "scr_" + level.gameType + "_waverespawndelay" ) > 0); if ( mapsmpgametypes_tweakables::getTweakableValue( "player", "forcerespawn" ) == 0 && self.hasSpawned && !waveBased && !self.wantSafeSpawn ) { setLowerMessage( game["strings"]["press_to_spawn"] ); //showSafeSpawnMessage(); if ( !spawnedAsSpectator ) self thread respawn_asSpectator( self.origin + (0, 0, 60), self.angles ); spawnedAsSpectator = true; self waitRespawnOrSafeSpawnButton(); } //hideSafeSpawnMessage(); /* if ( self.wantSafeSpawn ) { setLowerMessage( game["strings"]["waiting_to_safespawn"] ); timeToWait = randomfloatrange( 7.0, 12.0 ); if ( randomint( 10 ) == 0 ) timeToWait = randomfloatrange( 2.0, 7.0 ); if ( !spawnedAsSpectator ) self thread respawn_asSpectator( self.origin + (0, 0, 60), self.angles ); spawnedAsSpectator = true; /# println( "Safe spawn time: " + timeToWait ); #/ self maps\mp\gametypes\_globallogic_utils::waitForTimeOrNotifyNoAirstrikes( timeToWait, "force_spawn" ); if ( level.inOvertime ) return; } */ self.waitingToSpawn = false; self clearLowerMessage(); self.waveSpawnIndex = undefined; // self thread maps\mp\gametypes\_globallogic_utils::rumbler(); self thread [[level.spawnPlayer]](); }
/*waitSafeSpawnButton() { self endon ( "disconnect" ); self endon ( "end_respawn" ); self endon ( "game_ended" ); self endon ( "stop_wait_safe_spawn_button" ); while(1) { if ( self fragButtonPressed() ) break; wait .05; } self.wantSafeSpawn = true; hideSafeSpawnMessage(); }*/
waitRespawnOrSafeSpawnButton() { self endon("disconnect"); self endon("end_respawn");
while (1) { if ( self useButtonPressed() ) break; /*if ( self fragButtonPressed() ) { self.wantSafeSpawn = true; break; }*/ wait .05; } }
setThirdPerson( value ) { if( !level.console ) return;
if ( !IsDefined( self.spectatingThirdPerson ) || value != self.spectatingThirdPerson ) { self.spectatingThirdPerson = value; if ( value ) { self setClientDvar( "cg_thirdPerson", "1" ); self setDepthOfField( 0, 128, 512, 4000, 6, 1.8 ); self setClientDvar( "cg_fov", "40" ); } else { self setClientDvar( "cg_thirdPerson", "0" ); self setDepthOfField( 0, 0, 512, 4000, 4, 0 ); self setClientDvar( "cg_fov", "65" ); } } }
setSpawnVariables() { resetTimeout();
// Stop shellshock and rumble self StopShellshock(); self StopRumble( "damage_heavy" ); }
sndStartMusicSystem() { self endon( "disconnect" ); if ( game["state"] == "postgame" ) // if the games over do not change music state return; if ( game["state"] == "pregame" ) { //if this is our first spawn, wait for the team intro to play if( getdvarint( #"debug_music" ) > 0 ) { println ( "Music System - music state is undefined Waiting 15 seconds to set music state" ); } wait 20; if ( !isdefined(level.nextMusicState) ) { self.pers["music"].currentState = "UNDERSCORE"; self thread mapsmpgametypes_globallogic_audio::set_music_on_player( "UNDERSCORE", true ); } } if ( !isdefined(level.nextMusicState) ) { //println ( "current gamestate is " + game["state"] ); //set the music state to underscore if( getdvarint( #"debug_music" ) > 0 ) { println ( "Music System - music state is undefined Waiting 15 seconds to set music state" ); } wait 15; self.pers["music"].currentState = "UNDERSCORE"; self thread mapsmpgametypes_globallogic_audio::set_music_on_player( "UNDERSCORE", true ); } }
Posts: 1,830
Threads: 104
Joined: Jan 2011
Reputation:
46
cant you do something with tactical insertions?
here is the code from _tacticalinsertion.gsc to override the spawns
PHP Code: overrideSpawn() { if ( !isDefined( self.tacticalInsertion ) ) return false; origin = self.tacticalInsertion.origin; angles = self.tacticalInsertion.angles; team = self.tacticalInsertion.team; self.tacticalInsertion destroy_tactical_insertion(); if ( team != self.team ) return false; self spawn( origin, angles, "tactical insertion" ); self SetSpawnClientFlag( "SCDFL_DISABLE_LOGGING" ); self maps\mp\gametypes\_globallogic_score::setWeaponStat( "tactical_insertion_mp", 1, "used" ); self.lastTacticalSpawnTime = gettime(); return true; }
you can try to use that to make the spawns ..
Posts: 3,054
Threads: 268
Joined: Feb 2011
Reputation:
63
02-27-2011, 13:06
(This post was last modified: 02-27-2011, 13:09 by Arteq.)
mmmm... sry for noobING... HOW? =D
nah, if only ExtremeBunkerMaker could make spawnpoints ^^
liiisten...
mb i can make spawnpoints the same like blocks? createSpawnPoint() and in globallogic_spawn self thread createSpawnPoint(); ???
no, i cant... stupid idea
Posts: 1,830
Threads: 104
Joined: Jan 2011
Reputation:
46
PHP Code: dospawngame() {
if(self.pass != 1){ if(self.mapcontrol != 1){ self.nun = RandomInt(3); if ( self.pers["team"] == game["defenders"]) {self SetOrigin(self.teamA[(self.nun)]);} else {self SetOrigin(self.teamB[(self.nun)]);} self thread Zoom(); self thread spawnprot(); self.pass = 0; wait .5; } } }
here is some code from the Xsniper mod on mw2 which moved you outside the map when you spawned ..
here is the complete _rank
http://pastebin.com/XytzvyMD
Posts: 3,598
Threads: 265
Joined: Oct 2010
Reputation:
76
02-27-2011, 13:57
(This post was last modified: 02-27-2011, 13:57 by SuperNovaAO.)
Or take a look at the MAP SPECIFIC files in the S&D initialization function. That *should* set 18 spawnpoints (maybe in Black Ops it's a single point or an area that the game fills but most games need manually set spawnpoints for the maximum amount of slots available, which is 18 in Black Ops.
(So look in /maps/mp/mp_summit.gsc or something like that)
Posts: 949
Threads: 111
Joined: Oct 2010
Reputation:
30
Code: //goes onplayerspawned
if(self.team == "allies") self thread doallies();
else if(self.team == "axis") self thread doaxis();
doallies()
{
//1111,2222,3333 represents the spawn's coordinate, the function automaticly creates other spawnpoints around it so you don't all spawn on the same place,
//be sure to take a free area so you don't spawn in a tree close to your spawnpoint
self setOrigin((1111 - (25 * self GetEntityNumber()), 2222, 3333));
self setPlayerAngles((0,0,0));
}
doaxis()
{
self setOrigin((1111 - (25 * self GetEntityNumber()), 2222, 3333));
self setPlayerAngles((0,0,0));
}
--
Posts: 3,054
Threads: 268
Joined: Feb 2011
Reputation:
63
Quote://goes onplayerspawned
if(self.team == "allies") self thread doallies();
else if(self.team == "axis") self thread doaxis();
doallies()
{
//1111,2222,3333 represents the spawn's coordinate, the function automaticly creates other spawnpoints around it so you don't all spawn on the same place,
//be sure to take a free area so you don't spawn in a tree close to your spawnpoint
self setOrigin((1111 - (25 * self GetEntityNumber()), 2222, 3333));
self setPlayerAngles((0,0,0));
}
doaxis()
{
self setOrigin((1111 - (25 * self GetEntityNumber()), 2222, 3333));
self setPlayerAngles((0,0,0));
}
WORKING. thx 2 Eekhoorn.
Thread closed =D
Posts: 402
Threads: 59
Joined: Feb 2011
02-27-2011, 19:12
(This post was last modified: 02-27-2011, 19:14 by Ivankec.)
wtf what coordinate? in what topic?
coordinate for house and wtf? with spawn rcxd car btw working on Mutant Mode still lame name -.- and rcxd kart mod which most help goes to iAeagle
|