I'm having a problem with a Message not displaying updated variables. The Showmessage is a scoreboard that is displayed every second, with a timer displayed that counts down from 60 -> 0, a Hoghscore that is read from a global variable, and a score that is read from a local variable. The local variable is "score" which is held in a script, SIMScoreBoard. The script is attached to the term, which is persistent and has a ref name of SIMTerm. There is an NP and a custom CGTarget-type object(the shooting gallery target that spins around), every time you shoot either of the targets you get a point. The points are accumulated through a script attached to the target which say " set SIMTerm.score to (SIMTerm.score + 1) ". The score is being accumulated properly, as I placed a test-activator which opens a messagebox that displays, SIMterm.score. This variable increments with each hit properly, however the scoreboard message that is constantly displayed, and updated, dos not update the score. It does count down properly though.
here is the code for the scoreboard:
The script is attached to a terminal which has a menu to begin the timer.
scn SIMScoreboardScrfloat timershort timeshort stateshort scoreshort highscoreBegin GameModeif state == 0 if SIMQuestBegin == 1; this is assigned to 1 when selected from the terminal menu set state to 1 endifendifif state == 1; open door, and initialize variables OffDoorBig01SIMMuseum01.unlock OffDoorBig01SIMMuseum01.playsound3d DRSRivetCitySmallUnlock set time to 60 set timer to 0 set score to 0 set highscore to SIMmuseumHighScore set state to 2endifif state == 2; core area, updates variables and displays message; if ( menumode == 0 ); even with this in, The countdown continues in Pipboy, Vats, etc... if ( time >= 0 ) if (SIMMuseumTargetP01.isAnimPlaying == 1) set score to ( score + 1 ); I'm aware that this adds points as long as the animation is playing, but I left it this way for testing for now. endif ; points are also assigned by scripts attached to the targets themselves. testing both possibilites if ( SIMTargetNPCME01.getkillingblowlimb == 0 ) set score to ( score + 5 ) endif if ( SIMTargetNPCME01.getkillingblowlimb == 1 ) set score to ( score + 10 ) endif if ( SIMTargetNPCME01.getkillingblowlimb == 3 ) set score to ( score + 2 ) endif if ( SIMTargetNPCME01.getkillingblowlimb == 5 ) set score to ( score + 2 ) endif if ( SIMTargetNPCME01.getkillingblowlimb == 7 ) set score to ( score + 2 ) endif if ( SIMTargetNPCME01.getkillingblowlimb == 10 ) set score to ( score + 2 ) endif set timer to getsecondspassed set time to ( time - timer ); set SIMmuseumScore to score showmessage SIMmsgScoreboard highscore SIMmuseumScore score time; The message displays Highscore, score, ScoreLocal, and Time. the time works perfectly, the highscore displays at least, but neither the global SIMMuseumScore or local score variables update endif if time <= 0 set state to 3 endif ; endifendifif state == 3 if score > highscore set SIMmuseumHighScore to score endif set SIMQuestBegin to 0; disable; markfordelete set state to 4 endifif state == 4 set timer to 0 set timer to (timer + getsecondspassed) if (timer > 2) showmessage SIMmsgScoreboard highscore SIMmuseumScore score time set state to 5 endif;This doesn't show up eitherendifend
If anyone can decipher anything out of this, your asstance would be great. I know it can work, I did it 2 years ago, but i lost the file and can't remember how I did it anymore.