_BARNS_ 0 Posted May 30, 2010 Hey I am trying to get the artillery to deploy flares instead of grenades, but somehow it is not working if someone has an idee how i can make this happen plz let me know! here is the script ... ; ********************************************************* ; Script file for Armed Assault ; Script by: Mr-Murray ; Script edited by: _BARNS_ ********************************************************* _K = _this select 0; _Z = _this select 1; _X = getPos _Z select 0; _Y = getPos _Z select 1; _K doWatch [_X,_Y,5000] ; _A =_K Ammo "PRACS_m109_155mm_Gun"; ~5 _K fire "PRACS_m109_155mm_Gun"; @ _A > _K Ammo "PRACS_m109_155mm_Gun"; ~2 _N = nearestObject [_K,"PRACS_m109_155mm_Frag"]; _X = _X+((random 80)-40) ; _Y = _Y+((random 80)-40) ; _H = "HeliHEmpty" createVehicle [_X,_Y] ; ~1 _H say "ari"; ~1 _N setPos [_X,_Y,0]; "FlareWhite_M203" createVehicle [_X,_Y,0] ; deleteVehicle _H; exit Share this post Link to post Share on other sites
seba1976 98 Posted May 30, 2010 "FlareWhite_M203" createVehicle [_X,_Y,0] ; I think you are creating the flare at ground level. z coordinate is height above ground, and you have it at zero. I may be wrong but try: "FlareWhite_M203" createVehicle [_X,_Y,50] ; and see what happens. Share this post Link to post Share on other sites
_BARNS_ 0 Posted May 31, 2010 I tried _N setPos [_X,_Y,300]; "FlareWhite_M203" createVehicle [_X,_Y,300] ; deleteVehicle _H; but no flares can be seen! Share this post Link to post Share on other sites
seba1976 98 Posted May 31, 2010 I tried_N setPos [_X,_Y,300]; "FlareWhite_M203" createVehicle [_X,_Y,300] ; deleteVehicle _H; but no flares can be seen! You are using the magazine name of the flare. Try replacing "FlareWhite_M203" with "F_40mm_White". Share this post Link to post Share on other sites
_BARNS_ 0 Posted June 1, 2010 You are using the magazine name of the flare. Try replacing "FlareWhite_M203" with "F_40mm_White". Damn what a stupid mistake i made, going to try it out this evening, hope it works thx alot m8! Share this post Link to post Share on other sites
_BARNS_ 0 Posted June 15, 2010 (edited) Well, after clearing one problem here we are with the next. I tried Mr-Murrays artillery example for the enemy from the deitor guide, means, the artillery is activatied by a trigger if BLUFOR is detected by the enemy. so far so good BUT than i got this error message ... _Y = |#|getpos _Z select 1; error getpos, type array, awaiting object and this error ... _K doWatch [_X,_Y,5000]; and here are the scripts ... this is in the trigger ... _Ziel = _this select 0; ;Feuer {[_x,_Ziel] exec "scripts\efire.sqs"} foreach [E1,E2,E3,E4,E5,E6] exit; exit; this one is the efire.sqs _K = _this select 0; _Z = _this select 1; _X = getPos _Z select 0; _Y = getPos _Z select 1; _K doWatch [_X,_Y,5000]; _A =_K Ammo "D30"; ~5 _K fire "D30"; @ _A > _K Ammo "D30"; ~3 _N = nearestObject [_K,"HeatD30"]; _X = _X+((random 80)-40); _Y = _Y+((random 80)-40); _H = "HeliHEmpty" createVehicle [_X,_Y] ; _H say "Ari"; ~1 _N setPos [_X,_Y,0]; "SH_125_HE" createVehicle [_X,_Y,0]; deleteVehicle _H; exit; maybe somebody knows how to fix it ... come on scripting gods thx in advance Edited June 15, 2010 by _BARNS_ Share this post Link to post Share on other sites
seba1976 98 Posted June 16, 2010 Not a guru god here but hey :D. Assuming there's a line in the 'on activation' field of the trigger with something like: thislist exec "your_trigger_script.sqs" then change the efire.sqs from this: _X = getPos _Z select 0; _Y = getPos _Z select 1; To this: _X = (getPos _Z) select 0; _Y = (getPos _Z) select 1; I'm not at home now, but I think you could give it a try. Cheers. Share this post Link to post Share on other sites
_BARNS_ 0 Posted June 16, 2010 Okay i changed the code, now i only still got this error message ... _K doWatch [_X,_Y,5000]; hope you got an idea for this too :D cheers Share this post Link to post Share on other sites
seba1976 98 Posted June 16, 2010 It works on my end. Could you give any other detail about the error you're getting? "_K doWatch [_X,_Y,5000];" is not an error message. Maybe an screenshot? The only reason I can think of for that line to give you an error in that context is that you haven't named the 6 artillery pieces E1 to E6, other than that, it works for me and it was a lot of fun to see a single OPFOR Forward Observer to cope with 5 enemy squads coming from all sides :D. Share this post Link to post Share on other sites
_BARNS_ 0 Posted June 17, 2010 Hmmm, i changed something in the on activation line ... [thislist] exec ... to [this select 0] exec ... after that the error was gone but now the artillery only fires once ... I am going to post the screenshot m8! btw did you see my other big prob? http://forums.bistudio.com/showthread.php?t=100551 :D Share this post Link to post Share on other sites
killerwhale 1 Posted June 17, 2010 can there be real artillary shell landing on the specified target instead of using codes like "SH_125_HE" createVehicle [_X,_Y,0]; to create explosion. Share this post Link to post Share on other sites
seba1976 98 Posted June 17, 2010 (edited) can there be real artillary shell landing on the specified target instead of using codes like to create explosion. Well, if this breaks the immersion for you, I guess you could try this. If you just want to see the shell falling you can try this and see if it works: "SH_125_HE" createVehicle [_X,_Y,100]; ---------- Post added at 07:28 PM ---------- Previous post was at 07:17 PM ---------- Hmmm,i changed something in the on activation line ... [thislist] exec ... to [this select 0] exec ... after that the error was gone but now the artillery only fires once ... I am going to post the screenshot m8! btw did you see my other big prob? http://forums.bistudio.com/showthread.php?t=100551 :D There were no errors when I tried what you say you're trying, if you want you can send me a mission sample - with only the basic stuff that gives you the error - and I'll take a look at it, as it seems that the problem is more in the setup than in your scripting. Regarding your other post, I'm sorry mate, but I don't use ACE and it's very likely that your problem is some ACE feature . Edited June 17, 2010 by seba1976 Share this post Link to post Share on other sites