Jump to content
Sign in to follow this  
lawman_actual

Ordnance Shells diverting UPWARDS without prompting

Recommended Posts

Just been modifying an old script I wrote for spawning in different artillery strikes and was confused by the fact that my strikes no longer seemed to be working.

 

A little investigation (switching camera to one of the spawned shells) shows that the shell, in this case M_Mo_155mm_AT_LG is being spawned in a the right place, but is inexplicably diverting upwards in a weird kind of arc that takes it flying into outer space.

 

This happens even if I just spawn in the shell without modifying it's DirAndUp or Velocity.

 

 

At present, I have the following settings that orientate the shell towards the ground and give it a little speed once spawned at a height of 150m:

																									
base sideChat "Splash";
sleep _mortarReload;																								
_dirVar = [0,360] call BIS_fnc_randomInt;
_disVar = [0,20] call BIS_fnc_randomInt;
_spawnPosMod = [_targetATL, _disVar, _dirVar] call BIS_fnc_relPos;
_spawnPosMod set [2,150];
_shell = "M_Mo_155mm_AT_LG" createVehicle _spawnPosMod;
setAccTime 0.4;                                                //This is just so I can see what's happening to the shell in detail
_shell switchCamera "EXTERNAL";
_shell setVectorDirAndUp [[0,0.5,-5],[0,0,1]];
sleep ([0,0.3] call BIS_fnc_randomInt);
_shell setVelocity _spawnVelocity;

Share this post


Link to post
Share on other sites

I should point out it's not like it's just following a straight line pointing in the wrong direction. 

It's starting off falling toward the ground, but then it seems to keep flipping and changing direction as various weird forces start to influence it.

 

I also don't understand why some shells (like ModuleOrdnanceMortar_F_ammo) don't move even if you give them a velocity, they just sit where they were spawned.

Share this post


Link to post
Share on other sites

Not entirely sure how but I think it was related to some delays I had between spawning and orientating the shell.

 

Seems to be working....for now.

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  

×