Can i dynamically change draw time for CreateLineFigure() ?

Can i dynamically change draw time for CreateLineFigure() ?

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

Moderators: hoijui, Moderators

Post Reply
slogic
AI Developer
Posts: 626
Joined: 17 Mar 2008, 19:03

Can i dynamically change draw time for CreateLineFigure() ?

Post by slogic »

I created some lines with CreateLineFigure(). Lines has a handler - figure ID. I can postprocess some properties of lines by SetFigureColor(). But i see no way to control draw time dynamically. I can "turn off" my lines by setting alpha channel value to 0.0, but Spring still draws these lines and i'm getting a huge FPS drop.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Can i dynamically change draw time for CreateLineFigure() ?

Post by Kloot »

Can't you just delete them at that point?

Code: Select all

int CreateLineFigure(float3, float3, float, int, int, int figureGroupId);
void DeleteFigureGroup(int figureGroupId);
slogic
AI Developer
Posts: 626
Joined: 17 Mar 2008, 19:03

Re: Can i dynamically change draw time for CreateLineFigure() ?

Post by slogic »

Really, that works, thanx. I was obsessed with draw time param :?
slogic
AI Developer
Posts: 626
Joined: 17 Mar 2008, 19:03

Re: Can i dynamically change draw time for CreateLineFigure() ?

Post by slogic »

Hm, is it possible to associate UnitDraw with figureGroupId also? Current implementation is not really usefull: you can specify draw time only.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Can i dynamically change draw time for CreateLineFigure() ?

Post by AF »

I would advise the use of lua widgets and the lua<->AI callbacks with a gadget as a go between, it would sidestep all of this and provide a much larger range of visual debugging tools
Post Reply

Return to “AI”