Jump to content

Help, smoothMoveCamera looping


syn0nym

Recommended Posts

Thanks for click this topic, so i have some code which is will make a some cinematic from 3 different location, but i want make it looping from the third location back to the first and keep going like that, here my code

local times = 10000
function cinematic()
	smoothMoveCamera(2444.0747070312, -1656.7917480469, 28.93049621582, 2526.1335449219, -1710.7858886719, 10.195858001709, 2489.0947265625, 		-1636.412109375, 30.221374511719, 2499.2856445312, -1728.2391357422, -8.0401239395142, 10000)
	end
function cinematic2()
	smoothMoveCamera(1726.8065185547, -1484.8432617188, 143.54656982422, 1670.5084228516, -1413.7943115234, 185.7670135498, 1535.7916259766, -1267.5806884766, 272.14398193359, 1474.7834472656, -1199.0876464844, 311.97747802734, 10000)
	end
	
function cinematic3()
	smoothMoveCamera(1338.3666992188, -1257.4116210938, 95.983924865723, 1352.1002197266, -1257.2800292969, -3.0684490203857, 1340.6787109375, -1498.6977539062, 95.983924865723, 1354.4122314453, -1498.5661621094, -3.0684490203857, 10000)
	end
setPlayerHudComponentVisible("all", false)
setTimer(cinematic, times * 0, 1)
setTimer(cinematic2, times , 1)
setTimer(cinematic3, times * 2 , 1)

 

Link to comment
  • Moderators
13 minutes ago, syn0nym said:

but i want make it looping from the third location back

local duration = 10000
function cinematic1()
	smoothMoveCamera(2444.0747070312, -1656.7917480469, 28.93049621582, 2526.1335449219, -1710.7858886719, 10.195858001709, 2489.0947265625, 		-1636.412109375, 30.221374511719, 2499.2856445312, -1728.2391357422, -8.0401239395142, 10000)
	setTimer(cinematic2, duration , 1)
end
function cinematic2()
	smoothMoveCamera(1726.8065185547, -1484.8432617188, 143.54656982422, 1670.5084228516, -1413.7943115234, 185.7670135498, 1535.7916259766, -1267.5806884766, 272.14398193359, 1474.7834472656, -1199.0876464844, 311.97747802734, 10000)
	setTimer(cinematic3, duration , 1)
end
	
function cinematic3()
	smoothMoveCamera(1338.3666992188, -1257.4116210938, 95.983924865723, 1352.1002197266, -1257.2800292969, -3.0684490203857, 1340.6787109375, -1498.6977539062, 95.983924865723, 1354.4122314453, -1498.5661621094, -3.0684490203857, 10000)
	setTimer(cinematic1, duration , 1)
end

setPlayerHudComponentVisible("all", false)
cinematic1() -- start

Try this.

  • Thanks 1
Link to comment
1 hour ago, IIYAMA said:
local duration = 10000
function cinematic1()
	smoothMoveCamera(2444.0747070312, -1656.7917480469, 28.93049621582, 2526.1335449219, -1710.7858886719, 10.195858001709, 2489.0947265625, 		-1636.412109375, 30.221374511719, 2499.2856445312, -1728.2391357422, -8.0401239395142, 10000)
	setTimer(cinematic2, duration , 1)
end
function cinematic2()
	smoothMoveCamera(1726.8065185547, -1484.8432617188, 143.54656982422, 1670.5084228516, -1413.7943115234, 185.7670135498, 1535.7916259766, -1267.5806884766, 272.14398193359, 1474.7834472656, -1199.0876464844, 311.97747802734, 10000)
	setTimer(cinematic3, duration , 1)
end
	
function cinematic3()
	smoothMoveCamera(1338.3666992188, -1257.4116210938, 95.983924865723, 1352.1002197266, -1257.2800292969, -3.0684490203857, 1340.6787109375, -1498.6977539062, 95.983924865723, 1354.4122314453, -1498.5661621094, -3.0684490203857, 10000)
	setTimer(cinematic1, duration , 1)
end

setPlayerHudComponentVisible("all", false)
cinematic1() -- start

Try this.

Thanks you very much it's working. 

  • Like 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...