Horrace
Member-
Content Count
38 -
Joined
-
Last visited
-
Medals
Everything posted by Horrace
-
Hi, Just wondering if there is a way to take screenshots in the game? Game is awesome by the way. Can't believe the devs were working that late to release patch 1.02 even after having worked their ass off on the game itself... huge respect.
-
Editing / Scripting test environment
Horrace posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hi, I wanted to try and setup the following test environment that is running on the same PC :- 2 x Clients ( In windowed mode ) 1 x Dedicated server This would be perfect for testing and fixing multiplayer missions ( especially JIP problems... ) Is this possible and if so how do you do it? Thanks. -
Editing / Scripting test environment
Horrace replied to Horrace's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Could you explain how to do this? Many thanks. ---------- Post added at 03:19 PM ---------- Previous post was at 03:10 PM ---------- Sorry I just read your post about reportIp = "<>"; will that remove the duplicate client check then? I can't test at the moment. -
Editing / Scripting test environment
Horrace replied to Horrace's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Sorry. I forgot to say that I have got the server working and 1 client. But I can't join the server with a second client... I get a message about FADE. My game is a legal copy by the way. -
Anyone else been looking around with ALT and then tried to select squad member 4? lol. Not good :( Probably done that about 5 times now...
-
Doh! I have got a decent mouse with side buttons. You're right I could just assign look to one of those... :)
-
Bordering Area with signs ?
Horrace replied to wiggum2's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Here ya go. The original area.sqf had "Danger" had to change to "Sign_Danger" (for Arma 2) //3rd - y axis //4th - how many tables (markers) have to be placed //5th - angle of elipse _xPos = position (_this select 0) select 0; _yPos = position (_this select 0) select 1; _howBigA = _this select 1; _howBigB = _this select 2; _tablesC = _this select 3; _angle = _this select 4; _i = 0; while {_i < 360} do { _x = (_howBigA * (sin _i)); _y = (_howBigB * (cos _i)); _x_rot = _xPos + _x*(cos _angle) - _y*(sin _angle); _y_rot = _yPos + _x*(sin _angle) + _y*(cos _angle); _k = createVehicle ["Sign_Danger",[_x_rot, _y_rot,0], [], 0, "NONE"]; _m = createMarker [format ["Marker" + str _i],[ _x_rot, _y_rot,0]]; format ["Marker" + str _i] setMarkerType "Dot"; _k setDir _i; format ["Marker" + str _i] setMarkerDir (_i - _angle); _i = _i + (360/_tablesC); }; Oh and if you are after some sort of mine field once someone crosses the border, you'll need to setup some triggers. -
Someone explain why this script does what it does Hosted vs. Dedicated served
Horrace replied to Rexxenexx's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
You need to use clearWeaponCargo and clearMagazineCargo -
Hi, I have some code that executes only on the server that randomly moves ammo crates around the map every 3 - 5 minutes. But for some reason once they've moved you can no longer access their contents. Any ideas? Regards, EDIT : Looks like I can't access the crates anyway. Even if I just drop a crate in from the editor. This only happens from a Dedi server by the way.
-
Ammo crate gear problem
Horrace replied to Horrace's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
So the difference between createVehicle and createVehicleLocal is that createVehicle will propagate said object accross all MP machines? Will that be regardless of the machine it was called from? I also found this info on the Biki for createVehicleLocal "If the object that is created is of the type ammo, then it will created on all clients (tested only on VBS2)." Does that mean it will be created on all clients if run from the server or does it not matter which machine? MP Scripting = :confused: ;) -
Ammo crate gear problem
Horrace replied to Horrace's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
The problem is that I can't access the contents of a crate that i've placed in the editor when the mission is running on a dedicated server. I get no icon to say rearm at crate or anything. It looks like the AI can get things from the crate however because they will run over to it and crouch then get up and reload. -
Ammo crate gear problem
Horrace replied to Horrace's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I've tried USBasicWeaponsBox, USBasicAmmunitionBox and GuerillaCacheBox -
Ammo crate gear problem
Horrace replied to Horrace's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I was using a script. Then I tried just adding weapons through the init line of the crate. Then I just left the crate with it's standard loadout. No luck with all of the above on a dedi. No option to access gear on the crate. -
Hi, Normally people use select with literal 0,1,2 etc. Is it possible to use a variable eg. _index = 0; _unit = _this select _index I've tried but doesn't appear to work. It's late maybe i'm just missing something. (Probably sleep) Thanks,
-
My fault. I was trying to do this : _myArray = [0,0,0]; _value = 2; (_myArray select _value) = 5; Thinking that this would set the second element to 5. What I should have done is _myArray set[_value,5]; Doh!
-
Ammo crate gear problem
Horrace replied to Horrace's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yeah i've tried different angles. Can anyone confirm they have added crates and managed to access them whilst running the mission on a dedi server? Many thanks, -
Ammo crate gear problem
Horrace replied to Horrace's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Even without any code I can't access the crate but only when the mission is running on a dedicated server. If I start a new mission from scratch in the editor and place a player soldier and a US Basic Weapon crate, no init line or anything. When I preview it I can access the weapons that come default with that crate. If I then run the mission on a dedicated server I get no option to access the crate... The funny thing is, if I add an AI unit he will run over to the crate and crouch as if he is accessing the crate!? Are the crate contents only registered server side? -
Yep. That was just an example.
-
Questions about eventhanders and MP scripting
Horrace replied to Horrace's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Excellent. Thank you! -
Questions about eventhanders and MP scripting
Horrace posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hi, I have a WIP DM mission that I'm having a few problems with. My init.sqf looks like this _units = [s1,s2,s3,s4,s5,s6]; // 1st // add "killed" event handlers to each unit { _x addEventHandler ["killed", {nul=_this execVM "scripts\respawn.sqf"}]; } forEach _units; // 2nd // give random weapons to each unit { nul=[_x] execVM "scripts\randomweapons.sqf"; } forEach _units; I have read through some things in the BIKI about MP scripting and also 6thSense page on the BIKI but still need a few things clearing up. My questions are : 1. Is it correct that that init.sqf runs on the server and then on each client and then for each JIP player? 2. If so will the first piece of code add an extra event hander to every player/AI everytime someone JIPs? ( not good if true ) 3. Is it possible / are you supposed to add event handlers from the server? 4. If I add an event handler to a unit that is initially controlled by AI and then a player JIPs and takes over that AI unit, will the player take on that eventhandler or will it be lost? 5. When a player JIPs and takes over an AI unit. Is there an initial moment where (isPlayer unit) will return false? 6. Can you check for (isPlayer unit) on the server? 7. When you addWeapon to a player are you supposed to do that from the client or from the server? 8. When you add a trigger in the editor. Does this trigger fire on the server aswell as each client? If so is it ok to use isServer in the condition field? Many thanks! -
Someone explain why this script does what it does Hosted vs. Dedicated served
Horrace replied to Rexxenexx's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
You can use isServer instead of placing a game logic called server. Also exitWith is only supposed to be used for exiting loops inside scripts not scripts themselves. It's quoted here that the behavior is undefined if you use it that way. Instead try doing this if(isServer) then { // PLACE CODE YOU WANT SERVER TO RUN }; Regards, -
Hi, I am currently making a DM mission but have a problem. I need to detect when a unit dies and then respawns so I can add weapons to the unit once it respawns. I am executing the following script from a units init line. eg. nul = [this] execVM "scripts\respawn.sqf" Please note this is just test code. // RESPAWN.SQF _unit = _this select 0; while{ true } do { if(! alive _unit ) then { _unit = _this select 0; _unit sideChat format["%1 is dead.",_unit]; waitUntil { alive _unit }; _unit sideChat format["%1 has respawned",_unit]; }; }; Now, the code works fine until it reaches the waitUntil line where it will just sit waiting. It's almost as if the _unit variable isn't updated when the unit respawns. Any ideas anyone?? Or there an easier way to accomplish this? Regards,
-
Unit can't fire after addWeapon?
Horrace posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hi, Anyone found that units can't fire after giving them weapons? You have to press the set fire button ( burst / full / semi ) before you can shoot. Also sometimes the units are not getting any weapon at all. This is the code I am using and i'm running it from each units init line. _unit = _this select 0; if(isServer) then { removeAllWeapons _unit; switch (round random 4) do { case 0: { _unit addMagazine "30Rnd_762x39_AK47"; _unit addMagazine "30Rnd_762x39_AK47"; _unit addMagazine "30Rnd_762x39_AK47"; _unit addWeapon "AK_47_M"; }; case 1: { _unit addMagazine "30Rnd_556x45_Stanag"; _unit addMagazine "30Rnd_556x45_Stanag"; _unit addMagazine "30Rnd_556x45_Stanag"; _unit addWeapon "M4A1"; }; case 2: { _unit addMagazine "30Rnd_556x45_Stanag"; _unit addMagazine "30Rnd_556x45_Stanag"; _unit addMagazine "30Rnd_556x45_Stanag"; _unit addWeapon "M16A4"; }; case 3: { _unit addMagazine "30Rnd_545x39_AK"; _unit addMagazine "30Rnd_545x39_AK"; _unit addMagazine "30Rnd_545x39_AK"; _unit addWeapon "AK_74"; }; }; }; Regards, -
Unit can't fire after addWeapon?
Horrace replied to Horrace's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
OK. Will that still give weapons to AI aswell? I can't test at the minute. -
Unit can't fire after addWeapon?
Horrace replied to Horrace's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Units init line