you can however assign a "variable" to each animal...and the one that gets killed(in the example you gave above) you can change the variable to match.
in the "definitions" of each animal you can add variables.
Then, the new spawned animal can be scripted to do what you intended it to do via the matching variable.
(they would be "global" variables, accessible in script from any other scripts.)
example:
unit2 $var1=1
unit3 $var2=2
unit4 $var3=3
unit2 with definition $var1=1 gets killed.
new unit4 spawns having $var3=3.
so you script ( maybe on:create{ ): $var3 = 1
now what ever you had scripted for unit2 (IF $var1=1) to do, you can this script instead (IF $var3=1) do this ELSEIF $var1=1) do this . .checking for the newly spawned animal/s first. edited 5×, last 23.06.22 10:44:24 am