For some reason I can't zoom in.
view_xview[0] = view_xview[0] - 100;
view_yview[0] = view_yview[0] - 100;
view_hborder[0] = view_xview[0] / 2;
view_vborder[0] = view_yview[0] / 2;
While using these, the zoom event works fine but it zooms to the left corner so I added these and created an instance named 'obj_cview' but zoom event doesn't worked after this.
if instance_exists(obj_cview) view_object[0] = obj_cview;
These are all codes inside my object, space button triggers them.
view_angle[0] = -10 + random(30);
if instance_exists(obj_cview)
{
view_object[0] = obj_cview;
}
view_xview[0] = view_xview[0] - 100;
view_yview[0] = view_yview[0] - 100;
view_hborder[0] = view_xview[0] / 2;
view_vborder[0] = view_yview[0] / 2;
audio_play_sound(snd_cchange,1,0);
instance_destroy(self);