PDA

View Full Version : Creeat dynamically TGLMovement , TGLMovementPath , TGLPathNode;



bazbazus
04-01-2010, 03:24 AM
how to creat un movement Line for model in runtime

I test this but it does not work :



var mov:TGLMovement;
mov:=TGLMovement(form1.FindComponent('LabelInfo'+i nttostr(NombreDimage)));
mov:=TGLMovement.Create(Self);
With mov do begin
name:'mov'+inttostr(i) ///move 1 2 3 4 5 6 .... 50
end;
/

NecroDOME
04-01-2010, 05:39 PM
Can you please provide more code??


mov:=TGLMovement(form1.FindComponent('LabelInfo'+i nttostr(NombreDimage)));
mov:=TGLMovement.Create(Self);
- You're overwriting mov 2nd time

bazbazus
04-01-2010, 10:20 PM
any one for help >:( >:(

User137
05-01-2010, 01:10 PM
It's not enough to just create an object, you have to assign it to some action through class functions (what are they? I don't know, read class source code or manual as there is nothing online). And your code already has a memory leak as necrodome pointed out.