I cant draw numbers with render function. I dont know what to do. I got the distance between 2 xyz cords as integer but I dont know how to draw it as this code draws. Whenever I try to draw it with draw_text it crashes my game cuz I think it is a integer.
I tryed it with format like this;
But it writes like
"AMMO\NDISTANCE: D" in game.
Code:
if 19@ == 3013
then
Actor.StorePos($PLAYER_ACTOR, 26@, 25@, 24@)
0B55: convert_3D_coords 29@ 28@ 27@ to_screen 23@ 22@
0B55: convert_3D_coords 26@ 25@ 24@ to_screen 21@ 20@
0B68: render draw_line_point1 23@ 22@ point2 21@ 20@ width 1 color 0x8833ff33
0B70: render draw_polygon_pos 23@ 22@ size 3 3 corners 7 rotation 0 color 0xba00ff00
050A: 17@ = distance_between_XYZ 26@ 25@ 24@ and_XYZ 29@ 28@ 27@
0092: 17@ = float 17@ to_integer
format 0@ "AMMO"
23@ += 5
22@ -= 7
0B6F: render font 1@ draw_text 0@ pos 23@ 22@ color 0xcac1f4c1
end
Code:
format 0@ "AMMO\nDISTANCE: %d" 17@
"AMMO\NDISTANCE: D" in game.