hey guys,
so i wanted to create a new mission in the eden editor. my intention was to spawn an enemy with createunit. it works but the problem is i cant figure out how to activate my script wich leads the spawned enemy to shoot at an certain object.---- null=this spawn {_this dotarget t1 ;sleep 2;while {alive t1 and alive _this} do {sleep 0.3; gl action ["useweapon",vehicle _this,_this,0]; }} ---- this is the script wich I add to the init file of the enemy. and this is my create unit script: "uns_nva3mg" createUnit [getMarkerPos "Spawn",chef, "lal=this;"]; both work speratly but when i try to mix them together it gives me errors. my idea was like this: "uns_nva3mg" createUnit [getMarkerPos "Spawn",chef, "lal=this;null=this spawn {lal dotarget t1 ;sleep 2;while {alive t1 and alive lal} do {sleep 0.3; gl action ["useweapon",vehicle lal,lal,0]; "]; }}
thank you for your answers