Question about printing values of accum's onscreen


(nUllSkillZ) #1

Hi,

I would like to print accum’s like “wm_annouince”-messages.
So I’ve tried to use the “printaccum Accum-No.”-action.
But nothing appears onscreen.
So I assume the values of the accums are only printed to the log-file.
Is there a possibility to print the value of accums to the screen?
Many thanks in advance.


(MadJack) #2

Maybe you need to set /cg_debugscript 1 ?

Just a thought.


(SiliconSlick) #3

Here’s something I wrote yesterday… only works with small
values… and I forgot bit0. :0



// copy globalaccum 6 to 7 and then print "X" for each 

        trigger copytimebits
        {
                globalaccum 7 set 0
                trigger game_manager copytimebit1
                trigger game_manager copytimebit2
                trigger game_manager copytimebit3
                trigger game_manager copytimebit4
                trigger game_manager copytimebit5
        }
                                                                                                                                                             
        trigger copytimebit1
        {
                globalaccum 6 abort_if_not_bitset 1
                globalaccum 7 bitset 1
        }
         
        trigger copytimebit2
        {
                globalaccum 6 abort_if_not_bitset 2
                globalaccum 7 bitset 2
        }
         
        trigger copytimebit3
        {
                globalaccum 6 abort_if_not_bitset 3
                globalaccum 7 bitset 3
        }
                                                                                                                                                             
        trigger copytimebit4
        {
                globalaccum 6 abort_if_not_bitset 4
                globalaccum 7 bitset 4
        }
                                                                                                                                                             
        trigger copytimebit5
        {
                globalaccum 6 abort_if_not_bitset 5
                globalaccum 7 bitset 5
        }
                                                                                                                                                             
        trigger mytimer_debug
        {
                trigger game_manager copytimebits
                trigger game_manager mytimer_debug_out
        }
        trigger mytimer_debug_out
        {
                globalaccum 7 abort_if_less_than 1
                globalaccum 7 inc -1
                wm_announce "X"                         // SS - put an X on the screen for each minute remaining
                trigger game_manager mytimer_debug_out
        }
[/quote]

SiliconSlick

(nUllSkillZ) #4

Thanks so far for your help.
It seems that’s not possible to print accum’s directly to screen.
So I will try something different.
Something like:


accum "n" trigger_if_equal "m" SCRIPTNAME EVENT


SCRIPTNAME
{
          EVENT
          {
                    wm_announce "accum n equals m"
          }
}