GetVehiclePos clarification
#6

Quote:
Originally Posted by Rajat_Pawar
Посмотреть сообщение
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.
That will not work for this application, you need it entirely command based (for best results) for moving attached objects on a car I've mentioned this before about a week ago to someone else.

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;
}
Pretty basic to do.

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!)

Reply


Messages In This Thread
GetVehiclePos clarification - by RajatPawar - 12.04.2013, 10:57
Re: GetVehiclePos clarification - by [KHK]Khalid - 12.04.2013, 11:01
Re: GetVehiclePos clarification - by Basssiiie - 12.04.2013, 11:02
Re: GetVehiclePos clarification - by RajatPawar - 12.04.2013, 11:03
Re: GetVehiclePos clarification - by MP2 - 12.04.2013, 13:02
Re: GetVehiclePos clarification - by Pottus - 12.04.2013, 13:18

Forum Jump:


Users browsing this thread: 1 Guest(s)