And adding to deaddogs list of why-nots: ofp is not fast enough for it
Well it is, but it won't look good while moving the unit faster than in the following script:
[unitname] exec "dodge.sqs"
dodge.sqs:
_unit = _this select 0
_bullets = ["bulletsinglew","bulletsinglee","bullet7_6","bullet12_7"]
#start
@ ({_x == typeOf (nearestObject [_unit,_x])} count _bullets) > 0
? (vehicle _unit != _unit) : goto "start"
_b = 0
while "(_b < (count _bullets)) && ((typeOf (nearestObject [_unit,(_bullets select _b)])) != _bullets select _b)" do {_b = _b + 1;};
_curbul = (nearestObject [_unit,(_bullets select _b)])
_curdis = _curbul distance _unit
~.001
? (_curdis < _curbul distance _unit) : goto "start"
_nowPos = getPos _unit
_i = 0
setAccTime 0.05
#setposloop
_i = _i + .07
~.001
_unit setPos [(_nowPos select 0)-_i,_nowPos select 1,0]
? (_i < 2) : goto "setposloop"
setAccTime 1
? (alive _unit) : goto "start"
exit
I came up with that in a mere half hours, it is not finished. It first waits for any type of bullet to come towards the unit, then
evaluates the type of bullet, as there are multiple ones and each have to be dodged if you wish not to bite one. Then it takes a small break to see in which direction the bullet is going; away = own bullet (no need to continue) / towards = enemy (do continue.) And finally it goes to the setPos loop with slowed down time.
If you wish to get the final, or a version with possibility to stop the bullets, please input some cash to 41*****-****** ;D
Naw, I'll do it, just give me time. Gotta watch some telly, *cough* ;D