Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0

(Solved) A Poltergeist with Drawimage only in ONE map. (Rest of maps ok)



Hello again team!!

See if you can help me with a Poltergeist that has suddenly appeared on one of the maps in my game.

I use a Script to display images on the screen using "context: DrawImage".

Until yesterday the images were showing me correctly on the screen. As I show in the following image:



But today, as I continue working with the map, the textures appear like this. Translucent and in a gray color:


The only change i have made to the map since yesterday has been to add 3 ship models and animate them with 3 platforms.

I use the same Script to display the same images on other maps in the game and it still works fine on them. I don't know why the images have started to look like this only on this map or where the problem comes from to fix it.

Has someone a similar Poltergeist happened to him??? Or any idea how to fix it?

Any help or clue with this will be welcome!!

Thank you!!

PS: "I've tried creating another NEW scripts to show the image or another images, an NO ONE of the images or the Scripts show the images full coloured. I don't know what more inspect..."

Link to post

4 answers to this question

Recommended Posts

  • 0

Ok!! Now i have reached one satisfiying solution!!!

With one more test i have solved my problems without use a duplicated script with another "FrameTexture2" variable. This 3 lines of CONTEXT in PostRender really solve my problem in this Poltergeist map maintaining the good functionality of the rest of the maps:

function Script:PostRender(context)
	context:SetColor(Vec4(1, 1, 1, 1))

	--[[Block code of FRAMETEXTURE different uses]]--


I don't fully understand why the translucent images originated only in this map, but this second solution is better for me than the previous patch I have written above.

Link to post
  • 0
6 hours ago, Marcousik said:


Maybe you ran out of memory or something similar...

Did you try to load a backup map (a few days old) to see if the images are drawn correctly?

Yeah, i tried. And the backup shows the images ok. But there are to much changes to use it.

I'm afraid that I don't have more choices in this moment. In next days I will make all the new changes to the backup. 😭

But that's better than losing all the work.

Thanks Marcousik.

Link to post
  • 0

I have solve my Poltergeist team!!!

After many, many, many tests, I have discovered that the problem of my translucent textures in the only map where I get the error is derived from the INTENSIVE use of a VARIABLE "FrameTexture" that I use to display ALL the HUD images in relation to to CARRY OBJECTS WITH OUR HANDS ...

I control the entire HUD with "FrameTexture" variable, and it's possible that its use in that map is possibly saturated with the evolved idea of Marcousik. I think this is why I see all the DrawImage textures badly on the screen in that map:

	if frametexture ~= Texture:Load("Materials/Effects/black.tex") then
		context:DrawImage(frametexture, 0,0,context:GetWidth(),context:GetHeight())
		context:DrawImage(frametexture, 0,0,context:GetWidth(),context:GetHeight()) 

I have tried to create a new script with another FrameTexture2 variable, and the problem in that map is fixed. The hud images are working ok in the map again.

I don't like the idea of having a duplicate script that does the same as the old. And this, more than a solution is a patch that solves my problem. But I don't know the real origin of the Poltergeist. But hey!! To get out of the way is more than enough for me.


  • Like 1
Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Facebook Twitter Youtube Github Steam
  • Create New...