stowed4sea 2 Posted August 31, 2015 I've done a lot to educate myself, reading other guides, but have still have a basic question that I cannot really find the answer to in any guide I've read (sorry if I missed it, I tried searching). With the basic scripting commands located here, should they work in game without having to create a separate .sqf file? My question is brought on because while putting some of these commands in a activation box of a trigger, some of them work (like getMarkerPos or hint), but I cannot get others like doArtilleryFire to work at all. Some commands are obvious that they need something extra, such as the playMusic command when wanting to play custom music, however, I don't really understand which ones should work "out of the box". Am I making sense or do I not really understand this thing at all. Thanks for pointing me straight guys. Share this post Link to post Share on other sites
Greenfist 1863 Posted August 31, 2015 All of the commands will work from the editor too. You probably just didn't use them correctly. You should check the rpt log for errors, or enable the -showscripterrors startup parameter to see if there was an error in the syntax or variables used. Could you post some command you didn't get working? 1 Share this post Link to post Share on other sites
stowed4sea 2 Posted September 1, 2015 The one I tried for hours to get working was doArtilleryFire, but I don't have the exact specifics at the moment. I'll try to pull it up later with a fresh start and if I cannot get it working I'll make a post with exactly what I'm using. What is the rpt log and how do you check it? How do you enable showscripterrors startup parameter? Share this post Link to post Share on other sites
jshock 513 Posted September 1, 2015 Startup Parameters RPT + others 1 Share this post Link to post Share on other sites
stowed4sea 2 Posted September 1, 2015 Startup Parameters RPT + others I should have known to try the wiki. Thanks for pointing me the right direction. I'll get those working and hopefully solve my problem. Share this post Link to post Share on other sites
stowed4sea 2 Posted September 2, 2015 I tried again this morning and still couldn't get it to work. I set up 2S9 Sochor unit and named it art1. Then I set up a trigger and put the following command under activation: art1 doArtilleryFire[getMarkerPos "target1", "32Rnd_155mm_Mo_shells", 10] I also had a marker set up named target1. I also restarted as the Sochor player myself to ensure it had that ammo type. I checked the RTP log, and the only thing it had was a few ALIVE errors but then a "Error in expression </*---------------> message, but this was also here even before I tried this trigger. I've also tried it all on a fresh new default map, unmodded and still couldn't get it to work. I have enabled showscripterrors and nothing popped up. I also made sure the trigger was going off, and typed in the activation block a hint that did display, but the artillery never fired when activated. I'm sure it is just something dumb and obvious that I'm missing, but I don't know what it is. Thanks again for the help guys. EDIT: I forgot to mention that I also tried using various xyz cordinates as listed over on the wiki page. Share this post Link to post Share on other sites
R3vo 2654 Posted September 2, 2015 art doArtilleryFire [markerPos "marker1",(getArtilleryAmmo [art]) call BIS_fnc_selectRandom; , 5]; Works fine for me, make sure the target is in reach of the artillery, not too close, nor to far. Share this post Link to post Share on other sites
SilentSpike 84 Posted September 2, 2015 Ah, that specific command has behaved inconsistently for me in the past Sometimes they reposition their barrel and don't fire, sometimes they do fire, other times they do nothing. 1 Share this post Link to post Share on other sites
R3vo 2654 Posted September 2, 2015 Ah, that specific command has behaved inconsistently for me in the past Sometimes they reposition their barrel and don't fire, sometimes they do fire, other times they do nothing. Happened to me just a few minutes ago, but I'm pretty sure it was because the target was not in range. It works flawlessly now. I wrote a short function, which displays some info. /* Author: Revo Description: Let an artillery fire on the given position Parameter(s): 0: object - artillery vehicle 1: array - position of target, default [0,0,0] 2: string - ammunition type, if empty then random one is selected, default "" 3: number - number of rounds, default 5 4: boolean - debug on/off, default false 5: boolean - unlimited ammunition, default true Returns: - */ _artillery = param [0,objNull]; _pos = param [1,[0,0,0]]; _ammoClass = param [2,""]; _numRounds = param [3,1]; _debug = param [4,false]; _unlimitedAmmo = param [5,true]; //select a valid ammunition type if none was given if (isNil _ammoClass) then { _ammoClass = (getArtilleryAmmo [_artillery]) call BIS_fnc_selectRandom; }; //check if target is in range, if not, displays an error message _inRange = _pos inRangeOfArtillery [[_artillery], _ammoClass]; if (_inRange) then { _artillery doArtilleryFire [_pos,_ammoClass ,_numRounds]; } else { ["Target is not in range"] call BIS_fnc_error; }; //display important information if (_debug) then { _eta = _artillery getArtilleryETA [_pos,_ammoClass]; _distance = _artillery distance2D _pos; hint format ["ETA: %1 seconds\nDistance %2 meters\n In Range: %3\nAmmunition Type: %4\nUnlimited Ammo: %5",_eta,_distance,_inRange,_ammoClass,_unlimitedAmmo]; }; //fills ammunition of given artillery once fired (would actually need to wait until fire mission is completed in order to completely rearm it) if (_unlimitedAmmo) then { _artillery setVehicleAmmo 1; }; Share this post Link to post Share on other sites
stowed4sea 2 Posted September 2, 2015 art doArtilleryFire [markerPos "marker1",(getArtilleryAmmo [art]) call BIS_fnc_selectRandom; , 5]; Works fine for me, make sure the target is in reach of the artillery, not too close, nor to far. You know, range was something that I failed to check. What is the max range for artillery? I had him set up at Camp Maxwell shooting to Kamino Firing Range on Stratis. I wouldn't think that should be too far, but I'll try shorter ranges when I get home. EDIT - google returned a steam guide with a range listed of 1.5 kilometers. Is that accurate? If it is close, I think I may have just had the range too far then. Hopefully, this was just my problem of me being ignorant and nothing else, otherwise I'm not sure what could be wrong. Share this post Link to post Share on other sites
Greenfist 1863 Posted September 2, 2015 The regular Sochor shell's range is about 800m-66km. You can check it in the artillery computer. Share this post Link to post Share on other sites