Thread: Development: Pokémon Fire Red Hacked Engine
View Single Post
Old September 24th, 2009 (1:31 AM).
JPAN JPAN is offline
pokemon rom researcher
    Join Date: Dec 2008
    Posts: 104
    Originally Posted by Surf View Post
    I've been having difficulty with the timer.
    How can I get it to show what time it has recorded, in a msgbox?
    Do I have to call a var?
    Using Special2 0x(variable) 0x4a, it will read out the timer to the variable.
    buffernumber 0x0 0x(variable) will buffer the time in seconds for the buffer 0
    To print that, just use a normal msgbox that contains in its text a \v\h02.

    If you want to print in the hours, minutes and Seconds format, you may use the VarMaths specials to make it into sizable chunks.
    (assuming the variable you used in the special call was 0x8007)
    writebytetooffset 0x07 0x0203f4d8
    writebytetooffset 0x80 0x0203f4d9
    setvar 0x8000 0x3c
    writebytetooffset 0x00 0x0203f4da
    writebytetooffset 0x80 0x0203f4db
    special2 0x(seconds) 0x41
    special2 0x(minutes) 0x41
    buffernumber 0x2 0x(seconds)
    buffernumber 0x1 0x(minutes)
    buffernumber 0x0 0x8007
    msgbox 0x @text (text = \v\h01:\v\h02:\v\h03)
    Here are the links for my work

    Currently working on:
    Battle Script Documentation
    Another large project
    Reply With Quote