LiterallyNick
Member
Hello! I tried making my camera Zoom Out by following a tutorial and editing the code myself later, which works flawlessly.
But, for some reason, I can't make it stop after an alarm takes off, is there anything I'm doing wrong?
Would appreciate help since im still pretty new to this xD
Create:
Step Event:
But, for some reason, I can't make it stop after an alarm takes off, is there anything I'm doing wrong?
Would appreciate help since im still pretty new to this xD
Create:
GML:
camera = view_camera[0]
GML:
//camera x and y
var camX = camera_get_view_x(camera)
var camY = camera_get_view_y(camera)
//get camera width and height
var camW = camera_get_view_width(camera)
var camH = camera_get_view_height(camera)
var zoom = true
var zoomOut = 1
var _speed = 0.01
if (zoom != false)
{
zoomOut = zoomOut * _speed
//add to size
var addW = camW * zoomOut;
var addH = camH * zoomOut;
camW += addW
camH += addH
//position
camX -= addW/2
camY -= addH/2
}
camera_set_view_pos(camera, camX, camY)
camera_set_view_size(camera, camW, camH)
alarm[0] = 60
if alarm[0] = -1
{
zoom = false
}
Last edited: