somethingcool
Member-
Content Count
31 -
Joined
-
Last visited
-
Medals
Everything posted by somethingcool
-
MP, addEventHandler "hit" & broadcasting Variables
somethingcool posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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 -
MP, addEventHandler "hit" & broadcasting Variables
somethingcool replied to somethingcool's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Fixed it using a couple of methods I found on here for making MP friendly hints. I'll post the scripts up later. -
ArmA 2's Artillery Module
somethingcool replied to headspace's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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... -
ArmA 2's Artillery Module
somethingcool replied to headspace's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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? -
ArmA 2's Artillery Module
somethingcool replied to headspace's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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 -
ArmA 2's Artillery Module
somethingcool replied to headspace's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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 -
ArmA 2's Artillery Module
somethingcool replied to headspace's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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! -
Script problem on dedicated server
somethingcool posted a topic in ARMA - MISSION EDITING & SCRIPTING
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, -
Script problem on dedicated server
somethingcool replied to somethingcool's topic in ARMA - MISSION EDITING & SCRIPTING
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! -
Nice one! Now we have to hope BIS implement a fix in a patch
-
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]
-
In ArmA the objects mystically dissapear 0.0
-
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!
-
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!
-
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?
-
I'll Have a go Perhaps then, at least I know where to look now, i seemed to look through most of that thing of yours and occasionaly for no apparent reason my ArmA would CTD. At least your mission names them for you!! //Edit My Machine dosnt like doing this The Quality of my pics is naff because my machine is Ive been pointed to this http://www.ofpec.com/COMREF/armavehicles.php Which seems to have almost everything
-
Anyone got the original of this, ive been in touch with Ill who hasnt anymore, and none of the archive places ive looked at seems to have it. I know Kronzky made a mission for this, but it crashes when you open the dodgy buildings which arnt meant to be in the game etc.. And seeing as my arma takes ages to load i hoped someone else might have a copy of it somewhere
-
Setpos not working on client
somethingcool replied to Impavido's topic in ARMA - MISSION EDITING & SCRIPTING
@UNN you say to position the GameLogic itself would i use the standard GL1 setPos [getpos GL1 select 0, getpos GL1 select 1, (getpos GL1 select 2) +20] Because to me that still seems to spawn it on the ground floor?! I fancy placing an ammo box, a field hospital and an assortment of sandbags around one of the hotels on Sahrani (well "Hotel" placed from SickBoys editor addon) But obviously making it MP compatible is being a complete Swine! Any help would be most appreciated -
In there http://www.flashpoint1985.com/cgi-bin....SC;c=21 The "ArmA Modding" area
-
Objects at different height in MP
somethingcool replied to jamesg's topic in ARMA - MISSION EDITING & SCRIPTING
Would you be able to give me an example of that Kyle? I tried setPos'ing by a script which is passed via a public variable, and uses a gamelogic as something to setpos by, and it still wouldnt setpos! POPKA that works fine in SP but its a no-goer in dedicated MP -
Objects at different height in MP
somethingcool replied to jamesg's topic in ARMA - MISSION EDITING & SCRIPTING
Well can they give me some sandbags, and other defences that dont turn the AI into a bunch of tards. I have to setpos them 0.25 into the ground then they work much better, the AI can see through and enage properly. Also perhaps i want sandbags on roof tops, or to build up defences!? It seems odd to me that it dosnt work -
Objects at different height in MP
somethingcool replied to jamesg's topic in ARMA - MISSION EDITING & SCRIPTING
Not quite knowing where else to look, has this problem been worked around yet, or are we waiting for a word on it from bis? -
Special respawn rules depending on who
somethingcool replied to simonwa1's topic in ARMA - MISSION EDITING & SCRIPTING
Depends how you want to do it really I (in my limited knowledge) would name both your "special" units as spec1 and spec2 then add an eventhandler to both the units this addEventHandler ["killed",{_this exec "playerKilled.sqs"}] then in playerKilled.sqs have something like <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #check1 ;if unit is alive it goes to exit (because the units not dead) ? alive spec1 : exit #check2 ; again if unit is alive it goes to exit (because the units not dead) ? alive spec2 : exit ;if the script reaches here both dudes are dead dudesaredead = true exit Now somewhere on the map have a 0x0 trigger setup with the condition as dudesaredead=true and the action set as End#1 now ive not got arma on the pc im using at the moment so i cant guarantee that is without errors Im pretty sure thats how you would check though :S /// Or a simpler way thats just come to me /// Have an end#1 trigger group the two special guys together, name them both spec1 and spec2 not(alive spec1) and not(alive spec2) in the condition and synchronize them to the trigger it should work -
Okay i've been having this problem all morning
somethingcool replied to mrbean1112's topic in ARMA - MISSION EDITING & SCRIPTING
So youve got the units spawning? Using createunit i guess http://community.bistudio.com/wiki/createUnit "soldierWB" createUnit [getMarkerPos "marker_1", groupAlpha,"loon1 = this ; this addweapon {binocular}", 0.6, "corporal"] why not modify the above so that where the example uses "loon1 = this; this addweapon {binocular}" treat that area as your "init" so you can add the eventhandler/script to the unit there so say "zombieclassname" createUnit [getMarkerPos "marker_zombie", groupAlpha,"this addEventHandler ["killed",{_this exec "zombieKilled.sqs"}]", 0.8, "corporal"] not tested in editor but should work [pos (Position), group (Group),init (String), skill (Number), rank (String)] -
OPFOR searchlights
somethingcool replied to Winters1807's topic in ARMA - MISSION EDITING & SCRIPTING
Put this in the units init line perhaps? lampgunner1 moveingunner searchli1 where lampgunner1 = the name of your unit who you want to man the gun and searchli1 = the name of the search light, when you preview the mission the AI will start manning the searchlight