Group AI and labeled point

Group AI and labeled point

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Post Reply
AnonymousCoward
Posts: 1
Joined: 27 Feb 2006, 22:26

Group AI and labeled point

Post by AnonymousCoward »

Hi,

I am currently trying to build my first custom group AI, and I would like to know if it is possible to make a group AI drawing a ├óÔé¼┼ôlabeled point├óÔé¼┬Ø (normally made by the following sequence hold ` while double left clicking, then type a label then press enter)

I have already managed to make a group AI draw lines on the map, but I really want text to be displayed on the map.

PS: I am not native English speaker, so please forgive my grammars faults
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Ah, I knwo how to draw text on the map, but the onyl way i know of is the following:

method A: Create units that're the shapes of letters and use DrawUnit()
method B: Do what veylon did and use vector co-ordinates to draw lines to write out the letter you want.

As far as I know the inbuilt engine functions that do this all for you arent accesible
Bobris
Posts: 18
Joined: 12 Feb 2006, 17:15

Post by Bobris »

They will be acessible from 0.70b3.
Without even need to change AI Interface.
Example:

Code: Select all

AIHCQuerySubVersion amq;
if (mAICallback->HandleCommand(&amq)>=1)
    {
    // new functions are supported
    AIHCAddMapPoint amp;
    amp.pos=float3(1000,0,1000);
    amp.label="Hello World";
    mAICallback->HandleCommand(&amp);
    }
User avatar
krogothe
AI Developer
Posts: 1050
Joined: 14 Nov 2005, 17:07

Post by krogothe »

Thank you so much! I needed that really badly!
Would that work with groupAIs as well??
Bobris
Posts: 18
Joined: 12 Feb 2006, 17:15

Post by Bobris »

Didn't test it my self, but I don't see reason why not ...
User avatar
Veylon
AI Developer
Posts: 174
Joined: 21 Sep 2005, 19:45

Post by Veylon »

Very nice. That'll definitely save some trouble.
Post Reply

Return to “AI”