Horrace
-
Content Count
38 -
Joined
-
Last visited
-
Medals
Posts posted by Horrace
-
-
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.
-
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.
-
Doh! I have got a decent mouse with side buttons. You're right I could just assign look to one of those... :)
-
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...
-
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.
-
You need to use clearWeaponCargo and clearMagazineCargo

-
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: ;)
-
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.
-
I've tried USBasicWeaponsBox, USBasicAmmunitionBox and GuerillaCacheBox
-
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.
-
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!
-
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,
-
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?
-
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.
-
Yep. That was just an example.
-
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,
-
Excellent. Thank you!
-
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 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!
-
OK. Will that still give weapons to AI aswell?
I can't test at the minute.
-
Units init line
-
Sorry I did ask this in another post but it's lost in a sea of topics now :(
In my DM mission I have only added units set as playable ( which I believe is the correct way? )
When the mission starts the player isn't given any weapons for some reason, however, any AI that are playing do seem to be given the weapons from the script.
As a test I just replaced _unit with player in the script and now the player will be given the weapons but the AI not...
This one is driving me mad.
-
Hi,
I've got a DM mission setup and I have 6 units set as playable.
This code is set to run from the init line of each unit.
_unit = _this select 0; removeAllWeapons _unit; switch (floor 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"; _unit selectWeapon "AK_47_M"; }; case 1: { _unit addMagazine "30Rnd_556x45_Stanag"; _unit addMagazine "30Rnd_556x45_Stanag"; _unit addMagazine "30Rnd_556x45_Stanag"; _unit addWeapon "M4A1"; _unit selectWeapon "M4A1"; }; case 2: { _unit addMagazine "30Rnd_556x45_Stanag"; _unit addMagazine "30Rnd_556x45_Stanag"; _unit addMagazine "30Rnd_556x45_Stanag"; _unit addWeapon "M16A4"; _unit selectWeapon "M16A4"; }; case 3: { _unit addMagazine "30Rnd_545x39_AK"; _unit addMagazine "30Rnd_545x39_AK"; _unit addMagazine "30Rnd_545x39_AK"; _unit addWeapon "AK_74"; _unit selectWeapon "AK_74"; }; };For some reason it only gives the weapons to the AI but not the player.
Can you help?
Regards,
-
Thanks Big Dawg. The round thing was kind of obivious :j:
:)
---------- Post added at 09:24 PM ---------- Previous post was at 09:23 PM ----------
Ah one more thing. Am I right to check that only the server will be giving out weapons?
Editing / Scripting test environment
in ARMA 2 & OA : MISSIONS - Editing & Scripting
Posted
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.