Jump to content
Sign in to follow this  
dznemesis

prevent createvehicled crew to always face north?

Recommended Posts

this is a strange problem and i didnt find anything on the searches:

in my mission, i generate a vehicle and the crew for it, then move them into their positions. Then the vehicle turret turns north (even if i setFormdir the group and/or setDir the vehicle) and stays there for as long as the vehicle encounters the first enemy.

I also tried with domove some pos and sent the tank around some hills and he drives normally but the turret always stays focused to 0 degree sad_o.gif

code is about this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

...

_vehicle = createVehicle [_class, _deploypos, [], 0, "FORM"];

_vehicle setDir (markerdir ((_duallist select _squadindex) select 0));

[_vehicle,_groupname] call Deploy_BoardVehicle;

...

and in deploybaordvehic:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

...

((units _groupname1) select 0) assignasdriver _veh;

((units _groupname1) select 0) moveindriver _veh;

((units _groupname1) select 1) assignasgunner _veh;

((units _groupname1) select 1) moveingunner _veh;

...

_veh setVehicleLock "LOCKED";

...

Share this post


Link to post
Share on other sites

I can almost bet the vehicle has no fuel?

Myself and a fellow map editor found this problem.

We set down a manned T72, no fuel. It faced north.

After we added a tiny amount of fuel, it worked normally.

Ps: Also try changing the formation/awareness "combat, stealth etc ".

Share this post


Link to post
Share on other sites

it is definitely not fuel since the vehicles drive around normally

i guess it cant be formation/mode but i will try, thanks smile_o.gif

Share this post


Link to post
Share on other sites

Do you want it to face something or lining the turret with the vehicle.

in the first case, perhaps

(gunner _veh) doWatch (getPos someObject);

will do the trick

in the latter case, it requires some math, but its doable.

Share this post


Link to post
Share on other sites

all i want is normal tank/etc... behaviour

its not normal that a unit always faces north until it encounters an enemy.

there is also a marker attached to vehicles, so if turret looks north it always is directed to 0°, even when the vehicle moves in another direction the marker points north - this is not acceptable

Share this post


Link to post
Share on other sites

I was looking for this yesterday too. It is very strange for the gunner to turn north like that. When you set a manned tank down in the editor and watch him he doesn't turn north, he just stays facing the same way the tank does, which is what you would expect.

Share this post


Link to post
Share on other sites

As a test, have you tried dowatch for the gunner to look at a test object/unit/logic? Place the object anywhere but north of the gunner.

If not, then try it with a static object and if that works then I can make a workaround (my self proclaimed specialty).

Otherwise I will make a note to test it at some later time.

Share this post


Link to post
Share on other sites

hm i dont know how the problem was solved, at least now it seems to work (i didnt change anything?)

the issue with the markerdir was: i getdirred the crew of the tank and not the tank himself (getdir commander tank1 -> 0)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×