Last active
February 19, 2018 16:50
-
-
Save GhoulofGSG9/e883ac8df806bf025e8e1f7c68a674c7 to your computer and use it in GitHub Desktop.
NGZ Phasegate error (nach Bau von 2 Phasegates). Code Auszug von Zeile 378-420
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Server] Script Error #1: lua/PhaseGate.lua:403: attempt to call field 'CreateRelevancyPortal' (a nil value) | |
Call stack: | |
#1: lua/PhaseGate.lua:403 | |
self = PhaseGate-1697 {alive=true, animationBlend=0, animationGraphIndex=9, animationGraphNode=7, animationSequence2=1, animationSequence=2, animationSpeed2=1, animationSpeed=1, animationStart2=17817.279296875, animationStart=17820.294921875, armor=800, buildFraction=1, collisionRep=0, constructionComplete=true, deployed=true, destLocationId=4060, destinationEndpoint=cdata, dissolveStart=0, flinchIntensity=0, gameEffectsFlags=0, health=1500, healthIgnored=false, hotGroupNumber=0, inCombat=false, isCorroded=false, isGhostStructure=false, lastTakenDamageAmount=0, lastTakenDamageOrigin=cdata, lastTakenDamageTime=0, lastTargetId=-1, layer1AnimationBlend=0, layer1AnimationGraphNode=9, layer1AnimationSequence2=-1, layer1AnimationSequence=-1, layer1AnimationSpeed2=1, layer1AnimationSpeed=1, layer1AnimationStart2=0, layer1AnimationStart=0, linked=true, locationId=9, maxArmor=800, maxHealth=1500, modelIndex=14, nanoShielded=false, parasiteDuration=0, parasited=false, phase=false, physicsGroup=2, physicsGroupFilterMask=0, physicsType=4, playIdleSound=false, powerSurge=false, powered=true, recycled=false, researchProgress=0, researchingId=1, selectionMask=0, sighted=false, targetYaw=-2.7134027481079, teamNumber=1, techId=102, timeLastHealed=17817.279296875, timeLastVisuallyHealed=0, timeParasited=0, underConstruction=false, visibleClient=false, vortexed=false } | |
destinationPhaseGate = PhaseGate-3363 {alive=true, animationBlend=0, animationGraphIndex=9, animationGraphNode=7, animationSequence2=1, animationSequence=2, animationSpeed2=1, animationSpeed=1, animationStart2=17812.078125, animationStart=17815.09765625, armor=800, buildFraction=1, collisionRep=0, constructionComplete=true, deployed=true, destLocationId=-1, destinationEndpoint=cdata, dissolveStart=0, flinchIntensity=0, gameEffectsFlags=0, health=1500, healthIgnored=false, hotGroupNumber=0, inComba |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if Server then | |
function PhaseGate:Update() | |
self.phase = (self.timeOfLastPhase ~= nil) and (Shared.GetTime() < (self.timeOfLastPhase + 0.3)) | |
local destinationPhaseGate = GetDestinationGate(self) | |
if destinationPhaseGate ~= nil and GetIsUnitActive(self) and self.deployed and destinationPhaseGate.deployed then | |
self.destinationEndpoint = destinationPhaseGate:GetOrigin() | |
self.linked = true | |
self.targetYaw = destinationPhaseGate:GetAngles().yaw | |
self.destLocationId = ComputeDestinationLocationId(self, destinationPhaseGate) | |
if self.relevancyPortalIndex == -1 then | |
-- Create a relevancy portal to the destination to smooth out entity propagation. | |
local mask = 0 | |
local teamNumber = self:GetTeamNumber() | |
if teamNumber == 1 then | |
mask = kRelevantToTeam1Unit | |
elseif teamNumber == 2 then | |
mask = kRelevantToTeam2Unit | |
end | |
if mask ~= 0 then | |
self.relevancyPortalIndex = Server.CreateRelevancyPortal(self:GetOrigin(), self.destinationEndpoint, mask, self.kRelevancyPortalRadius) | |
end | |
end | |
else | |
self.linked = false | |
self.targetYaw = 0 | |
self.destLocationId = Entity.invalidId | |
DestroyRelevancyPortal(self) | |
end | |
return true | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment