Nice underwear lol
The guy gets a breast plate armor and trousers, both can be changed, the boots are directly on the mesh and stay. There will be 4 different chars with own textures, special moves and abilities (correct word?).
So one last Question (I hope):
This helped me a lot.
Now it seems to work if I have the monster exactly in front or, and this is the problem exactly in the back :roll:
Code:
function TForm1.fightcollide(spriteself: TDJXEngineItem): boolean;
var i: integer;
colSpr: TDJXEngineItem;
ColPt: TD3DXVector2;
tmpVec: TD3DXVector2;
ndist,nrot: Double;
vdir,v: TD3DXVector3;
d: single;
begin
result:=false;
//nrot:=degtorad(spriteself.nrotatey);
nrot:=spriteself.nrotatey;
vDir := D3DXVector3(cos(nrot),0,sin(nrot));
for i:=0 to Engine.Count-1 do begin
ndist:=distance_dbl(spriteself.x,spriteself.z,0,Engine.Sprites[i].X,Engine.Sprites[i].Z,0);
if (Engine.Sprites[i]<>spriteself)
and (ndist<Innomsprite(spriteself).nRadius*2+Innomsprite(Engine.Sprites[i]).nRadius*2)
then begin
colSpr:=Engine.Sprites[i];
//Player hits Monster
if (spriteself.name='spieler') and (meshplayer(spriteself).status=schlag1) then begin
if (colspr.name='innom') and (meshinnom(colspr).status<>schmerz) then begin
D3DXVec3Subtract(v,D3DXVector3(colspr.X,colspr.Y,colspr.Z),D3DXVector3(spriteself.X,spriteself.Y,spriteself.Z));
D3DXVec3Normalize(vdir, vdir );
D3DXVec3Normalize(v,v);
d:= (v.x * vdir.x) + (v.z * vdir.z);
d := ArcCos(d);
if (d < pi/5) or (d > 5*pi/6) then begin //player is in the front area
meshinnom(colspr).nanimpos:=0;
meshinnom(colspr).status:=schmerz;
meshinnom(colspr).hit(meshplayer(spriteself).nhitpower);
end;
end;
end;
end;
end;
end;
Disabling html....done :twisted:
Thanks a lot guys, this helps me a lot!
Firle
Bookmarks