[Dx8 engines] Clock

oks this has been test with EA, ETFF

EO 3.0 users there is a post in another topic where i posted the label method.

Credits my self and erwin for pointing where the timer codes where in the engine.

(both have been tested to work, some moded copys might change its outcome, if this is the case and you added it correctly, and still an error please post it it might just be something small.

Required image for this tut <can use="" your="" own="" but="" for="" copy="" and="" paste="" purpose="" it="">

(above image is a black square its ment as a test and nothing more)

(i might add more support of engines for this , but heavy might. if you dont like this code dont post or use, if you wanna troll use another topic. ill help best i can i am not a super programmer , i did the dx7 one for my self and posted it in someones topic, they wanted it for dx8 so i did it. now enjoy)

! In MODGRAPHICS in the Sub DrawGui add dis in the top like the rest of them.
! ! Dim tmr2000 As Long !
! In MODGRAPHICS in the Sub DrawGui, just undr the drawing for the “hotbar part” add this in
! ! If tmr2000 < GetTickCount Then ! ' check ping ! Call DrawClock ! tmr2000 = GetTickCount + 2000 ! End If !
! In MODGRAPHICS at the bottom put this sub in
! (Tex_Gui(59) change 59 to the next number in the gui folder, and name the image as that number.)
! ! Public Sub DrawClock() ! Dim i As Long, x As Long, y As Long, Sprite As Long, Width As Long ! Dim Height As Long, tempText As String ! Dim dtmTest As String ! Width = 65 ! Height = 25 ! x = 191 ! y = 195 ! RenderTexture Tex_GUI(59), x, y, 0, 0, Width, Height, Width, Height ! x = 200 ! y = 200 ! dtmTest = Format(Now, "H:MM AM/PM") ! Width = EngineGetTextWidth(Font_Georgia, "XX:XX") ! RenderText Font_Georgia, dtmTest, x, y, Red ! End Sub !

! In MODGRAPHICS in the Sub DrawGui add dis in the top like the rest of them.
! ! Dim tmr2000 As Long !
! In MODGRAPHICS in the Sub DrawGui, just undr the drawing for the “hotbar part” add this in
! ! If tmr2000 < GetTickCount Then ! ' check ping ! Call DrawClock ! tmr2000 = GetTickCount + 2000 ! End If !
! In MODGRAPHICS at the bottom put this sub in
! (Tex_Gui(59) change 59 to the next number in the gui folder, and name the image as that number.)
! ! Public Sub DrawClock() ! Dim i As Long, x As Long, y As Long, Sprite As Long, Width As Long ! Dim Height As Long, tempText As String ! Dim dtmTest As String ! Width = 65 ! Height = 25 ! x = 191 ! y = 195 ! RenderTexture Tex_GUI(59), x, y, 0, 0, Width, Height, Width, Height ! x = 200 ! y = 200 ! dtmTest = Format(Now, "H:MM AM/PM") ! Width = EngineGetTextWidth(Font_Georgia, "XX:XX") ! RenderText Font_Georgia, dtmTest, x, y, Red, , , True ! End Sub !</can>

Nice and simple, another of the simple things that need explaining to new programmers 🙂

lols… if u say so o-o . i better artist then programmer. xD…

I know you are aha xD But its still good work 🙂

Why are you updating the clock every 2 seconds rather than every 1 second like IRL.

if u tested it >.> u wont notice a difference.

i tested both and timed them to a clock it all matched up.

.>

Nicely done DarkMatch :) !

like my tutor before, but you render it in DX8

and Use AM/PM

Good Work

O.o oks,

Hei DarkMatch I kinda Confuse, I did all the Tutorial and When i Test it up The ERROR say: Uncoverable DX8 !

Is that something wrong? Because i kinda Confuse with that Black box picture , How i use that picture…?

Thank you and Please Reply !!!

Remove the error handler and then give cause the error. It will give the error number and the sub in which the error happened.

Log in to reply