zoom in view game maker

时间:2018-03-25 20:24:23

标签: game-maker gml game-maker-language game-maker-studio-1.4

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);

0 个答案:

没有答案