Monitor Troubles

#1
Hey,

Having a spot of bother. I'm trying to change the texture on a monitor, in the same way as 895's monitor flashes images. However, I can only get the texture to display for a brief second before it reverts back to normal. Even when the function repeats itself over and over, it only appears once and briefly. Anyone know why?

Code:

Code: Select all

ElseIf sc\inSight
				If sc\playerState = 0 Then
					sc\playerState = Rand(60000, 65000)
				EndIf
				If PlayerRoom\RoomTemplate\Name = "room000" Then
				DebugLog("well that's a definite ewy")
				If sc\inSight Then
					DebugLog("dammit")
					EntityTexture(sc\ScrOverlay, OldAiPics(0))
					EndIf
				EndIf
EDIT: Ignore my debuglogs :laugh:
SCP - Box of Horrors v0.8.0b
Twitter
Github Profile

Re: Monitor Troubles

#2
I haven't worked with those monitors yet, maybe I will with version 7.0.
I'm not sure what could be happening there, other than the main loop retexturing your overlay at some point.
Is the overlay supposed to be permanent? If so, I think you shouldn't have the code nested in so many "If" blocks.

Re: Monitor Troubles

#4
InnocentSam wrote:
juanjpro wrote:Is the overlay supposed to be permanent? If so, I think you shouldn't have the code nested in so many "If" blocks.
It's not, it's going to be in an event.

It could be the main loop, I'll add a global variable and add an "If Not GlobalVariable then [do normal monitor stuff]"
Add a boolean field to the securitycams type and check for its value in the updatesecuritycams function.
This game already has way too many global variables that don't need to be there.
M-x dingus-mode