Wisam Posted April 17, 2014 Posted April 17, 2014 Hello.. I started making assault maps for my server for assault gamemode and there is one thing i cant get for the map and its the camera target.. i want to know the cordnaits for the the camera target and where to look.. Like this The map script: This is part of the map script for the camera target "-1448.827026" posY="1503.699585" posZ="25.376719" targetX="-1385.593750" targetY="1491.384277" targetZ="12.064482" type="selectTeam" /> My guess was that the camera pos is where the camera will be, and the target pos is the cordniats where the camera will look, but i didnt try it.. if you know anything about this please help me Thank you
Moderators IIYAMA Posted April 17, 2014 Moderators Posted April 17, 2014 local cameraElements= getElementsByType("camera") local firstArray = next(cameraElements) if firstArray then local camera = cameraElements[firstArray] local posX = getElementData(camera,"posX") -- etc. end
cheez3d Posted April 17, 2014 Posted April 17, 2014 Add this client-side and use /dump to dump the camera coordinates. They will be copied to your clipboard so you just use CTRL+V somewhere. addCommandHandler("dump",function() local x,y,z,lx,ly,lz = getCameraMatrix() setClipboard(tostring(x)..","..tostring(y)..","..tostring(z)..","..tostring(lx)..","..tostring(ly)..","..tostring(lz)) end)
Wisam Posted April 17, 2014 Author Posted April 17, 2014 So i just gotta point the view where i want the camera to be targeted when im at the team selection menu and type /dump then all the cordnaits and the camera target will be copyed?!
Wisam Posted April 17, 2014 Author Posted April 17, 2014 Add this client-side and use /dump to dump the camera coordinates. They will be copied to your clipboard so you just use CTRL+V somewhere. addCommandHandler("dump",function() local x,y,z,lx,ly,lz = getCameraMatrix() setClipboard(tostring(x)..","..tostring(y)..","..tostring(z)..","..tostring(lx)..","..tostring(ly)..","..tostring(lz)) end) That didnt work its gives me an error ! and its not copying
Wisam Posted April 17, 2014 Author Posted April 17, 2014 You put it as clientside ? You mean in the meta.xml file?
Wisam Posted April 17, 2014 Author Posted April 17, 2014 Yes. Oh it worked Thanks alot I made another post here can you check it?!
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