Jump to content

somethingcool

Member
  • Content Count

    31
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About somethingcool

  • Rank
    Private First Class
  1. Fixed it using a couple of methods I found on here for making MP friendly hints. I'll post the scripts up later.
  2. Hey, I've been trying for a while now to make my firing range count the number of targets knocked down in a single lane. I had a series of eventhandlers like so in init.sqf t11s addEventHandler ["hit", {LaneOne = LaneOne + 1}]; t12s addEventHandler ["hit", {LaneTwo = LaneTwo + 1}]; t13s addEventHandler ["hit", {LaneThree = LaneThree + 1}]; t14s addEventHandler ["hit", {LaneFour = LaneFour + 1}]; t15s addEventHandler ["hit", {LaneFive = LaneFive + 1}]; t16s addEventHandler ["hit", {LaneSix = LaneSix + 1}]; t17s addEventHandler ["hit", {LaneSeven = LaneSeven + 1}]; t18s addEventHandler ["hit", {LaneEight = LaneEight + 1}]; t11k addEventHandler ["hit", {LaneOne = LaneOne + 1}]; t12k addEventHandler ["hit", {LaneTwo = LaneTwo + 1}]; And then use the code (getScore.sqs) hint format["Lane 1: %1\nLane 2: %2\nLane 3: %3\nLane 4: %4\nLane 5: %5\nLane 6: %6\nLane 7: %7\nLane 8: %8\n", LaneOne, LaneTwo, LaneThree, LaneFour, LaneFive, LaneSix, LaneSeven, LaneEight]; To retrieve the scores from each of the Lanes. The LaneOne etc.. variables are set up in gameLogics like this GL named LaneOne Init Line: LaneOne = 0; I'm using the simple targets which fall down and stay down. In single player this works like a dream, in multiplayer it just dosnt... every lane returns 0. I assume this is due to hit being an eventhandler that is local. So I need to find a way to broadcast the values stored in LaneOne, LaneTwo etc from the server to the clients, as if my understanding is correct the server should have the hit eventhandlers stored because the objects will be local to it? I looked at publicVariable, setVariable, getVariable, addPublicEventHandler etc.. but I cant fathom out from the wiki how to make them work, its essential it works with a DEDICATED server. I've also looked over the other threads on this topic and most people seem to be having a problem scoring them correctly. For reference this is the script ( a little condensed ) that I'm using to actually run the range if anyones interested. //establish arrays of targets //S = left K = mid D = right 100etc is m out. T100S = [t11s, t12s, t13s, t14s, t15s, t16s, t17s, t18s]; T100K = [t11k, t12k, t13k, t14k, t15k, t16k, t17k, t18k]; T200S = [t21s, t22s, t23s, t24s, t25s, t26s, t27s, t28s]; T200K = [t21k, t22k, t23k, t24k, t25k, t26k, t27k, t28k]; sleep 5; RangeControl sideChat "Adopt the prone position"; [this] exec "rangeDown.sqs"; // extra script to set all targets to damage1 sleep 2; RangeControl sideChat "Four, Five Second Exposures at 100M from the prone position. Fire One Round at Each Target. Targets will fall when hit. Watch and shoot, watch and shoot"; sleep 2; for [{_i=0}, {_i<4}, {_i=_i+1}] do { sleep 1; {_x setDamage 0} forEach T100S; sleep 5; {_x setDamage 1} forEach T100S; sleep 2; }; Rangecontrol sideChat "STOP, Stand Up"; sleep 4; RangeControl sideChat "Adopt the kneeling position"; sleep 5; RangeControl sideChat "Two, Seven Second Exposures at 200m from the kneeling position. Fire one round at each target, targets will fall when hit. Watch and shoot, watch and shoot."; sleep 3; for [{_i=0}, {_i<2}, {_i=_i+1}] do { sleep 1; {_x setDamage 0} forEach T200K; sleep 7; {_x setDamage 1} forEach T200K; sleep 2; }; [this] exec "getScore.sqs"; This all works in single player without an issue, and if I host I'm sure it would work then too, but on a dedicated server it just refuses to play ball. Mission Download: www.dspcs.co.uk/range.utes.rar
  3. somethingcool

    ArmA 2's Artillery Module

    When you add a support request [["artillery_barrage"], player, [[RIPPER, [1,3,4,7,8,9]]]] call BIS_SOM_addSupportRequestFunc; The numbers in square brackets are the type of missions fired, the missions define the type of muniton used. The wiki details what these mean. The 105 can fire 1,2,3,4,5,6,7,8,9. If you are actually making your own fire mission then you can chose timed/immediate muniton no.rounds/how long etc...
  4. somethingcool

    ArmA 2's Artillery Module

    AzureNight Place your mortars down, sync the leader to the arty module and call it bigGuns. Then in your init.sqf nul = [] execVM"myArty.sqf"; In myArty.sqf sleep 120; [bigGuns, getPOSASL bObject, ["TIMED", "HE", 0, 15]] call BIS_ARTY_F_ExecuteTemplateMission; sleep 300; [bigGuns, getPOSASL aObject, ["TIMED", "HE", 0, 15]] call BIS_ARTY_F_ExecuteTemplateMission; Where aObject and bObject is some kind of object you've placed on the map at the position you want the fire to come down on. I've not tested the code but it should work. ---------- Post added at 01:40 PM ---------- Previous post was at 01:32 PM ---------- Just tested and mine dosnt work on a dedicated server either. I'd assume it has something to do with the reference to 'player' in the following code. [["artillery_barrage"], player, [[RIPPER, [1,3,4,7,8,9]]]] call BIS_SOM_addSupportRequestFunc; Any ideas how to get around that?
  5. somethingcool

    ArmA 2's Artillery Module

    For those who need it some links: Detected unit Artillery Artillery called down by the AI when a blufor is spotted by the opfor in the trigger area. http://rapidshare.com/files/248240682/ArtyNoSOMDetect.Chernarus.rar Note this does not feature advanced error handling to deal with the battery being destroyed etc.. Portable Mortars This script uses those previously released to carry your mortar around with you in a jeep then hop out and rain death down using the targetting system. http://rapidshare.com/files/248241383/MortarTruck.utes.rar
  6. somethingcool

    ArmA 2's Artillery Module

    No worries mate, I just spent hours playing with it and found the space bar thing. A question for a genius, when you manually target the mortars it gives you a time of flight (i.e 40seconds) for the ranges, how would I use get that information on the fly so that AI could call "Shot over, four-zero seconds" or something along those lines. Also what do the lines mean I guess its simulating Probable Error For Range/Dispersion (Pr, Pd)? It just isnt entirely clear Cheers
  7. somethingcool

    ArmA 2's Artillery Module

    You press and hold space then when the menu pops up click on communication (just click), then hit 1 for request support then 1 again for artillery barrage. Simples!
  8. somethingcool

    Script problem on dedicated server

    Cheers for that mate, as far as I can tell it now works. Heres the final debugged code for anyone that wants it <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> sleep 1; private ["_user", "_type", "_mags", "_weaps"]; _user = _this select 0; // if (!(local _user)) exitWith {}; _type = _this select 1; switch _type do { case 0: { // AT _mags = [ ["30rnd_556x45_stanag", 5], ["ukf_law80", 1], ["ukf_sigP226_mag", 3] ]; _weaps = [ "UKF_L85A2_susat", "ukf_law80launcher", "ukf_sigP226" ]; }; case 1: { // JAV _mags = [ ["30rnd_556x45_stanag", 4], ["ukf_javelinmag", 1], ["ukf_sigP226_mag", 3] ]; _weaps = [ "UKF_L85A2_susat", "ukf_javelinlauncher", "ukf_sigP226" ]; }; case 2: { // GPMG _mags = [ ["100rnd_762x51_m240", 4] ]; _weaps = [ "ukf_gpmg" ]; }; case 3: { // LMG _mags = [ ["200rnd_556x45_m249", 4] ]; _weaps = [ "ukf_lmg_susat" ]; }; case 4: { // LPR _mags = [ ["ukf_10Rnd_762x51_mag", 5], ["ukf_sigP226_SDmag", 3] ]; _weaps = [ "ukf_l96a1", "ukf_sigP226_sd" ]; }; case 5: { // INF _mags = [ ["30rnd_556x45_stanag", 5], ["1rnd_he_m203", 4], ["ukf_sigP226_mag", 2] ]; _weaps = [ "ukf_l85a2ag36", "ukf_sigP226" ]; }; case 6: { // CREW _mags = [ ["20rnd_556x45_stanag", 4] ]; _weaps = [ "ukf_l85a2k_susat" ]; }; }; removeAllWeapons _user; _weaps = _weaps + ["NVGoggles","Binocular"]; _mags = _mags + [ ["SmokeShellGreen", 1 ] ]; { for "_y" from 1 to (_x select 1) do { _user addMagazine (_x select 0) } } forEach _mags; { _user addWeapon _x} forEach _weaps; _user selectWeapon (_weaps select 0); You will note I commented out the "// if (!(local _user)) exitWith {};" because with it on it worked for players, but then not for AI under the players command, with it un commented it works for everyone. So cheers!
  9. Hi, I have written this script, arm.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _user = _this select 0; _type = _this select 1; ;hint format["%1", _type]; ({_user removeMagazine _x} forEach magazines _user); Removeallweapons _user; _user addweapon "NVGoggles"; _user addWeapon "Binocular"; _user addMagazine "SmokeShellGreen"; if (_type == 0) then {goto "AT"}; if (_type == 1) then {goto "JAV"}; if (_type == 2) then {goto "GPMG"}; if (_type == 3) then {goto "LMG"}; if (_type == 4) then {goto "LRR"}; if (_type == 5) then {goto "INF"}; if (_type == 6) then {goto "CREW"}; #INF _user addMagazine "30rnd_556x45_stanag"; _user addMagazine "30rnd_556x45_stanag"; _user addMagazine "30rnd_556x45_stanag"; _user addMagazine "30rnd_556x45_stanag"; _user addMagazine "30rnd_556x45_stanag"; _user addMagazine "1rnd_he_m203"; _user addMagazine "1rnd_he_m203"; _user addMagazine "1rnd_he_m203"; _user addMagazine "1rnd_he_m203"; _user addWeapon "ukf_l85a2ag36"; _user selectWeapon "ukf_l85a2ag36"; _user addMagazine "ukf_sigP226_mag"; _user addMagazine "ukf_sigP226_mag"; _user addWeapon "ukf_sigP226"; exit #AT _user addMagazine "30rnd_556x45_stanag"; _user addMagazine "30rnd_556x45_stanag"; _user addMagazine "30rnd_556x45_stanag"; _user addMagazine "30rnd_556x45_stanag"; _user addMagazine "30rnd_556x45_stanag"; _user addWeapon "UKF_L85A2_susat"; _user selectWeapon "UKF_L85A2_susat"; _user addMagazine "ukf_law80"; _user addWeapon "ukf_law80launcher"; _user addMagazine "ukf_sigP226_mag"; _user addMagazine "ukf_sigP226_mag"; _user addMagazine "ukf_sigP226_mag"; _user addWeapon "ukf_sigP226"; exit #JAV _user addMagazine "30rnd_556x45_stanag"; _user addMagazine "30rnd_556x45_stanag"; _user addMagazine "30rnd_556x45_stanag"; _user addMagazine "30rnd_556x45_stanag"; _user addWeapon "UKF_L85A2_susat"; _user selectWeapon "UKF_L85A2_susat"; _user addMagazine "ukf_javelinmag"; _user addWeapon "ukf_javelinlauncher"; _user addMagazine "ukf_sigP226_mag"; _user addMagazine "ukf_sigP226_mag"; _user addMagazine "ukf_sigP226_mag"; _user addWeapon "ukf_sigP226"; exit #LRR _user addMagazine "ukf_10Rnd_762x51_mag"; _user addMagazine "ukf_10Rnd_762x51_mag"; _user addMagazine "ukf_10Rnd_762x51_mag"; _user addMagazine "ukf_10Rnd_762x51_mag"; _user addMagazine "ukf_10Rnd_762x51_mag"; _user addWeapon "ukf_l96a1"; _user selectWeapon "ukf_l96a1"; _user addMagazine "ukf_sigP226_SDmag"; _user addMagazine "ukf_sigP226_SDmag"; _user addMagazine "ukf_sigP226_SDmag"; _user addWeapon "ukf_sigP226_sd"; exit #CREW _user addMagazine "20rnd_556x45_stanag"; _user addMagazine "20rnd_556x45_stanag"; _user addMagazine "20rnd_556x45_stanag"; _user addMagazine "20rnd_556x45_stanag"; _user addWeapon "ukf_l85a2k_susat"; _user selectWeapon "ukf_l85a2k_susat"; exit #LMG _user addMagazine "200rnd_556x45_m249"; _user addMagazine "200rnd_556x45_m249"; _user addMagazine "200rnd_556x45_m249"; _user addMagazine "200rnd_556x45_m249"; _user addWeapon "ukf_lmg_susat"; _user selectWeapon "ukf_lmg_susat"; exit #GPMG _user addMagazine "100rnd_762x51_m240"; _user addMagazine "100rnd_762x51_m240"; _user addMagazine "100rnd_762x51_m240"; _user addMagazine "100rnd_762x51_m240"; _user addWeapon "ukf_gpmg"; _user selectWeapon "ukf_gpmg"; exit exit When I activate it using [this, 3] exec "arm.sqs"; in either the soldiers init line or [s1, 3] exec "arm.sqs" in the init.sqs/f file the script only works if there is only one human in the group, or the group is entirely AI based. For example if I have 8 AI down all with different numbers for weapons they spawn on the dedicated server with the correct weapons, however if I put a player as the lead of that squad none of the script runs on the leader, or the AI in the group, everyone just has M4's. I have tried with and without the exit if server line, thinking it may have had something to do with locality, but I cannot for the life of me make this work. So in short, the script works if there is a single human on his own in a group, or on a group entirely made up for AI. If a human is in the group, the script does not get executed. Does anyone know why this is happening? It all works fine on my own machine, its just once it is uploaded to the dedicated box. Cheers,
  10. somethingcool

    Sandbag walls

    Nice one! Now we have to hope BIS implement a fix in a patch
  11. somethingcool

    Unit Skydive

    I probably do it a backwards way Insert a man call him dude1, in his init put "this moveindriver para1;" Insert an empty "parachute" object call it para1 Preview the game and he should spawn in the parachute. if you want him to spawn higher up do something like this to the parachutes init this setpos[(getpos this select 0), (getpos this select 1), (getpos this select 2)+100]
  12. somethingcool

    Sandbag walls

    In ArmA the objects mystically dissapear 0.0
  13. somethingcool

    Sandbag walls

    I have expereinced the same things as you mate, and ended up just giving up, seems to be an engine limitation or something stupid! If you let them move they move outside of the safe area behind the sandbags but suddenly are able to fire effectively, seems ArmA's AI like to take a different approach responding to effective enemy fire ey;) If you find a way around let me know!
  14. somethingcool

    BAN SERVER

    Dude, dont be such a biff, SES have been SES for as long as I've played games online, I met the guys through Swat4 and still count them as a good bunch of guys, and as noted above, they contain some of the best mission makers OFP had, and Arma has. So mate, if you dont want to see the server just add the ip to your hosts file and point it to localhost or something! Or just dont look!
  15. somethingcool

    building class list

    Cheers Dr_Eyeball, and Matt that sounds ace mate, any chance you can get some of the extra things editor 102 enabled in without needing the custom classes?
×