I want to create a monstergroup and if all monster auf this group are killed, it should create a new monstergroup.
Sorry for my bad english. I hope you can help me.
Also ich möchte eine Monstergruppe createn und wenn alle Monster dieser Gruppe getötet wurden, soll das script eine weitere Gruppe erstellen. Ich hab es versucht aber kriege das nicht hin, habe auch keine Beispielscripte
Ich hoffe ihr könnt mir helfen.
Bitte nicht auslachen das war mein versuch:
Code: Select all
program test(who)
var i;
var x;
var y;
var array1 := {};
for ( x := -2; x <= 1; x := x + 1)
for ( y := -1; y <= 2; y := y + 2)
array1.append ( CreateNpcFromTemplate ( "Zombie", who.x+x, who.y-y, who.z ));
for (i:=0; i < array1.size(); i:=i+1)
if ("life" < 0)
CreateNpcFromTemplate ( "mummy", who.x+x, who.y-y, who.z );
endif
endfor
endfor
endfor
endptogram