-
Content Count
664 -
Joined
-
Last visited
-
Medals
Everything posted by mikie boy
-
Best options to remote execute where you want?
mikie boy replied to carlostex's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
For the remote engineering call out script i created, i use PV and EV. when first created you would call the engineers out from base and they would trundle along to the desired location. however if the player that called the script disconnected - the engineers would just stop in their tracks and that was it. So i changed i to have the server control what the engineers do once created. The add action is on the damaged vehicle when it falls to a certain level. When you use the add action the engineers are created by the player on the server. To get them to move via the server i then use the following... it works well. No CBA as well. this is in the code which is called via the add action. // i create engineers and group them... then i call the below... FOCK_engmoveto = "FOCK_eng\FOCK_engmoveto.sqf"; publicVariable "FOCK_engmoveto"; // This data will only be received on other machines. Not on the machine where it is executed. execVM FOCK_engmoveto; init or called from the init "FOCK_engmoveto" addPublicVariableEventHandler { private ["_moveto"]; _moveto = _this select 1; execVM _moveto; }; FOCK_engmoveto.sqf if (is server) then { do stuff }; not sure how efficient this is - but it seems to work and the server is not lagging from it. It also seems to JIP as well. Hope it helps. -
nearObjects for pipebomb near AI always returns null object? +++
mikie boy replied to ashram 1-1's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Not sure if this is going to help. Probably add it to the event handler given by 2nd Ranger Try the attachto command - tried the below and it works. I tested your code - using OA. Returns PipeBomb when specifying class - and Satchel.p3d when listing nearest objects. private ["_class"]; _list = nearestObjects [dave, ["Car", "Truck", "Tank"], 20]; _num = _list select 0; _name = str(_num); _class = typeOf _num; //dave Fire ["pipebombmuzzle", "pipebombmuzzle", "pipebomb"]; sleep 3; _list1 = ((getpos dave) nearObjects ["PipeBomb",50]) select 0; _class1 = typeOf _list1; hint format["%1",_class1]; _list1 attachTo [_num,[0,0,0]]; -
Alas it is very difficult to get them to delete - if you look at norins revive - it leaves markers of players that disconnected, and so too does a few other scripts. Once the player disconnects, the marker appears not to exist. Even if you had a script to delete marker "hogmason" after you have left - doesn't seem to delete that marker. Same for changing - while {alive _unit} do - to - while {!isnull_unit} do - doesn't deletemarker. Ive used the players UID as a means to creating the marker - and tried deleting that - again no joy. In the end ive just left it and when you leave and disconnect it goes. best i can offer sorry. So if you find a solution please update! :) hope this helps and saves you some time.
-
Ingame GUI Menu with integrated with commands
mikie boy replied to ra1n0fpa1n's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
just created this quickly for you. try it and see how you get on http://dl.dropbox.com/u/17725328/GUImenutrig.Desert_E.rar -
Multiplayer framework rHINT and parameters
mikie boy replied to carlostex's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
without knowing what you are trying to achieve with the addaction - try this... [player,_chair,rADDACTION,"Download Serial Numbers", "serials.sqf",[_chair, player, 1],1,true,true,"","(_target distance _this) < 4"] call RE; -
Ambient Civilian module help for newbie
mikie boy replied to Kalanaama's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
to get you started - use this - in the init of the civil module this setVariable ["civilianCount","15"]; // formula on which basis system calculates number of civilians for locations. use this to review the pages pelham has given you. becomes apparent after a bit of fiddling -
Not sure if you are using this, but can try this in each player init - just tested - seems to work ok. this setcaptive true; then when ready to release - setcaptive false; http://community.bistudio.com/wiki/setCaptive apologise if you have already used this to set their captive status.
-
Custom Radio Sound not working
mikie boy replied to fabl10's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
try the following... description file #include "config.cpp" config.cpp - (to make this just save the file as all files and add .cpp at end class CfgSounds { class example { name="blackhawkdown1"; sound[]={"Sound\blackhawkdown1.ogg",db-20,1.0}; titles[]={}; } }; place your sound in the sound folder. In game create a trigger with activation Anyone- and detection by blufor. cond - this on act - playsound "blackhawkdown1"; just tested it - works fine hope this helps -
Deleting markers originally defined by player uid
mikie boy posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
long story short - i created markers for players that join the server which will follow them around the map - i used uid to assign the marker which is created and setmarker text - to the players name On joining the marker is there and shows in MP. Problem... On disconnection i use the same uid to deletemarker - nothing not a thing. even tried mpframe work - couldnt get it to work. so does anybody know the way to delete such markers code as follows activated via [] execVM "marker.sqf"; - tried onplayerconnected [_id,_name] etc - _name comes back as "ANY" - think its the name given to the server. Anyway... marker.sqf _caller = name player; _uid = getPlayerUID player; [nil,nil,rHINT, format["%1 connected",_uid]] call RE; if (isserver) then { //also tried createmarkerlocal :( _marker = createMarker [_uid, position player]; _uid setMarkerText _uid; //can change this to _caller - shows players name _uid setMarkerType "NATO_base"; _uid setMarkerColor "ColorRed"; while {!isnull player} do { _uid setmarkerpos getpos player; sleep 5; }; } else { _marker = createMarker [_uid, position player]; _uid setMarkerText _uid; //can change this to _caller - shows players name _uid setMarkerType "NATO_base"; _uid setMarkerColor "ColorRed"; while {!isnull player} do { _uid setmarkerpos getpos player; sleep 5; }; }; following code is called when player disconnects - defined in the init as .. onPlayerDisconnected "[_id, _name, _uid] execVM 'removenamedmarkers.sqf';"; - this hints the exact uid (as shown in the their defined marker within game) when someone leaves. removenamedmarkers.sqf deletemarkers1 = { deletemarker format ["%1",_named]; deletemarker format ["%1",_idname]; deletemarker _uid; deletemarkerlocal _named; deletemarker _named; deletemarkerlocal _idname; deletemarkerlocal format ["%1",_named]; deletemarkerlocal format ["%1",_idname]; }; _uid = _this select 2; _caller = _this select 1; _named = str(_uid); _idname = _uid; [nil,nil,rHINT, format["%1 disconnecting",_idname]] call RE; [nil,nil,"per",rSPAWN,[], {[] call deletemarkers1}]; lobbed as much delete marker stuff in there to see if any work - nope! So no idea how to get this working - any help would be much appreciated - spent way too long on this -
Deleting markers originally defined by player uid
mikie boy replied to mikie boy's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
cheers Pelham - sorry bud but that doesn't work either. Cheers cuel, ill have a look at doing it locally - ive tried various things - created arrays - and tried deleting it that way. The point ive got to is - on the player disconnecting - it calls the script to remove the marker based on the disconnecting player's UID. I get a hint to display the UID of that player - and confirmed that is the correct uid. It is at this point that the marker will not delete - even if type - deletemarker "41234156"; which would be the leaving players uid. Its almost like the marker name has been removed but remains in situ. OR the onplayer disconnect is the problem. Ive tried create marker local but - ill start again with your take on it cuel - see what that brings. appreciate all the help chaps - Any more takers? -
Waypoints in script are not applied
mikie boy replied to DaysShadow's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
delete _grp selectLeader units _grp select 0; thats should work - just tested it for you - -
Spawning a group of a specific size with a specific soldier class?
mikie boy replied to carlostex's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
use this - waituntil {!isnil "bis_fnc_init"}; F35Bgrp1 = createGroup west; for "_i" from 0 to 2 do { _distances = [5,6,7] call BIS_fnc_selectRandom; _ang = random 360; _dis = _distances; _dx = sin(_ang)*_dis; _dy = cos(_ang)*_dis; _loc = [((getpos spawnpoint) select 0) + _dx, ((getpos spawnpoint) select 1) + _dy, 0]; USsupportteamfake = [_loc, West, ["US_Delta_Force_M14_EP1"],[],[],[],[],[],180] call BIS_fnc_spawnGroup; { [_x] joinSilent (F35Bgrp1); }foreach units USsupportteamfake; }; they are all part of the same team - if you cant get it to work - add a single player using the above method and no for loop and set him a good 30 metres away - and get him to join the group first. they will all run to him. works just tested - you can even test it without the group part and get them to simply join the player (if not MP testing). -
Deleting markers originally defined by player uid
mikie boy replied to mikie boy's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Alas, no joy. had a go at different methods of removing the marker. hinted to obtain the markers name (_uid) - shows the same as thought. however on disconnecting the marker is still showing on the other persons screen (who is still connected). I think therefore this is a matter of having to delete that particular marker from all computers. I have tried MP frame work to delete it from all computers - no joy. this is annoying - thought this would have been the easy bit lol. -
Grouping objects and units in editor
mikie boy replied to nap1991's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
sorry dude - nothing that i can tell you - to be honest the code supplied wont do you any harm - _terrorsupportteam - after this line - that is where you can add your tents etc forexample.. _tent = "CampEast_EP1" createVehicle (_loc ); you can set direction but it will take a bit of working out for each one as they spawn randomly - As a whole or separate groups to set their direction - _terrorsupportteam setdir 45; (face north east) or randomise it. _angles = [25,45,65,180]; _randmoise = _angles select random 3; _terrorsupportteam setdir _angles;# sorry cant be of any more help; i had a go in the editor but to be honest it would have taken loads of markers and triggers. -
Deleting markers originally defined by player uid
mikie boy replied to mikie boy's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
yeah dedicated server - doesnt work on hosted either; just absolutely lost in which direction to go. ive changed _marker to global var - marker - I added an addaction to each player - deletemarker marker; - that works! and the attached marker goes. i also used the same addaction with this code... _uid = getPlayerUID player; deletemarker _uid; that worked - so is this a locality issue? -
Deleting markers originally defined by player uid
mikie boy replied to mikie boy's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
alas - neither method works. cuel - thats how i had it at the start. thought that would have done it, especially as i have identified in that script the name given to create the marker. sxp2high - alas that did not work either - which looks as it that would do the job for the reason shown below. appears on disconnecting everything to do with the player is wiped - the onPlayerDisconnected "[_id, _name, _uid]... part seems to find the uid - calls it in a hint as disconnecting - but not joy. very strange - any other takers? -
Grouping objects and units in editor
mikie boy replied to nap1991's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Edit: doh just saw the bit about the editor - nevermind lol - still can use this if you can stray away from the editor. not sure if this is any help? used this for loads of stuff creates a new marker in random dir from a marker- named "centre" - which you will need to set (empty)on the map. _distances = [1800,1900,2000] call BIS_fnc_selectRandom; //distance away from the centre marker. _ang = random 360; _dis = _distances; _dx = sin(_ang)*_dis; _dy = cos(_ang)*_dis; _loc = [((getmarkerpos "centre") select 0) + _dx, ((getmarkerpos "centre") select 1) + _dy, 0]; _marker = createMarker ["spawnloc", _loc ]; "spawnloc" setMarkerShape "ELLIPSE"; "spawnloc" setMarkerType "Empty"; //"spawnloc" setMarkerSize [0, 0]; from the newley created marker - this spawns loads of units within a raduis defined by the distance 20. for "_i" from 0 to 5 do { _distances = [20] call BIS_fnc_selectRandom; _ang = random 360; _dis = _distances; _dx = sin(_ang)*_dis; _dy = cos(_ang)*_dis; _loc = [((getmarkerpos "spawnloc") select 0) + _dx, ((getmarkerpos "spawnloc") select 1) + _dy, 0]; _terrorsupportteam = [_loc, EAST, ["TK_INS_Bonesetter_EP1", "TK_INS_Soldier_2_EP1", "TK_INS_Soldier_Sniper_EP1", "TK_INS_Soldier_2_EP1","TK_INS_Soldier_2_EP1"],[],[],[],[], [],180] call BIS_fnc_spawnGroup; //add anything else you want to create here... }; not tested but should work. -
Discrepencies with getDir and setDir with attachTo
mikie boy replied to tcann's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Is there a function to get dir where player is looking? if so can then set body to the same? - man this script better be good lol! Pelham had to dust off the olde scientific calculator lol. GOOD LUCK :). -
Figuring the Death Toll & displaying it on screen for a specific Side
mikie boy replied to vonsteimel's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
crude and quick method to help with minimal coding ... not the best method - add this line to the init of all west players this addMPEventHandler ["MPKilled",{_this spawn Deathcountwest;}]; add this line to the init of all east players this addMPEventHandler ["MPKilled",{_this spawn Deathcounteast;}]; init.sqf - or anywhere else that gets activated when game loads up. if (isNil "deathwest ") then { deathwest = 0; }; if (isNil "deatheast ") then { deatheast = 0; }; deathwest = 0; deatheast = 0; Deathcountwest= { deathwest = deathwest + 1;publicVariable "deathwest"; hint format ["death west %1", deathwest]; }; Deathcounteast= { deatheast = deatheast + 1;publicVariable "deatheast"; hint format ["death east %1", deatheast]; }; When you want to check to running score - just create two separate trigger - activation none - one by alpha radio the second by bravo radio - alpha on act - hint format ["%1",deathwest]; bravo on act - hint format ["%1",deatheast]; when gave is complete - you can have the two above lines activate on end - shows final score. tested and working fine -
Limit a trigger to certain units in MP
mikie boy replied to McSpeed's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
further to the above - you will have to look at add Public variable "varlockg1"; at the end of each - to ensure everyone connected knows the get should be locked or unlocked. Also need to define in init if (isNil "artyarraycontrol") then { artyarraycontrol = 0; }; or if the code gatelock isonly activated once - define the starting value for varlockg1. -
Limit a trigger to certain units in MP
mikie boy replied to McSpeed's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
No idea how to remove default addactions - bit of a tricky one. As for the gate - scripting the code to keep it closed will probably be the only way - with the trigger setting the condition to true so that the gate opens. -
Limit a trigger to certain units in MP
mikie boy replied to McSpeed's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
To give you a helping hand, Pelham and myself tested this for you - activation: Anybody/ repeatedly / present / timeout Cond={_x in thislist && _x iskindof "US_Soldier_Pilot_EP1"} count allUnits > 0; Activ=hint "woohoo"; gate1 animate ["Bargate",0]; Desactiv=hint "booo";"gate1 animate ["Bargate",1]; works no problem - HOWEVER - if as Giallustio states that there is a code in place on the specific map you are using - Say a custom script in domination, then you will have to edit that code. Otherwise if you have placed the bar gate yourself and named it yourself - then this works for multiplayer. -
Limit a trigger to certain units in MP
mikie boy replied to McSpeed's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
failing the trigger not working - can always add an object next to the said gate and add an addaction - checking if the person activating is a pilot. On doing a quick test there is no real reason why the trigger would not activate on the server - it may be that the animation is local to the server and as such that is why it is not opening. replace the gate opening with a hint, see if that shows up. -
Limit a trigger to certain units in MP
mikie boy replied to McSpeed's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
post your code and ill have a look - most likely triggers being local to the server. -
Limit a trigger to certain units in MP
mikie boy replied to McSpeed's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
try scripting it instead - see if that makes a difference? - can work out the locality issue then - sometimes the triggers can be funny (in my useage). or post here code here so others can test it for u.