PDA

View Full Version : Need help with actors progress. HELP...!



steelman22
09-05-2004, 11:22 AM
i workin on game with my friend and i have encountered a serious problem:

Monsters in my game are TGLActor based types:

Type TMonster = class(TGLActor)
public
Name:String;
Strength: 1..25;
Dexterity: 1..25;
Build: 1..25;
Inteligence: 1..25;
Wisdom: 1..25;
Charisma: 1..25;
LifeEnergy: integer;
Rasa:String;
KP:integer;
Level:Cardinal;
color:tcolor;
target:TGLSceneObject;
procedure DoProgress(const progressTime : TProgressTimes); override;
private
procedure DoMove;

procedure onprogress and move look smth like it:


procedure Tmonster.DoProgress(const progressTime : TProgressTimes);
begin
inherited Doprogress(progressTime);
rollangle:= obracanie(self,target);
domove;
with position do
z:=0;
end;

procedure tmonster.DoMove;
begin
if sqrdistanceto(target) > 0.6 then
lift(0.005);
end;

and here is my problem:
when i create for example 50 monster Glcadencer is working slower and procedure onprogress is calling 'slower' too so monster are walking very very slow .
dont you know how to call procedure domove alone. i want it to call itself.

pleas help
thanks mathew

steelman22
09-05-2004, 05:21 PM
ok i have found how to fix it
anyway
thanks