• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Legacy GM view_xview problem

E

EvansBlack

Guest
In every room of my game view_xview and view_yview is set up to 0. But when im doing this "draw_text(x, y, string(view_xview)" it shows me 10. Why is that. And of course if i will draw something at view_xview (as x) and view_yview (as y) it will be drawn 10 pixel from corner. I dont understand...Pls Help!
 

Yal

šŸ§ *penguin noises*
GMC Elder
Is the object at 10 instead of 0? You're drawing at x,y and not xview,yview.
 
E

EvansBlack

Guest
Is the object at 10 instead of 0? You're drawing at x,y and not xview,yview.
Okay, here what im doing:
Code:
draw_rectangle(view_xview[0], vew_yview[0], view_wview[0], view_hview[0], false)
In my room view_xview[0] and view_yview[0] are set up to zero, so rectangle should be drawn at the top left corner. But it doesnt. Instead it is drawn 10 pixels away from corner. Because for some reason view_xview and view_yview are set up to 10.
 
E

EvansBlack

Guest
LOL OK, just checking in case you had a rogue variable set to 10 somewhere.
Yeah, im trying to find this rogue)) for hours. No success. I just need to know is there anything else can cause this (beside forgotten varable).
 
K

Kenjiro

Guest
Just a thought. I could be wrong.

view_xview might be returning the total number of views. Maybe you should be using view_xview[0] instead (0 being the view number)

(In the draw text call that is - looking at your above code)
 
Top