Jump to content
cervantes

WW2 warships release on arma3 engine

Recommended Posts

i just trying this script and for me this working perfectly for ia ;)

 

try to modifie this 

 

 

#main
_targets = [];
 
 
#scan
?!(alive _ship):exit;
_target = _ship findnearestenemy (position _ship);
?(_target iskindof "Ship") or (_target iskindof "Air") and (_target != _ship):_targets  = _targets + [_target];
?(count _targets > 0):_Curenttarget = _targets select 0;goto "Alarm";
?(count _targets <= 0):goto "surface";
~1
goto "scan"
 
 
?(_target iskindof "Ship"):[_ship,_Curenttarget,"TorpedoLauncher"] exec "\warship_config\script\Torpedo_Fire.sqs";

Share this post


Link to post
Share on other sites

 

i just trying this script and for me this working perfectly for ia ;)

 

try to modifie this 

 

 

#main
_targets = [];
 
 
#scan
?!(alive _ship):exit;
_target = _ship findnearestenemy (position _ship);
?(_target iskindof "Ship") or (_target iskindof "Air") and (_target != _ship):_targets  = _targets + [_target];
?(count _targets > 0):_Curenttarget = _targets select 0;goto "Alarm";
?(count _targets <= 0):goto "surface";
~1
goto "scan"
 
 
?(_target iskindof "Ship"):[_ship,_Curenttarget,"TorpedoLauncher"] exec "\warship_config\script\Torpedo_Fire.sqs";

 

 

I believe that the problem caused by the attack loop ... when I'm removing that loop then the sub is locking and firing before it dives ... I need to achive the opposite now ...

 

I'll give a try also to this new "scan" you send me ..

 

 

UPDATE : the problem caused by the "Attack" case loop for sure ... I'll play a little with this ...

 

UPDATE #2 : I have it sorted out, but only because I've add some delay on "Attack" case (I've removed the loop) and before move to "Launch" case ... anyway I'll be back on that when I'll completely have it working as supposed to be for me.

Share this post


Link to post
Share on other sites

 

i just trying this script and for me this working perfectly for ia ;)

 

try to modifie this 

 

 

#main
_targets = [];
 
 
#scan
?!(alive _ship):exit;
_target = _ship findnearestenemy (position _ship);
?(_target iskindof "Ship") or (_target iskindof "Air") and (_target != _ship):_targets  = _targets + [_target];
?(count _targets > 0):_Curenttarget = _targets select 0;goto "Alarm";
?(count _targets <= 0):goto "surface";
~1
goto "scan"
 
 
?(_target iskindof "Ship"):[_ship,_Curenttarget,"TorpedoLauncher"] exec "\warship_config\script\Torpedo_Fire.sqs";

 

 

 

With this one as modification the sub is diving but also lock and fire a torpedo to the aircraft first :)

 

I believe that the old one is working better.

 

No my issue is that the sub continues firing at least 3 times to the ship even when this is sunked ... 

Share this post


Link to post
Share on other sites
do you use same last loops?

 

#launch

[_ship,_Curenttarget,"TorpedoLauncher] exec "\warship_config\script\Torpedo_Fire.sqs";

 

 

 

#wait

?!(alive _Curenttarget):goto "main"

~1

goto "wait"

 

 

because a last loop wait a curent target si dead before scan again ;)

Share this post


Link to post
Share on other sites

 

do you use same last loops?
 
#launch
[_ship,_Curenttarget,"TorpedoLauncher] exec "\warship_config\script\Torpedo_Fire.sqs";
 
 
 
#wait
?!(alive _Curenttarget):goto "main"
~1
goto "wait"
 
 
because a last loop wait a curent target si dead before scan again ;)

 

 

Yes I'm using the same ... but ... I think that on that order says ... if current target is not alive then goto "main" ... and this is happened fast and only for one time ... so there is no loop because the script on that point restarts.

 

In any case I'm using the same as I said but even after the enemy ship sunks the sub is firing a couple of times more before set its condition to safe and go to surface. Anyway I'll do some more tests on that.

 

 

UPDATE : It works now ... a wrong loop by my side was causing this issue ... 

Share this post


Link to post
Share on other sites

ok the AI script is working fine now and I'm posting it below just for reference.

 

Note that on this line

?(_ship distance _target <= 4000) and (_ship distance _target >= 1000) and (_ship animationphase "senkou" == 7)" the "(_ship distance _target >= 1000)

 the "(_ship distance _target >= 1000)" part is wrong and causes troubles so I've removed it.

 

 

AI.sqs script

_ship = _this select 0;
 
?(player in _ship):exit
 
#main
_targets = [];
_planes = [];
 
#scan
?!(alive _ship):exit;
_target = _ship findnearestenemy (position _ship);
?(_target iskindof "Ship") and (_target != _ship):_targets  = _targets + [_target];
?(_target iskindof "Air"):_planes  = _planes + [_target];
?(count _targets > 0):_Curenttarget = _targets select 0;goto "Alarm";
?(count _targets <= 0) and (count _planes <= 0):goto "surface";
~1
goto "scan"

#surface
?(_ship animationphase "senkou" == 0): goto "main"  
?!(_ship getvariable "DEPTH"):[_ship,0,0] exec "\HAFM_Papanikolis\script\dive.sqs";
 
#end
?(_ship animationphase "senkou" == 0):goto "main"
~1
goto "end"
 
#Alarm
?(_ship animationphase "senkou" <= 0) and !(_ship getvariable "DEPTH"):[_ship,7,7] exec "\HAFM_Papanikolis\script\dive.sqs";
 
#attack
_ship doWatch _Curenttarget;
?(_ship distance _target <= 4000) and (_ship animationphase "senkou" == 7):goto "launch"
goto "attack"
 
#launch
_ship doWatch _Curenttarget;
[_ship,_Curenttarget,"TorpedoLauncher"] exec "\HAFM_Papanikolis\script\Torpedo_Fire.sqs";
 
#wait
?!(alive _Curenttarget):goto "main"
~1
goto "wait"

Share this post


Link to post
Share on other sites

oh i see its because i have add a minimum range for launch a torpedoes ;)

 

great news :)

Share this post


Link to post
Share on other sites

oh i see its because i have add a minimum range for launch a torpedoes ;)

 

great news :)

 

Indeed :) ... now I've to figure out a better explosion effect for the torpedoes and ofcourse I'm waiting for your news on your project ... I'll be glad to help on any way so don't hesitate to let me know about any further issues you may have.

Share this post


Link to post
Share on other sites

i actualy try to find why my submarine is stuck underwater whan i diving :/

 

i not understand why when i depth to -25 or more meters my sub stop move and c'ant restart move if i d'ont dive to periscope depth again.

Share this post


Link to post
Share on other sites

i actualy try to find why my submarine is stuck underwater whan i diving :/

 

i not understand why when i depth to -25 or more meters my sub stop move and c'ant restart move if i d'ont dive to periscope depth again.

 

Are you using PhysX for your sub ? I personally not as PhysX seems not working well with diving scripts.

 

I'll do a test right now on my sub for diving and moving on -25 meters and I'll report back ...

 

btw ... my AI test with the script we talked about ... working fine :)

 

Share this post


Link to post
Share on other sites

OK I've test the depth and I have no problem to move on -25 or -35 meters ... my sub is moving fine ... have you checked the maximun depth of the terrain ? any obstacles outside your sub ?

Share this post


Link to post
Share on other sites

i have add a physyx lod but d'ont use it actualy because we can't simulate large submarine with submarinex simulation.

 

this do not afect a model because i have same prob with or without this lod.

 

only shipx and submarinex simulation using a physx lod ;)

 

if not my north atlantic map have -200 meter to depth and no physx obstacles ;)

 

an i use in my config simulation = "ship";

Share this post


Link to post
Share on other sites

Seem ok to me so I can only figure out that might be some p3d issue ... we have to examine that ... but before that ... do the same test on an ArmA 3 default map and see if the issue persists.

Share this post


Link to post
Share on other sites

i have same prob on stratis map but its better i lost a speed by moment and stuck but sub remove under real speed value is a very strange issue

Share this post


Link to post
Share on other sites

i have same prob on stratis map but its better i lost a speed by moment and stuck but sub remove under real speed value is a very strange issue

 

I believe that I must have a look on your config as a start and if there is no issue in there to start talking about your p3d (talking, not have it). I suggest to post your config either here or send it to me by PM ... otherwise I can't imagine where the problem might be.

 

Or in case you don't want to reveal your config I will send you mine to compare it with yours. 

Share this post


Link to post
Share on other sites

lol i have find :D

 

is a ambient cfg in map config ;)

 

a ambient cfg manage a underwater animals event

 

when i using my custom ambient this creating this troobl

 

and if i use a deffaut ambient config of stratis this working

 

i have also observed my sub lost speed when fishs is spawned around

 

very strange issue for sure ^^

Share this post


Link to post
Share on other sites

I'm not familiar with such things but I'm glad you solved ... so ... go on :)

Share this post


Link to post
Share on other sites

It must be the 2035 high tech submarine jamming fish lol.

Share this post


Link to post
Share on other sites

It must be the 2035 high tech submarine jamming fish lol.

 

Hahah yeah, them Greeksreally dont want WW2 to revisit Altis and Stratis with their subs....... :P

Share this post


Link to post
Share on other sites

Hahah yeah, them Greeksreally dont want WW2 to revisit Altis and Stratis with their subs....... :P

 

I'm Greek and still trying to help ... I hope this is not makes me a traitor !! :)

 

Lets focus to this mod guys :)

Share this post


Link to post
Share on other sites

I'm Greek and still trying to help ... I hope this is not makes me a traitor !! :)

 

Lets focus to this mod guys :)

 

hahahah :) im sorry but i have to post this as we are discussing subs :P : 

oncy7qj.png

 

And im sorry, but yes, you are now a traitor :( And that was me last Of-Topic post. 

 

(You still have time to run before the government find you!!:.......... *Police Kicks In Doors*)

Share this post


Link to post
Share on other sites

Hilarious indeed ... still this is not my thread, so ... not my call :)

Share this post


Link to post
Share on other sites

lol i think aplion want i foward for foward also ^^

 

but im really hapy to see this suport and follow this project ;)

 

i have just fixed a colision bug with fishs ;)

 

and add a script or all agent _x entities (all underwater species) disable colision with vehicle player and this working.

 

i have working one new movie to make you drool :p

 

or we see a new underwater fighting system ;)

 

 

  • Like 4

Share this post


Link to post
Share on other sites

Just a question ... normally a sub of that era should be on periscope depth in order to aim and fire a torpedo against any ship ... I'm I right on that ?

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

×