OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods Beta Testing => Topic started by: bdfy1 on 03 Apr 2005, 13:37:43

Title: Mortar
Post by: bdfy1 on 03 Apr 2005, 13:37:43
I'm looking for subj addon... Does it exist ?
The only one I know is http://www.partizanen.h14.ru/files/mortar.rar ( ther's no readme thus I don't know the author :()
I like the model but addon has many defects : there's no animation , it's configured as tank ( you  can't kill the gunner :)) etc.
Can anyone upgrade this mortar ( I mean animations first of all ) or something ?
Title: Re:Mortar
Post by: nominesine on 03 Apr 2005, 14:52:23
FDF-mod: http://koti.mbnet.fi/fdfmod/
Title: Re:Mortar
Post by: bdfy1 on 03 Apr 2005, 15:00:59
Aha , great ... just several hundred Mb...
I'm looking for separate addon... May be someone can pull it out of FDF ?
Title: Re:Mortar
Post by: greg147 on 03 Apr 2005, 15:04:16
Mortars. Not sure which one you're looking for, but fish around  ;)

http://ofp.gamezone.cz/index.php?showthis=2061

http://ofp.gamezone.cz/index.php?showthis=2095

http://ofp.gamezone.cz/index.php?showthis=3660

http://ofp.gamezone.cz/index.php?showthis=5283

http://ofp.gamezone.cz/index.php?showthis=8028

Enjoy  ;)
Title: Re:Mortar
Post by: bdfy1 on 03 Apr 2005, 16:32:02
I tried them all except
http://ofp.gamezone.cz/index.php?showthis=5283 (Chain Of Command Unified Artillery 1.0)
(it's a rather big pack :()
still no animations:(
Title: Re:Mortar
Post by: bdfy1 on 19 Apr 2005, 23:09:00
OK , I checked everything... Coc, Sebnam etc :(
I'm interested if it's possible at all - to animate gunner work ?
I mean addEventHandler "fired" ( in config or in init field ) and then force gunner to playmove "CombatReloadMortarStart"... But gunner doesn't play anim when he assigned as gunner :(
Any ideas ?

   
Title: Re:Mortar
Post by: UNN on 20 Apr 2005, 13:57:05
Quote
But gunner doesn't play anim when he assigned as gunner  
Any ideas

You can use the SwitchAnim command, I just tested it with GFX's mortar. I guess "CombatReloadMortarStart" is linked to other anims, so you get the same effect as if you used PlayMove.

I to would like to see more animated crews, but really you need some dedicated animation for not only the gunner, but the loader and the guy that holds\adjusts the support arm. The reload animation and the mortar barrel dont really match positions.
Title: Re:Mortar
Post by: bdfy1 on 20 Apr 2005, 14:59:58
Wow! It's working! And looks nice even with non-specific animation.
But how can I add EH to addon config ? I add this at the end
Quote
class EventHandlers
      {
         fired= "_this exec ""\mortar\scripts\fired.sqs""";
      };
No errors, but it doesb't seem to be worky :( I can't even launch hint from this script as example
Through init line I used
Quote
_gunner = gunner this
_gunner switchmove "CombatReloadMortarStart"
exit
I guess it's possible to modify anim slightly  in order  "reload animation and the mortar barrel dont really match positions"
How do  configure this new anim in addon( addon of mortar not anim pack ) ?

Title: Re:Mortar
Post by: Pilot on 20 Apr 2005, 15:22:39
I'm not an expert with EHs, but try this:

The config:
Code: [Select]
class EventHandlers
{
fired= "[_this select 0] exec ""\mortar\scripts\fired.sqs"" ";
};

Then the script:
Code: [Select]
_gun = _this select 0

_gunner = gunner _gun
?!alive _gunner: exit
_gunner switchmove "CombatReloadMortarStart"
exit

I hope that fixes the problem.
Title: Re:Mortar
Post by: bdfy1 on 20 Apr 2005, 16:11:31
You don't understand... The script doesn't execute from config :(
I tried simply write
hint "fired" in fired.sqs - I saw no hint when firing:(

full config in the attachment
Title: Re:Mortar
Post by: Pilot on 20 Apr 2005, 16:38:57
Maybe the fired eventhandler doesn't work from the config, try using an Init eventhandler which calls a script.  Put a fired eventhandler in the script which calls the reload animation.
ex:
Quote
class EventHandlers
{
init= "[_this select 0] exec ""\mortar\scripts\EH.sqs"" ";
};

EH.sqs:
Quote
_gun = _this select 0
_gun addeventhandler ["fired",{_this exec "fired.sqs"}]
exit

Syntax not guarenteed.
Title: Re:Mortar
Post by: bdfy1 on 21 Apr 2005, 21:39:48
I found out what was wrong. My config.cpp was a mess . Class EventHandlers should be under ConfigVehicles. Once I fix it everything works fine...  I'm still interested in custom animation ( can anyone do some ?) and I don't know how to register anims in addon :(