12.04.2013, 13:18
Quote:
It gives the height, cool, but I am at a loss how to use it to attach an object to the car using the object editor.
I did something under FINAL_EDIT_SAVE (or something like that under OnPlayerEditObject) but it doesn't quite work. |
This is taken directly from my map editor.
Код:
// Vehicle Object Movement X-Axis CMD:mvox(playerid, arg[]) { new Float:Movement; if(isnull(arg)) Movement = 1.0; else sscanf(arg, "f", Movement); if(EditCar[playerid][cVID] == INVALID_VEHICLE_ID || vehicles[playerid][MVASel[playerid]][object_id] == INVALID_OBJECT_ID) return 1; vehicles[playerid][MVASel[playerid]][ox] += Movement; AttachObjectToVehicle(vehicles[playerid][MVASel[playerid]][object_id], EditCar[playerid][cVID], vehicles[playerid][MVASel[playerid]][ox], vehicles[playerid][MVASel[playerid]][oy], vehicles[playerid][MVASel[playerid]][oz], vehicles[playerid][MVASel[playerid]][rx], vehicles[playerid][MVASel[playerid]][ry], vehicles[playerid][MVASel[playerid]][rz]); return 1; }
1) Add increment to your array
2) Attach the object each time you give it a value
Now is it possible to use edit object, in a manner of way yes, you can use a dummy object like a ball record the initial position then subtract the initial position from final position giving you offsets but I'm thinking this would be pretty lousy also you car would be to be facing north I believe. EditObject() has shitty precision as well so getting things symmetrical commands are by far better suited.
Some results done entirely with commands. (Nothing beats those Zebra skin seats lol!)