Daniel Frič 1 Posted August 21, 2018 Hey ! , i want to ask what is wrong with my scripts Im using Triggers in game to make AI artillery fire on area, at first it worked, then i wanted to test it out and nothing happened, when i came to them to test it, they just aimed and then took they aim to default position im using this script : _ammo = getArtilleryAmmo [gun1] select 0; _tgt = getMarkerPos "target1"; gun1 doArtilleryFire[_tgt,_ammo,10]; Share this post Link to post Share on other sites
pierremgi 4739 Posted August 22, 2018 Check for the distance. Sometimes too close, even for close range firing. 10 seems to overpass the max salvo capacity. Try with 3, 6... and 9 max. Share this post Link to post Share on other sites
Daniel Frič 1 Posted August 22, 2018 Already tried, its in range, 10 was good, i found out that when i changed salvo to 3 etc, then moved trigger it stopped working Share this post Link to post Share on other sites
Daniel Frič 1 Posted August 22, 2018 Range is good but gonna try it anyway to move around and see what i can do, but i think its fine Share this post Link to post Share on other sites
Daniel Frič 1 Posted August 22, 2018 Im srsyl out of my mind, i tried range, tried do triggers again, nothing just working, they just aim to the sky and then aim down to their default like wtf Share this post Link to post Share on other sites
pierremgi 4739 Posted August 22, 2018 1 hour ago, Daniel Frič said: Im srsyl out of my mind, i tried range, tried do triggers again, nothing just working, they just aim to the sky and then aim down to their default like wtf Yes, I've got this problem for my mission at Lingor with 3 Scorcher artillery firing hundreds of shells. I finally caught the sequence (min 3:16), just moving artillery then my three markers. My code is slightly different than yours: { [_x,_foreachindex] spawn { sleep 2 + random 4; _tk = _this select 0; _i = _this select 1; _tk disableAI ""AUTOCOMBAT""; _cnt = 0; while {alive _tk && _cnt < 500} do { _tk doArtilleryFire [getMarkerPos (""mkart""+str(_i +1)), _tk currentMagazineTurret [0],5]; _tk addMagazineTurret [_tk currentMagazineTurret [0], [0], 5]; _cnt = _cnt +5; sleep 30 } } } forEach [art2,art3,art4]; Don't doArtilleryFire too frequently. Give the engine some time to run. 1 Share this post Link to post Share on other sites
Daniel Frič 1 Posted August 22, 2018 Im new to scripts, i found it on YT so i dont understand your code :/ i only understand getMarkerPos, addmagazineturret and disable autocombat 1 Share this post Link to post Share on other sites
pierremgi 4739 Posted August 22, 2018 Ok, Try, in init field for your artillery: this spawn { sleep 1; _this disableAI "AUTOCOMBAT"; _cnt = 0; while {alive _this && _cnt < 500} do { _this doArtilleryFire [getMarkerPos "yourMakerNameHere", _this currentMagazineTurret [0],5]; _this addMagazineTurret [_this currentMagazineTurret [0], [0], 5]; _cnt = _cnt +5; sleep 30 } } 1 Share this post Link to post Share on other sites