Can i dynamically change draw time for CreateLineFigure() ?
Moderators: hoijui, Moderators
Can i dynamically change draw time for CreateLineFigure() ?
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.
Re: Can i dynamically change draw time for CreateLineFigure() ?
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);
Re: Can i dynamically change draw time for CreateLineFigure() ?
Really, that works, thanx. I was obsessed with draw time param 

Re: Can i dynamically change draw time for CreateLineFigure() ?
Hm, is it possible to associate UnitDraw with figureGroupId also? Current implementation is not really usefull: you can specify draw time only.
Re: Can i dynamically change draw time for CreateLineFigure() ?
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