Legacy GM Have a object be created in the view[Solved]

L

Lander

Guest
I want two objects to be created inside my view but they won't. I don't know what I did wrong?
Code:
Code:
bar1 = instance_create(view_wview[0]/2, view_hview[0]/3, ob_choose1);
bar2 = instance_create(view_wview[0]/2, (view_hview[0]/3)+32, ob_choose2);
 

FrostyCat

Member
You forgot to account for movement of the view away from (0, 0), add view_xview[0] to the x component and view_yview[0] to the y component.
 
L

Lander

Guest
You forgot to account for movement of the view away from (0, 0), add view_xview[0] to the x component and view_yview[0] to the y component.
Ok right I remember seeing both at some point while learning about views where were would I place the view_xview and view_yview like this?
Code:
bar1 = instance_create(view_xview[0] + view_wview[0]/2, view_yview[0] + view_hview[0]/2, ob_choose1);
bar2 = instance_create(view_xview[0] + view_wview[0]/2, view_yview[0] + view_hview[0]/2, ob_choose2);
 
Top