mint3d Posted October 16, 2013 Posted October 16, 2013 (edited) Ok Solid your good with this stuff so i made a login but i want the camera to move whiles it on the login screen how is this possible? Edited October 19, 2013 by Guest Skype: Jordan_Nymph
TAPL Posted October 16, 2013 Posted October 16, 2013 https://wiki.multitheftauto.com/wiki/SmoothMoveCamera
mint3d Posted October 16, 2013 Author Posted October 16, 2013 I couldn't get it to work but heres the script function () setElementDimension ( getLocalPlayer(), 1 ) setElementInterior( getLocalPlayer(), 0 ) setCameraMatrix( 1055.4643554688, -2122.0646972656, 83.747100830078, 1054.6900634766, -2121.4748535156, 83.517967224121) setCloudsEnabled(false) fadeCamera(true) guiSetInputEnabled(true) clearChat() LoginScreen_openLoginScreen() end ); Skype: Jordan_Nymph
pa3ck Posted October 16, 2013 Posted October 16, 2013 setCameraMatrix ( player thePlayer, float positionX, float positionY, float positionZ [, float lookAtX, float lookAtY, float lookAtZ, float roll = 0, float fov = 70 ] ) https://wiki.multitheftauto.com/wiki/SetCameraMatrix setCameraMatrix is not the one you need ( it wont move ), you can set its position and the position you want to be looking at.
mint3d Posted October 16, 2013 Author Posted October 16, 2013 I know its not but thats what i have already so ye i need help using the other one i Tried this function () setElementDimension ( getLocalPlayer(), 1 ) setElementInterior( getLocalPlayer(), 0 ) -- setCameraMatrix( 1055.4643554688, -2122.0646972656, 83.747100830078, 1054.6900634766, -2121.4748535156, 83.517967224121) smoothMoveCamera ( 1055.4643554688, -2122.0646972656, 83.747100830078, 1054.6900634766, -2121.4748535156, 83.517967224121, 1480, -1773, 108, 1480, -1688, 13, 200 ) setCloudsEnabled(false) fadeCamera(true) guiSetInputEnabled(true) clearChat() LoginScreen_openLoginScreen() end Skype: Jordan_Nymph
TAPL Posted October 17, 2013 Posted October 17, 2013 Have you include the function smoothMoveCamera in your script?
mint3d Posted October 17, 2013 Author Posted October 17, 2013 Nope thats the problem i don't know how Skype: Jordan_Nymph
pa3ck Posted October 17, 2013 Posted October 17, 2013 You just have to copy and paste the whole thing I guess, then call the smothMoveCamera and set its arguments. Try it.
mint3d Posted October 17, 2013 Author Posted October 17, 2013 I tried it i copied it all and replaces the x1 and stuff didnt work Skype: Jordan_Nymph
mint3d Posted October 17, 2013 Author Posted October 17, 2013 local sm = {} sm.moov = 0 sm.object1, sm.object2 = nil, nil local function removeCamHandler () if(sm.moov == 1) then sm.moov = 0 removeEventHandler ( "onClientPreRender", getRootElement(), camRender ) end end local function camRender () local x1, y1, z1 = getElementPosition ( sm.object1 ) local x2, y2, z2 = getElementPosition ( sm.object2 ) setCameraMatrix ( x1, y1, z1, x2, y2, z2 ) end function smoothMoveCamera ( 1055.4643554688, -2122.0646972656, 83.747100830078, 1054.6900634766, -2121.4748535156, 83.517967224121, 1480, -1773, 108, 1480, -1688, 13, 200 ) if(sm.moov == 1) then return false end sm.object1 = createObject ( 1337, x1, y1, z1 ) sm.object2 = createObject ( 1337, x1t, y1t, z1t ) setElementAlpha ( sm.object1, 0 ) setElementAlpha ( sm.object2, 0 ) setObjectScale(sm.object1, 0.01) setObjectScale(sm.object2, 0.01) moveObject ( sm.object1, time, x2, y2, z2, 0, 0, 0, "InOutQuad" ) moveObject ( sm.object2, time, x2t, y2t, z2t, 0, 0, 0, "InOutQuad" ) addEventHandler ( "onClientPreRender", getRootElement(), camRender ) sm.moov = 1 setTimer ( removeCamHandler, time, 1 ) setTimer ( destroyElement, time, 1, sm.object1 ) setTimer ( destroyElement, time, 1, sm.object2 ) return true end Tried this Skype: Jordan_Nymph
Castillo Posted October 17, 2013 Posted October 17, 2013 local sm = {} sm.moov = 0 sm.object1, sm.object2 = nil, nil local function removeCamHandler () if(sm.moov == 1) then sm.moov = 0 removeEventHandler ( "onClientPreRender", getRootElement(), camRender ) end end local function camRender () local x1, y1, z1 = getElementPosition ( sm.object1 ) local x2, y2, z2 = getElementPosition ( sm.object2 ) setCameraMatrix ( x1, y1, z1, x2, y2, z2 ) end function smoothMoveCamera ( x1, y1, z1, x1t, y1t, z1t, x2, y2, z2, x2t, y2t, z2t, time ) if(sm.moov == 1) then return false end sm.object1 = createObject ( 1337, x1, y1, z1 ) sm.object2 = createObject ( 1337, x1t, y1t, z1t ) setElementAlpha ( sm.object1, 0 ) setElementAlpha ( sm.object2, 0 ) setObjectScale(sm.object1, 0.01) setObjectScale(sm.object2, 0.01) moveObject ( sm.object1, time, x2, y2, z2, 0, 0, 0, "InOutQuad" ) moveObject ( sm.object2, time, x2t, y2t, z2t, 0, 0, 0, "InOutQuad" ) addEventHandler ( "onClientPreRender", getRootElement(), camRender ) sm.moov = 1 setTimer ( removeCamHandler, time, 1 ) setTimer ( destroyElement, time, 1, sm.object1 ) setTimer ( destroyElement, time, 1, sm.object2 ) return true end smoothMoveCamera ( 1055.4643554688, -2122.0646972656, 83.747100830078, 1054.6900634766, -2121.4748535156, 83.517967224121, 1480, -1773, 108, 1480, -1688, 13, 200 ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
mint3d Posted October 17, 2013 Author Posted October 17, 2013 Works great thanks i know you love GUI stuff maybe you can help me more if i need it Skype: Jordan_Nymph
mint3d Posted October 19, 2013 Author Posted October 19, 2013 Ok i found a bug with the script it keeps moving when i click login how to stop that? Skype: Jordan_Nymph
Castillo Posted October 19, 2013 Posted October 19, 2013 What do you mean? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
mint3d Posted October 20, 2013 Author Posted October 20, 2013 Its for a login screen but when i hit login it still keeps moving and i have to wait for it to stop moving Skype: Jordan_Nymph
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now