weiß jemand wo hinterlegt ist was ein Abwehrturm so alles automatisch angreifen soll? Ich würde nämlich gerne diese elendigen Heuschrecken hinzufügen damit mein Feld besser geschüttzt ist.
Danke im Voraus!
Allgemein
Zielerfassung der Abewehtürme
Zielerfassung der Abewehtürme
1

projectile 53,$x,$y,$z,6,350,15,59;
projectile 53,$x,$y,$z,5,350,15,59;
Ist echt ein super Spiel.
)
)
count_behaviourinrange prüfen, dann mit
loop alle des typs durchgehen und mit
distance prüfen ob sie im gebiet sind. danach mit
getx
gety und
getz die koordinaten ermitteln und das projektil auf die stelle feuern) on:timer {
		local $x,$y,$z;
		$x=getx("self");
		$y=gety("self");
		$z=getz("self");
		$y+=28;
		
		local $hoppers,$distance,$range,$gx,$gy,$gz;
		$hoppers=0;
		$range=350;
		$hoppers+=count_inrange("unit",43,$range,"self");
		
		// Es ist ein Grashüpfer in der nähe
		if ($hoppers>=1){
			loop("unit",43){
				$id=loop_id();
				$tmp=currentid();
				if ((distance("unit",$id,"object",$tmp)<=$range) && (lives("unit",$id)==1)){
					$gx=getx("unit",$id);
					$gy=gety("unit",$id);
					$gz=getz("unit",$id);
					projectile 53,$x,$y,$z,2,$gx,$gy,$gz,15,59;
					exit();
				}
			}
		}
		// Keiner da, ganz normal verhalten
		else{
			projectile 53,$x,$y,$z,6,350,15,59;
		}
	}

)!
local $hoppers,$distance,$range,$gx,$gy,$gz;
$hoppers=0;
$range=350;
$hoppers+=count_inrange("unit",43,$range,"self");
local $hoppers,$distance,$range,$gx,$gy,$gz;
$range=350;
$hoppers=count_inrange("unit",43,$range,"self");
Ich werde eure Schönheitstips noch einfließen lassen, und thx nochmal für die Hilfe!
1
