Update 270 & LR mod
MetaMind
Join Date: 2012-12-06 Member: 174358Members, Reinforced - Gold
Hi,
I m trying to get my mod (Last Resistance) playble on ns2 v270 but having probs with the "teamswitch when killed"- feature.
In the past I handled it via the player_server.lua:
...but when killed it switches me to alien but I cant respawn... I'm stuck in the respawnqueue or something...apparently the "spectator:GetTeam():ReplaceRespawnPlayer(spectator) " line isnt working... am I right?
Can anyone help me out here plz?
I m trying to get my mod (Last Resistance) playble on ns2 v270 but having probs with the "teamswitch when killed"- feature.
In the past I handled it via the player_server.lua:
local function UpdateChangeToSpectator(self) if not self:GetIsAlive() and not self:isa("Spectator") then local time = Shared.GetTime() if self.timeOfDeath ~= nil and (time - self.timeOfDeath > kFadeToBlackTime) then // Destroy the existing player and create a spectator in their place (but only if it has an owner, ie not a body left behind by Phantom use) local owner = Server.GetOwner(self) if owner then // Queue up the spectator for respawn. local spectator = self:Replace(AlienSpectator.kMapName, kAlienTeamType) // spectator:GetTeam():PutPlayerInRespawnQueue(spectator) spectator:GetTeam():ReplaceRespawnPlayer(spectator) TechUnlocker() end end end end
...but when killed it switches me to alien but I cant respawn... I'm stuck in the respawnqueue or something...apparently the "spectator:GetTeam():ReplaceRespawnPlayer(spectator) " line isnt working... am I right?
Can anyone help me out here plz?