Jump to content

[LE3] Crash on GetPosition inside UpdateWorld


beo6
 Share

Recommended Posts

Hello everyone.

 

 

I am Scripting a bit to get used to Lua.

 

Now i have a problem that the Game crashes as soon as i use this Script:

 

Script.target = nil--Entity "Target"
--[[
function Script:Start()
end
]]--
function Script:UpdateWorld()
--Exit the function if the target entity doesn't exist
if self.target==nil then return end
self.centerpoint = self.target:GetPosition(true)
end

 

 

But when i use GetPosition inside Script:Start()

it works as it should.

 

But i need the position on every Update.

 

 

Can someone help me?

 

 

Thanks in advance

Link to comment
Share on other sites

Hello.

 

I have set a Breakpoint and it crashed too.

 

But i don´t know where the entity should be deleted. It is a really basic Map with nothing else.

 

Here is a even smaller Map (see attachment) with the same behavior if you like to have a look:

 

 

The debugger also says nothing. it just crashes.

test.zip

Link to comment
Share on other sites

  • 3 months later...
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...