Ahoy Mateys,
I was wondering, if it can be done to make the AI do more realistic sailing. Like not turning directly into the wind when giving chase.
I understand, that the AI is sailing according to the task given for them, like "attack" and "run away". This is done via the Ship_SetTaskRunaway() and Ship_SetTaskAttack() functions in AIShip.c.
The crucial part here is, I think,
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->
SendMessage(&AISea, "llla", AI_MESSAGE_SHIP_SET_TASK, AITASK_RUNAWAY, iTaskPriority, &Characters[iCharacterIndex]);
<!--c2--></div><!--ec2-->
I don't know anything about that SendMessage thing.
Is it possible to make scripted behaviour for the AI? So that it would sail on the closest possible wind angle until the enemy is abeam, and then tack towards that enemy to get closer? Just wondering, because that would be great, like a real regatta! <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid="
" border="0" alt="smile.gif" />
I was wondering, if it can be done to make the AI do more realistic sailing. Like not turning directly into the wind when giving chase.
I understand, that the AI is sailing according to the task given for them, like "attack" and "run away". This is done via the Ship_SetTaskRunaway() and Ship_SetTaskAttack() functions in AIShip.c.
The crucial part here is, I think,
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->
SendMessage(&AISea, "llla", AI_MESSAGE_SHIP_SET_TASK, AITASK_RUNAWAY, iTaskPriority, &Characters[iCharacterIndex]);
<!--c2--></div><!--ec2-->
I don't know anything about that SendMessage thing.
Is it possible to make scripted behaviour for the AI? So that it would sail on the closest possible wind angle until the enemy is abeam, and then tack towards that enemy to get closer? Just wondering, because that would be great, like a real regatta! <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid="
