I have an idea for a game mode that in my mind would be lots of fun.
The idea is that players a split into two factions, each faction will have a Commander, a General, Soldiers, and Engineers. Within the first hour of a round the teams start building a base. When the game starts the Soldiers will push forward to destroy the other teams base as the General formulates an attack strategy that is displayed in the soldiers HUDs. The Commander will be the foundation of both teams he will pretty much have the ability to ruin a team financially, he buys and summons each unique weapons.
Commanders and Generals are voted upon in the pregame lobby.
Please feel free to build on to my idea and help this game mode become a reality, if some one would explain game mode hooks to me in detail I will be able to work on this game mode as well.
This is my first huge project and I intend to pull through on it, to quote a movie... "May be not today, may be not tomorrow, but some day."
[QUOTE]The general premise of the gamemode is an RTS/FPS hybrid that involves two teams and four classes. The four classes are as follows:
The Commander - The head-honcho behind the whole operation. Manning an overhead view, a player in this position sets up static structures that serve basic functions. Each team begins with a "core" structure that acts as the central defensive point. The enemy will do everything in their power to destroy it, so it must be guarded at call costs. The Commander cannot move this structure and can only build other structures within a certain range of the "core" (the exception being harvesters). Each building constructed has a range of assembly, thus the “global base area” is not always perfectly circular. Structures have a variety of functions, such as gathering resources to either use as material or to sell for funding. Buildings require both resources and money to use; therefore a structure such as a harvester is handled more as an investment rather than an instant gain. Commanders also purchase the weapons that the other classes will be able to use. Commanders are decided upon by a vote at the beginning of the game. If the vote fails, a random commander is chosen.
The Engineer – An expertise in the inner-workings of the operation. Engineers hold a special role of fortifying the “core” and the structures of the team’s base in order to provide the enemy an obstacle to their mission. The spawn menu is replaced with a limited menu in which only certain models (such as the blast door with its weight lowered) can be spawned. Engineers are equipped with a gravity gun and a low-damage, high-recoil pistol at start. Engineers are stripped of their gravity gun when they are out of the build range that the structures have. The props are automatically frozen when punted, so it the gravity gun cannot be used as a weapon. Each prop model has their own health and resource cost, so the Engineers and Commander must cooperate in order to balance out prop fortification, weapon use and structure handling.
The Soldier – The basic offensive unit of any squad. Playing as a soldier is straight-up team deathmatch, though soldiers do serve an integral role in the team. For one, they are the only class (excluding the general) that can destroy the enemy’s “core”. In addition to this they are the most heavily armed class, starting off with a medium-damage, low-ammo shotgun and then can permanently use any weapon that the Commander buys. Soldiers can shoot props and enemy structures to damage/destroy them. For the first few minutes of the game however, Soldiers are not allowed to enter enemy fort range, shoot any enemies within said range or damage props/structures that they own. What this essentially does is provides the all the Soldiers a chance to either get into a defensive position, a flanking point or just have fun killing other soldiers that have exited their stronghold. The Soldiers and Commander must also cooperate in order to provide efficient weaponry, as it costs money to provide arms.
The General – The intelligence agent and specialist in espionage. The General plays much like Solders in that they can also damage props and possess powerful artillery, but in contrast to Soldiers the General holds another function: planning out attacks. Unlike all the other classes, the General is able to spot enemies, their structures, and resource nodes from any distance by use of radar. While accessing the full radar view, the General can click on any point which draws a marker on the Soldiers’ HUD of said location. This waypoint-based system can be used for any purpose that the General wishes, whether it be to show where the enemy base is located, to display where a mass of enemies are positioned (perhaps to form a flanking strategy) or just assist the commander in harvester placement. The General, like the Commander, is voted upon at start and is chosen at random if said vote is unsuccessful. There is one drawback to the General though: their life is precious and limited. If the General of a team dies, the player is swapped to the Soldier class and a certain amount of time must be passed in order for the General to return. After the time has passed, another vote is presented to those within the fort to choose the General.
Due to the nature of this gamemode, a minimum of four players would be required (Commander and General on both teams) and at least eight players (One of each class on both teams) to experience all its features.[/QUOTE]
I have posted the original post [URL="http://forums.ulyssesmod.net/index.php/topic,5361.msg24037/"]HERE[/URL].
If you want to pull it through, try: [url]lua.org/pil[/url]
[QUOTE=Chessnut;31515862]If you want to pull it through, try: [url]lua.org/pil[/url][/QUOTE]
Thanks that site will help allot but I also use... [url]http://wiki.garrysmod.com/?title=Lua[/url]
I was hoping to get more replies in here...
If some one wants to contribute don't hesitate to post. Also if this is in the wrong section I would like an admin to move it into the correct section.
sounds like fortwars if u ask me.
I like your idea, 30 minutes of building anything you dam well please then blowing eachothers shit up.
sounds fun.
To bad i dont have the time to help.
[QUOTE=Mr. om noms's;31527953]sounds like fortwars if u ask me.[/QUOTE]
It may sound like FortWars but its not FortWars... -.-
Because Fort-Wars does not have many elements of my game mode, tho it may seem similar.
My Game-mode can easily be called an advanced version of Fort-Wars tho, so yes it may sound like Fort-Wars but its not Fort-Wars.
Currently I cant get a script to work, please do not bash me...
[CODE]
function GM:EntityTakeDamage( ent )
if ent:IsPlayer() then
Hp = ent:Health()
if(Hp <= 41) then
Mult = (200 - Hp - 159)
local tab = {}
tab[ "$pp_colour_addr" ] = 5 * Mult
tab[ "$pp_colour_addg" ] = 0
tab[ "$pp_colour_addb" ] = 0
tab[ "$pp_colour_brightness" ] = 0
tab[ "$pp_colour_contrast" ] = 1
tab[ "$pp_colour_colour" ] = 1
tab[ "$pp_colour_mulr" ] = Hp * 2
tab[ "$pp_colour_mulg" ] = 1
tab[ "$pp_colour_mulb" ] = 1
DrawColorModify( tab )
DrawMotionBlur( 0.5, 0.5, 0.1)
DrawBloom( 1, Hp/100, 3, 9, 9, 1, 255, 0, 0 )
end
end
end
hook.Add( "RenderScreenspaceEffects", "RenderEFunc", RenderEFunc )
[/CODE]
[lua\autorun\sh_damageeffect.lua:1] attempt to index global 'GM' (a nil value)
[editline]9th August 2011[/editline]
Also if you have any tips post them here...
[QUOTE=Hell_Fox;31620637]Currently I cant get a script to work, please do not bash me...
[CODE]
function GM:EntityTakeDamage( ent )
if ent:IsPlayer() then
Hp = ent:Health()
if(Hp <= 41) then
Mult = (200 - Hp - 159)
local tab = {}
tab[ "$pp_colour_addr" ] = 5 * Mult
tab[ "$pp_colour_addg" ] = 0
tab[ "$pp_colour_addb" ] = 0
tab[ "$pp_colour_brightness" ] = 0
tab[ "$pp_colour_contrast" ] = 1
tab[ "$pp_colour_colour" ] = 1
tab[ "$pp_colour_mulr" ] = Hp * 2
tab[ "$pp_colour_mulg" ] = 1
tab[ "$pp_colour_mulb" ] = 1
DrawColorModify( tab )
DrawMotionBlur( 0.5, 0.5, 0.1)
DrawBloom( 1, Hp/100, 3, 9, 9, 1, 255, 0, 0 )
end
end
end
hook.Add( "RenderScreenspaceEffects", "RenderEFunc", RenderEFunc )
[/CODE]
[lua\autorun\sh_damageeffect.lua:1] attempt to index global 'GM' (a nil value)
[editline]9th August 2011[/editline]
Also if you have any tips post them here...[/QUOTE]
use GAMEMODE instead of GM
Why are you using GM functions in autorun?
Why are you trying to add blur and bloom on serverside?
[QUOTE=Amokov;31626908]Why are you using GM functions in autorun?[/QUOTE]
I am doing that to add a event to that function...
Use hook.Add, or edit it in the gamemode. Autorun doesn't have access to GM functions, if I recall correctly.
[QUOTE=Amokov;31634454]Use hook.Add, or edit it in the gamemode. Autorun doesn't have access to GM functions, if I recall correctly.[/QUOTE]
hmm, if it would not work correctly in autorun where should I put the command?
Some one has recommended that I change GM to GAMEMODE and it now gives me a diffrent error...
[CODE]
ERROR: Hook 'RenderEFunc' Failed: [lua\autorun\client\cl_damageeffect.lua:24] attempt to call global 'DrawColorModify' (a nil value)
Removing Hook 'RenderEFunc'
ERROR: GAMEMODE:'EntityTakeDamage' Failed: [addons\ulib\lua\ulib\shared\hook.lua:173] attempt to index local 'gm' (a function value)
[/CODE]
This is my current code...
[CODE]
function GAMEMODE:EntityTakeDamage( ent )
if ent:IsPlayer() then
Hp = ent:Health()
if(Hp <= 41) then
hook.Call( "RenderScreenspaceEffects", RenderEFunc, ent, Hp )
end
end
end
function RenderEFunc( ent, Hp )
local tab = {}
tab[ "$pp_colour_addr" ] = 5
tab[ "$pp_colour_addg" ] = 0
tab[ "$pp_colour_addb" ] = 0
tab[ "$pp_colour_brightness" ] = 0
tab[ "$pp_colour_contrast" ] = 1
tab[ "$pp_colour_colour" ] = 1
tab[ "$pp_colour_mulr" ] = Hp * 2
tab[ "$pp_colour_mulg" ] = 1
tab[ "$pp_colour_mulb" ] = 1
DrawColorModify( tab )
DrawMotionBlur( 0.5, 0.5, 0.1 )
DrawBloom( 1, Hp/100, 3, 9, 9, 1, 255, 0, 0 )
end
hook.Add( "RenderScreenspaceEffects", "RenderEFunc", RenderEFunc )
[/CODE]
[editline]13th August 2011[/editline]
[QUOTE=czmate10;31627420]Why are you trying to add blur and bloom on serverside?[/QUOTE]
I am no longer doing that, I changed my code and I am running it in shared, I have tried running it on client but now I get this error,
[CODE] autorun/client/cl_damageeffect.lua...
ERROR: Hook 'RenderEFunc' Failed: [lua\autorun\client\cl_damageeffect.lua:24] attempt to call global 'DrawColorModify' (a nil value)
Removing Hook 'RenderEFunc'
ERROR: GAMEMODE:'EntityTakeDamage' Failed: [addons\ulib\lua\ulib\shared\hook.lua:173] attempt to index local 'gm' (a function value)
[/CODE]
I have tried some variations but they all seem to fail.
#1. DrawColorModify is clientside, you're probably attempting to run it on the server.
#2. You're trying to say with line 6 that RenderEFunc is gm. It isn't. The second argument needs to be nil.
Sorry, you need to Log In to post a reply to this thread.