In one of my levels, I have monitor and keyboard entities placed on a desk entity.
With this setup, I have a short sequence where the player 'uses' a keyboard entity to bring up a memo hud on the player's screen (the player uses it a 2nd time to hide the memo again).
That same memo hud is also part of the alt-texture for the monitor entity's screen.
Before the player 'uses' the keyboard, the monitor entity has its normal texture.
What I'd like to happen, is that when the player 'uses' the keyboard, as well as the hud showing up on the player's screen, the monitor's texture also changes to its alt-texture.
I've been playing around with this for a while now trying to get it to work. So far, I've got the monitor's texture to change to the alt-texture when I 'use' the keyboard entity the 1st time, but when I 'use' it the 2nd time, while the memo disappears from the player's screen as it should, the monitor entity's texture doesn't change back to its normal texture.
In fact, it only changes back to the normal texture when I 'use' the keyboard a 3rd time (and the memo re-appears on the player's screen!).
Here's the script for the keyboard (the monitor is named in the keyboard's 'if used' field);
:state=0:state=10
:state=10:hudreset,hudx=50,hudy=50,hudimagefine=languagebank\english\gamecore\huds\keycodes.png,hudname=helphud,hudhide=1,hudmake=display,state=1
:state=1,plrdistwithin=50,plrusingaction=1:state=2,presetgunanimation=handbutton,activateifused=1,hudshow=helphud
:state=2,plrusingaction=0:state=3
:state=3,plrdistwithin=50,plrusingaction=1:state=4,presetgunanimation=handbutton,activateifused=0,hudunshow=helphud
:state=4,plrusingaction=0:state=1
And here's the monitor's script;
:state=0:state=10
:state=10,activated=1:state=1,alttexture=1
:state=1,activated=0:state=2
:state=2,activated=1:state=3,alttexture=0
:state=3,activated=0:state=10
I suspect it's the way the 'activateifused' part of the keyboard's script, interacts with the 'activated' part of the monitor's script, but I can't figure out how to correct the problem.
Can someone help please!