• Hey! Guest! The 39th GMC Jam will take place between November 26th, 12:00 UTC and November 30th, 12:00 UTC. Why not join in! Click here to find out more!

[Solved] Zoom in Effect on Map

G

Grammar

Guest
Hey Folks!

I have a Worldmap with different Lands ( I uploaded an Image. This is a test Map, just for realize ) where the Player can choose a Land and then a Mission. At the moment, when the Player clicks on a Land a windows is shown with 3 different Buttons: Mission 1 , Mission 2, Mission 3.

That's quite boring, so I thought I can make a zoom effect. Something like, the Player clicks on a land, then the Camera zooms in the land and there are 3 points, for each mission.

My question is what the best way is to realize that. Should I draw a complete Map ( Very detailed ), and then make a zoom-in-effect? Or is it better to draw a animation, where the the Part gets zoomed? An how can I zoom to a direct point of a room?

If anyone have solutions, or maybee experience with this, pls tell me. Wold be very cool!

- Cheers
 

Attachments

G

Grammar

Guest
I made it now. I decided to work with background_xscale and background_yscale and view. Quite easy.

Made alarm event [0] which sets variable zoom_wait = 0, In Create Event a variable zoom_charge = 0, zoom_active = 0, xon = 100/90, yon = 100/90 (The point where to zoom in view, divided by 90), and in Step event following:

if( device_mouse_check_released(0, mb_left) ){
global.zoom_active=1;
}

if(global.zoom_active==1){

if(zoom_wait==0){
background_xscale += 0.02;
background_yscale += 0.02;
view_xview += xon;
view_yview += yon;

zoom_wait=1;
alarm[0]=1;
zoom_charge++;

if(zoom_charge>89){
zoom_charge= 0;
global.zoom_active = 0;
view_xview = 100;
view_yview = 100;
}

}

}


Solution is for anyone who have same or similar problems.

- Cheers
 
Top