Hello, I'm working on a cover & hold script using those new ICPanims from the VDV2.0 effectpack.
The reason why I want to use them is :
- They look cool.
- Different from all the other custom anims I've seen, AI is able to turn and shoot! (with all respect to all the other animators, but these can be used in a mission and not only for eyecandy)
- You can kill them, A deadly shot is followed by a default death animation.
I could find only one nasty bug : They can't reload while they're in the pose.
So I thought... maybe this can be solved with some scripting, so I did.
You can easily break the animation with _unit switchmove "" but it doesn't look good. So I made it so the animation between look as smooth as possible.
;test.sqs
; run it with [this] exec "test.sqs" in the init of your AIunit.
_unit = _this select 0
#start
_wep = (weapons _unit select 0)
_mag = (magazines _unit select 0)
_crposes = ["ICPaim1","ICPaim2","ICPaim5"]
_cc = count _crposes
_cr = random _cc
_cr = _cr - _cr % 1
_unit switchMove (_crposes select _cr)
#ammocheck
;;###DEBUG###
;hint format ["%1",_unit ammo _mag]
?_unit ammo _mag < 1 :goto "Reload"
~1
goto "ammocheck"
#Reload
;### DEBUG ###
;player globalchat "reload"
_unit setunitpos "UP"
_unit switchmove "crouchtocombat"
~1
_unit switchmove ""
_unit addmagazine _mag
@_unit ammo _mag > 1
_unit switchmove "Combattocrouch"
~0.5
goto "START"
This works great with the BIS soldiers but not with addons like BAS, MAP,...
When I use addons the script jumps directly to the #reload label, so I guess there's something wrong with the ammocheck loop.
I really want to find this problem so I can use it with every addonsoldier. My final goal is to create a cover & hold script where AI is able to shoot from buildings and even change their position(floor) in a random period. But first I need to solve that nasty reloadbug... :angry:
Any1 knows what wrong with it?
you can find the anims
HEREThey work with any unit (you don't need VDV2.0) but they look best with the VDV.20 troops.Great stuff!