spawn protection (ways to prevent from spawn killing)
Moderators: Forum moderators, developers
spawn protection (ways to prevent from spawn killing)
Hi,
didnt find any command for it..So i guess its impossible to set so easily...Can it be done somehow?
regards
didnt find any command for it..So i guess its impossible to set so easily...Can it be done somehow?
regards
Last edited by Luk4ward on Sat Jan 20, 2007 5:23 am, edited 1 time in total.
wolFTeam.pl
I have a spawn protection thing in the mod I am working on. Basically everyone will keep their spawn shield until they move or shoot. After the player moves or shoots they keep their protection for the normal 3 seconds and thats it. The one drawback to this is it requires the use of g_inactivity set higher than 1. If g_inactivity is set to 0 then the mods spawn protect feature will also be disabled.
If you wish to just simply increase or decrease the time with lua then you could write this:
Or you could use nappy's method of changing the invulnerability time for the whole team
If you wish to just simply increase or decrease the time with lua then you could write this:
Code: Select all
function et_RunFrame( levelTime )
mtime = levelTime
end
function et_ClientSpawn(clientNum,revived)
local spawnProtect = mtime + 3000 -- 3000 is default spawn shield time
if revived == 0 then
et.gentity_set(clientNum,"ps.powerups", 1, spawnProtect)
end
end
No problem, but still got question. In this script is:
So the error is only with defaultSpawnInvul...But then whats the defualt time of spawn protection in minutes?
If i set only g_spawnInvul to about 180000, i guess i do not have to set other cmds and the spawn protection will be about 3 mins, yes?
Regards
Code: Select all
-- This script modifies the duration of the spawn shield. If either g_alliedSpawnInvul or g_axisSpawnInvul are non-zero, they will override g_spawnInvul.
-- Resulting cvars: g_spawnInvul < duration >, g_axisSpawnInvul < duration >, g_alliedSpawnInvul < duration > ( all times in milliseconds )
-- If none of the above cvars are present, spawn shield time will default to defaultSpawnInvul
-- DEFAULT VALUE
defaultSpawnInvul = 3
If i set only g_spawnInvul to about 180000, i guess i do not have to set other cmds and the spawn protection will be about 3 mins, yes?
Regards
wolFTeam.pl
defaultSpawnInvul is only used when g_alliedSpawnInvul, g_axisSpawnInvul, and g_spawnInvul are all either zero or do not exist. Both g_alliedSpawnInvul and g_axisSpawnInvul take precedence over g_spawnInvul.
You only need to use the axis and allied timers if you want each team to have a different duration. Oasis is a good example. Allies spawnshield can be increased but it's a bad idea to increase axis spawnshield.
The file is updated. defaultSpawnInvul = 3000
You only need to use the axis and allied timers if you want each team to have a different duration. Oasis is a good example. Allies spawnshield can be increased but it's a bad idea to increase axis spawnshield.
The file is updated. defaultSpawnInvul = 3000
Hello again,
I was wondering about more enhanced anti spwan system. Clutch152's system is based on movements (kmod), but I thought about the better way. Clutch152 is saying that its not possible , McSteve smth other...The idea is based on firing by player, so if a respawned player is firing his SpawnInvultime will be gone (or will be 2 times short) otherwise it will be counted double time or smth...
So the question is: it is possible?
Regards
I was wondering about more enhanced anti spwan system. Clutch152's system is based on movements (kmod), but I thought about the better way. Clutch152 is saying that its not possible , McSteve smth other...The idea is based on firing by player, so if a respawned player is firing his SpawnInvultime will be gone (or will be 2 times short) otherwise it will be counted double time or smth...
So the question is: it is possible?
Regards
wolFTeam.pl
If you are going down the lua route (which I know you are), I'm not aware of any working method for measuring whether or not a client is firing. Using sess.aWeaponStats might have worked, but its broken apparently. There is another field, sess.damage_given, that you could use. I did a quick test and it seems to work fine. This will only tell you a client's damage given, and so it wont detect if he is firing, but it will tell you if he has inflicted damage. Mine and dyno damage would get counted too, but they are relatively infrequent compared to light weapons fire and so they may serve the purpose well enough.
GhosT:McSteve
Ghostworks Gaming Community
Ghostworks Gaming Community
yea mine uses the clients inactivity. So if a player shoots or moves they become active thereby enabling the 3 second countdown. Otherwise they can stand there and look around and retain their spawn shield. The one drawback is if the player doesnt move they will get kicked for inactivity because the client inactivity detector requires the use of g_inactivity. What I had originally wanted to do was let the player retain their spawnshield unless they move then it would count down from 3 seconds. But if they were to shoot they would loose their shield entirely. But alas I cannot do that...yet
w00t!
Makes me very happy, got a lua script on hold for that one.
Much <3 @ ETPro team.
On topic: Luk4ward, from what Clutch has said and after reading up on his mod, I really dont think there is much to improve on. Just set a high time for g_inactivity and it will do what you want. Does it really matter if the player can look around with his mouse for as long as he wants?
Makes me very happy, got a lua script on hold for that one.
Much <3 @ ETPro team.
On topic: Luk4ward, from what Clutch has said and after reading up on his mod, I really dont think there is much to improve on. Just set a high time for g_inactivity and it will do what you want. Does it really matter if the player can look around with his mouse for as long as he wants?
GhosT:McSteve
Ghostworks Gaming Community
Ghostworks Gaming Community