• Derived from 'base'
    5 replies, posted
Hi, I've been trying to make a simple Team Deathmatch gamemode from Fretta. The only trouble I've been having so far is running it. I've tried running my gamemode with Fretta set to override, which resulted in running the simple game base. Whenever I run it I get this: [CODE]Registering gamemode 'fretta' derived from 'base'[/CODE] Here is my code. (shared.lua) [CODE]GM.Data = {} DeriveGamemode( "fretta" ) IncludePlayerClasses() GM.TeamBased = false GM.AllowAutoTeam = true GM.AllowSpectating = true GM.SecondsBetweenTeamSwitches = 10 GM.GameLength = 15 GM.RoundLimit = 10 GM.VotingDelay = 5 GM.NoPlayerSuicide = false GM.NoPlayerDamage = false GM.NoPlayerSelfDamage = false GM.NoPlayerTeamDamage = false GM.NoPlayerPlayerDamage = false GM.NoPlayerFootsteps = false GM.PlayerCanNoClip = false GM.TakeFragOnSuicide = false GM.MaximumDeathLength = 10 GM.MinimumDeathLength = 5 GM.AutomaticTeamBalance = false GM.ForceJoinBalancedTeams = false GM.RealisticFallDamage = false GM.AddFragsToTeamScore = false GM.NoAutomaticSpawning = false GM.RoundBased = true GM.RoundLength = 60 * 2 GM.RoundPreStartTime = 5 GM.RoundPostLength = 5 GM.RoundEndsWhenOneTeamAlive = false GM.EnableFreezeCam = true GM.DeathLingerTime = 3 GM.SelectModel = true GM.SelectColor = false GM.PlayerRingSize = 48 GM.HudSkin = "SimpleSkin" GM.ValidSpectatorModes = { OBS_MODE_CHASE, OBS_MODE_IN_EYE, OBS_MODE_ROAMING } GM.ValidSpectatorEntities = { "player" } GM.CanOnlySpectateOwnTeam = false TEAM_RED = 1 TEAM_BLUE = 2 function GM:CreateTeams() if ( !GAMEMODE.TeamBased ) then return end team.SetUp( TEAM_RED, "Team Red", Color( 255, 0, 0 ), true ) team.SetSpawnPoint( TEAM_RED, { "info_player_start", "info_player_terrorist", "info_player_rebel", "info_player_deathmatch" } ) team.SetClass( TEAM_RED, { "Red" } ) team.SetUp( TEAM_BLUE, "Blue", Color( 0, 0, 255 ), true ) team.SetSpawnPoint( TEAM_BLUE, { "info_player_start", "info_player_counterterrorist", "info_player_combine", "info_player_deathmatch" } ) team.SetClass( TEAM_BLUE, { "Blue" } ) team.SetUp( TEAM_SPECTATOR, "Spectators", Color( 200, 200, 200 ), true ) team.SetSpawnPoint( TEAM_SPECTATOR, { "info_player_start", "info_player_terrorist", "info_player_counterterrorist", "info_player_combine", "info_player_rebel" } ) end[/CODE] This has been giving me a headache, I'm somewhat new to lua and I'd appreciate any help.
Fretta is the base, you're supposed to run your gamemode
Base is the most basic gamemode. All gamemodes are derived from this. Deriving from a gamemode means it grabs all functions and entities and stuff from that gamemode. Fretta is also a base gamemode. You can see it as a framework. Fretta is deriving from base, so thats why you see this message. Its like a debug message, not an error message. Your gamemode derives from Fretta (DeriveGamemode( "fretta" )), so it takes all of its functions to build your gamemode. TLDR; This message is bound to happen.
[QUOTE=Darkwater124;33354554]Base is the most basic gamemode. All gamemodes are derived from this. Deriving from a gamemode means it grabs all functions and entities and stuff from that gamemode. Fretta is also a base gamemode. You can see it as a framework. Fretta is deriving from base, so thats why you see this message. Its like a debug message, not an error message. Your gamemode derives from Fretta (DeriveGamemode( "fretta" )), so it takes all of its functions to build your gamemode. TLDR; This message is bound to happen.[/QUOTE] I see. But how do I get it to run my gamemode instead of the base?
[QUOTE=Spazicks;33361368]I see. But how do I get it to run my gamemode instead of the base?[/QUOTE] sv_defaultgamemode <your gamemode name> Don't directly run Fretta, or Base.
Nothing happens, just runs the base gamemode.
Sorry, you need to Log In to post a reply to this thread.