SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Modern-Era Subsims > Dangerous Waters > DW Mod Workshop > DW Mission Designers' Forum
Forget password? Reset here

Reply
 
Thread Tools Search this Thread Display Modes
Old 08-07-05, 10:16 AM   #1
winkelried
Nub
 
Join Date: May 2005
Posts: 3
Downloads: 44
Uploads: 0
Default Strange Behaviour of AI (Pathfinding)

Working on a scenario where I want a few ships (two PTGs and one SS) to stay in a harbor and then to leave the harbor when a trigger fires.

The two PTGs are in a formation and both the formation and the SS have a waypoint tactic assigned with the speed on the origin being 0.

When I now give the order to SetSpeed to leave the harbour and to get beyond the first waypoint the AI behaves strangely. The PTG suddendly start to turn around each other and the sub runs astray even its initial course. Everything seems to be happening completely randomly.

Any ideas how this could work ?
__________________
Honneur et Fidelité
winkelried is offline   Reply With Quote
Old 08-07-05, 10:58 AM   #2
inetd
Swabbie
 
Join Date: Jul 2005
Location: Germany
Posts: 14
Downloads: 3
Uploads: 0
Default

Do they leave the harbour without problems when you set the speed to something > 0 from the beginning? Maybe it's just a pathfinding problem.
__________________
\"Those are my principles, and if you don\'t like them... well, I have others.\" - Groucho Marx
inetd is offline   Reply With Quote
Old 08-07-05, 11:25 AM   #3
winkelried
Nub
 
Join Date: May 2005
Posts: 3
Downloads: 44
Uploads: 0
Default

Quote:
Originally Posted by inetd
Do they leave the harbour without problems when you set the speed to something > 0 from the beginning? Maybe it's just a pathfinding problem.
Thanks. Tried it - same behaviour. Any idea where I get some wisdom on pathfinding
__________________
Honneur et Fidelité
winkelried is offline   Reply With Quote
Old 08-07-05, 11:35 AM   #4
winkelried
Nub
 
Join Date: May 2005
Posts: 3
Downloads: 44
Uploads: 0
Default

Got a fix:
The PTs had to get around a cape. Originally I let them pass a small cape at approx 400 yards (depth 180 feet) when I put them now at 700 yards (depth 280 feet) they work ok.
__________________
Honneur et Fidelité
winkelried is offline   Reply With Quote
Old 08-07-05, 01:35 PM   #5
Fish
Eternal Patrol
 
Join Date: Sep 2001
Location: Netherlands
Posts: 1,923
Downloads: 0
Uploads: 0
Default

Pathfinding is only to forcome ships ran on land.
I made maps like that without problems, so I have no idea why it not works in your case.
If you want I can look into your map?
Fish is offline   Reply With Quote
Old 08-07-05, 04:06 PM   #6
OKO
Commander
 
Join Date: Jan 2002
Location: Solar system, mainly on earth
Posts: 476
Downloads: 62
Uploads: 0
Default

question : did you used a script with pathfinding instruction for this plateform ?
OKO is offline   Reply With Quote
Old 08-08-05, 07:55 PM   #7
JoGary(sco)
A-ganger
 
Join Date: May 2005
Location: Loch lomand, Scotland
Posts: 71
Downloads: 10
Uploads: 0
Default

I have had problems like this, some times when leaving a harbour if the first waypoint is to close it misses it and circles to try get to it. Try moving first waypoint further out and making the tolerance to 1nm or more if needed. I had the same problem when i was working on one of your scenarios Fish. Remeber the one that i moved the FFG out of the harbour because it kept hitting it when it started to move. Well i could get it out of the harbour with using some waypoint very close to starting position but when it came out it would circle back as it was missing the waypoints. When i took it out of harbour and moved the waypoints farther out it was ok.
btw, dont try setting out a curve of waypoints close together to make it turn once it comes out. Just use one at point u want it to change course then another farther out at least 3nm on the cource u want it to take. If they close together then u get same circling problem even with toleranc set to like 10nm
__________________
Joseph,Gary Winters
jgw28@blueyonder.co.uk
ICQ : 259-346-534
http://seawolves.org
JoGary(sco) is offline   Reply With Quote
Old 08-09-05, 05:43 AM   #8
Fish
Eternal Patrol
 
Join Date: Sep 2001
Location: Netherlands
Posts: 1,923
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by JoGary(sco)
I have had problems like this, some times when leaving a harbour if the first waypoint is to close it misses it and circles to try get to it. Try moving first waypoint further out and making the tolerance to 1nm or more if needed. I had the same problem when i was working on one of your scenarios Fish. Remeber the one that i moved the FFG out of the harbour because it kept hitting it when it started to move. Well i could get it out of the harbour with using some waypoint very close to starting position but when it came out it would circle back as it was missing the waypoints. When i took it out of harbour and moved the waypoints farther out it was ok.
btw, dont try setting out a curve of waypoints close together to make it turn once it comes out. Just use one at point u want it to change course then another farther out at least 3nm on the cource u want it to take. If they close together then u get same circling problem even with toleranc set to like 10nm
You are right waypoints to close gives problems.
Fish is offline   Reply With Quote
Old 08-09-05, 12:34 PM   #9
OKO
Commander
 
Join Date: Jan 2002
Location: Solar system, mainly on earth
Posts: 476
Downloads: 62
Uploads: 0
Default

using pathfinding instruction must solve this problem

put a WP on each side of land, using pathfinding instruction, and you will see the ship is able to avoid ground contact by himself.

at start, use a script =>

name : initgame
event trigger
automatic
run script : pathfind

script =>
name : pathfind
pathfinding / for / your plateform / is on

now you can kill all WP to get out of the harbor, just put one at the end of the harbor and let the script do the thing.
should work for you as it works here.
OKO is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:51 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.