Pilot Posted March 27, 2010 Share Posted March 27, 2010 Hello, I'm making maps for a server, Full Theft Auto and I have some Map Editor problems: I created a very good Club, but the location of it have been changed, I need to move the club with all it's content (bottles, speakers, lights, etc.) to a different city, from LV to SF Please help me, I don't know how to move it, is there some kind of a moving option or what? Link to comment
karlis Posted March 28, 2010 Share Posted March 28, 2010 no, you need script converter, or if you dont know scripting just change x,y,z values with notepad Link to comment
AcidbRain Posted March 29, 2010 Share Posted March 29, 2010 Here's a basic mass move script: local ElementTypes = { "object", "pickup", "marker", "vehicle", "blip" } function batchMoveElements(elements, dx, dy, dz) for _,e in ipairs(elements) do local x, y, z = getElementPosition(e) x = x + dx y = y + dy z = z + dz setElementPosition(e, x, y, z) triggerEvent("syncProperty", root, "position", {x, y, z}, e) end end function consoleMoveObjects(playerSource, command, dx, dy, dz, elementTypes) dx, dy, dz = tonumber(dx) or 0, tonumber(dy) or 0, tonumber(dz) or 0 for _,elementType in pairs(ElementTypes) do if (elementTypes and elementType == elementTypes) or not elementTypes then local elements = getElementsByType(elementType) if elements then batchMoveElements(elements, dx, dy, dz) end end end end addCommandHandler("mmove", consoleMoveObjects) You just have to run this resource while editing your map, open up the console and type mmove x y z, where x, y, and z is the result of your guesswork. Link to comment
karlis Posted March 29, 2010 Share Posted March 29, 2010 all fine, except that if you will rotate objects like this objects will get messed up, you need some trigonometrical functions for that Link to comment
AcidbRain Posted March 29, 2010 Share Posted March 29, 2010 This script will only move objects from one place to another, as per OP request: to move the club with all it's content (bottles, speakers, lights, etc.) to a different city, from LV to SF Link to comment
Pilot Posted March 29, 2010 Author Share Posted March 29, 2010 It doesn't work, you said the resource, so I made a resource for my first time I made meta.xml with this content: And 1move.lua with with script that you gave me, I started the resource, opened the and typed: mmove X, Y, Z (coordinates instead of x, y, z ), It didn't do anything and I did load the map. What did I do wrong? For 1move.lua I just copied the script you gave me EDIT: IT does work but not what I need, It moves it back and forward by coordinates you tell it i.e. I put mmove 0, 0, 22 it moves it forward by 22 coordinates or it can go up or down by coordinates, mmove 0, 0, 0, 5 to go up by 5 the first 2 numbers don't do anything at all. How do you go left and right? If I knew that I could solve my problem, could take a little longer, but I could solve it that way, if there was a way! Link to comment
AcidbRain Posted March 30, 2010 Share Posted March 30, 2010 Console command parameters don't need to be separated by commas. A single space will suffice Link to comment
[NB]ExPloiTeD Posted April 9, 2010 Share Posted April 9, 2010 Just what i was looking for. But what am i supposed to do with that script ? How do i run it ? Link to comment
karlis Posted April 9, 2010 Share Posted April 9, 2010 add it as resource with proper meta, and write mmove x y z objects but i dont see need for that trigger at line 10 Link to comment
ramrod Posted July 9, 2010 Share Posted July 9, 2010 With this script, the x y z coordinates, is that the change in x y z values that we want the items so +50 along z, +1000 in y etc? Or do we input the new coordinates that we want these items to be moved to? if that makes sense. Link to comment
AcidbRain Posted July 12, 2010 Share Posted July 12, 2010 With this script, the x y z coordinates, is that the change in x y z values that we want the items so +50 along z, +1000 in y etc? Yes, the parameters should be deltas, not final coordinates. Link to comment
Faw[Ful] Posted July 25, 2010 Share Posted July 25, 2010 dont work for the pickups and spawnpoints, very strangely with 40 pickups just 2 or 3 have moved Link to comment
AcidbRain Posted July 27, 2010 Share Posted July 27, 2010 You can add more element types to move by editing first line: local ElementTypes = { "object", "pickup", "marker", "vehicle", "blip", "racepickup", "spawnpoint" } Here, "racepickup" and "spawnpoint" are used in race maps. If you have maps for other game modes, you'll have to add the element types that those game modes require. Link to comment
Faw[Ful] Posted July 28, 2010 Share Posted July 28, 2010 You can add more element types to move by editing first line: local ElementTypes = { "object", "pickup", "marker", "vehicle", "blip", "racepickup", "spawnpoint" } Here, "racepickup" and "spawnpoint" are used in race maps. If you have maps for other game modes, you'll have to add the element types that those game modes require. Thats rich man !!! Thanks im noob on this because i put pickup and not racepickup , but spawnpoint dont work I try, but thats is not bad at all, because spawnpoints are easy do do again , pickups no. Link to comment
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