Verwurster verstehe deinen code nicht ganz könntes du ihn mir erklären
wie komme ich zu other
kommt das durch das with(gegner) oder wie???
gegnerid=-100;
with(gegner)
{
var dir;
dir=point_direction(other.x,other.y,x,y);
if(dir>0&&dir<90&&point_distance(x,y,other.x,other.y)<=maximale_distanz)
{
if(other.gegnerid==-100)
other.gegnerid=id;
else
{
if(point_distance(other.x,other.y,x,y)<point_distance(other.x,other.y,other.gegnerid.x,other.gegnerid.y))
{
other.gegnerid=id;
}
}
}
}
if(instance_exists(gegnerid))
{
turmrichtung=point_direction(x,y,gegnerid.x,gegnerid.y);
//schiessen
}
wie komme ich zu other
kommt das durch das with(gegner) oder wie???
gegnerid=-100;
with(gegner)
{
var dir;
dir=point_direction(other.x,other.y,x,y);
if(dir>0&&dir<90&&point_distance(x,y,other.x,other.y)<=maximale_distanz)
{
if(other.gegnerid==-100)
other.gegnerid=id;
else
{
if(point_distance(other.x,other.y,x,y)<point_distance(other.x,other.y,other.gegnerid.x,other.gegnerid.y))
{
other.gegnerid=id;
}
}
}
}
if(instance_exists(gegnerid))
{
turmrichtung=point_direction(x,y,gegnerid.x,gegnerid.y);
//schiessen
}
PI 0%(IN PROGRESS)
[IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII]
[IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII]
Engine : 0.0 %
KI : 0.0 %
Grafik : 0.0%
Sounds: 0.0 %
Multiplayer: 0.0%
[IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII]
[IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII]
Engine : 0.0 %
KI : 0.0 %
Grafik : 0.0%
Sounds: 0.0 %
Multiplayer: 0.0%
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von bigmek ()