You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AM2Rogue/Export_Code/gml_Object_oTankCam_Step_0.gml

21 lines
514 B

x = (oTank.x + ((oCharacter.x - oTank.x) / 2))
y = (oTank.y + ((oCharacter.y - oTank.y) / 2))
if (abs((oCharacter.x - oTank.x)) < 280 && abs((oCharacter.y - oTank.y)) < 180)
{
oCamera.smootin = 30
if (oCamera.focus == 0)
{
oCamera.focus = 1
oCamera.focustime = 0
}
oCamera.focustime += 1
oCamera.lockx = 1
oCamera.locky = 1
oCamera.targetx = x
oCamera.targety = y
oCamera.snapx = 0
oCamera.snapy = 0
oCamera.smoothout = 40
oCamera.alarm[0] = 2
}