is zielen auch am anfang auf 0?
Scripts
Scripting - Fragen/Probleme
on:load {
unitpath 133,86;
}
on:node0086 {
unitpath 133,87,88,89,90,91;
}
on:node0091 {
ai_stay "self",1;
addstate "self", 60;
timer "self", 10000,"weitergehen";
}
on:weitergehen {
	ai_stay "self",0;
	unitpath 133,92;
}
on:node0092 {
	unitpath 133,93,94,95,96.97;
}
on:start
	{
	msg "Versuche zu überleben!";
	timer 0, 23000, 1, uberleben;
	}
on:uberleben
	{
	if(lives("unit", 1)==1)
		{
		add "!2Super!!!";
		add "Du hast überlebt, Glückwunsch!";
		msgbox "Überlebt!";
		}
	}
on:changeday{
	if (int random 3 ==1) { kill "self"}
	if (int random 3 ==1) {
		$idx = getx "object", "self";
		$idx += random 80 - 40;
		$idz=getz "object", "self";
		$idz += random 80 - 40;
		$idneu = create "object", 47, $idx, $idz;
		addscript "object", $idneu, 1;
		}
}
if (random(3)==1) { kill "self"; }
>SCRIPT ERROR:
>object/unit/item/info with ID '0' does not exist
>Script: object 0 (DOES NOT EXIST)
>event: changeday
>row:3
>col: 30
>script: $idx = getx("object,"self");
on:changeday{
	if (random (3) ==1) {
		$idx = getx ("object","self");
		$idx += random (80) - 40;
		$idz = getz ("object","self");
		$idz += random (80) - 40;
		$idneu = create ("object", 47, $idx, $idz);
		addscript "object", $idneu, 1;
	}
	if (random (3) ==1) { kill "self";}
}
$idx = getx ("object","self");
$idx = getx ("self");
. on:changeday{
	if (random (40)==1) {
		free "self";
	}
	if (random (50)==1) {
		$idx = getx("self");
		$idx += random(80);
		$idx -= 40;
		$idz = getz("self");
		$idz += random(80);
		$idz -= 40;
		$idneu=create ("object", XYZ, $idx, $idz);
		addscript "object", $idneu, ZYX;
	}
}
on:load{
addscript "self", ZYX;
}
on:trigger {
//Deine ganzen Sachen
}
freescript "self";
on:start {
$variable=1;
}
on:trigger {
if ($variable==1){
//Dein einmaliges Zeug
$varibale--;
}
// Dein mehrmaliges Zeug
}
on:use {
event "toggle";
}
on:use {
	if ((playergotitem(15<=1))&&(playergotitem(26<=1))) {
		freestate"unit",100,1;
		freestored"unit",1,15,1;
		freestored"unit",1,26,1;
		}
}
Fortpflanzung Skripton:changeday{
	$idx = getx("self");
	$idz = getz("self");
	if (random (10)==1) {
		if (count("object",47) >1){
			$idneu=create("object",30,$idx,$idz);
			addscript "object",$idneu, 2;
			free "self";
		}
	}
	if (random (15)==1) {
		$idx += random(100);
		$idx -= 50;
		$idz += random(100);
		$idz -= 50;
		$idneu=create ("object", 47, $idx, $idz);
		addscript "object", $idneu, 1;
	}
}
on:changeday{
	free "self";
}
on:changeday{
	free "self";
}