Page 1 of 1

Group AI and labeled point

Posted: 27 Feb 2006, 22:57
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

Posted: 01 Mar 2006, 20:14
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

Posted: 04 Mar 2006, 11:10
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);
    }

Posted: 04 Mar 2006, 13:38
by krogothe
Thank you so much! I needed that really badly!
Would that work with groupAIs as well??

Posted: 04 Mar 2006, 17:21
by Bobris
Didn't test it my self, but I don't see reason why not ...

Posted: 06 Mar 2006, 20:30
by Veylon
Very nice. That'll definitely save some trouble.