Jump to content

sprags

Member
  • Content Count

    15
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

1 Follower

About sprags

  • Rank
    Private First Class
  1. Hi again. The chopper will not move and land on the smokeshell position not matter what i try on dedicated server. I have change the Domove commands to waypoints now to try and fix, but still no effect. Any scripting gurus able to shed some light? Evac.Sqf private ["_evacpad","_onroute","_arrived","_smoke","_landed"]; _heli = _this select 0; _pos = _this select 1; _heli setbehaviour "CARELESS"; _heli setSpeedMode "FULL"; _evacpad = "Land_HelipadEmpty_F" createVehicle (getpos _heli); _evacpad setpos _pos; _evacheli = group _heli; _wprendevous = _evacheli addWaypoint [_evacpad, 10]; _wprendevous setWaypointType "MOVE"; _wprendevous setWaypointStatements ["true", ""]; // _heli domove getpos _evacpad; helidomove = [_heli,_evacpad]; publicVariableserver "helidomove"; _onroute = "Ground Team 1, We have recieved your coordinates, We are dusting off and on route. Hawk 1 Out."; radio = _onroute; _heli globalChat _onroute; publicVariable "radio"; waitUntil { (currentWaypoint (_wprendevous select 0)) > (_wprendevous select 1) }; while {(count (waypoints _evacheli)) > 0} do { deleteWaypoint ((waypoints _evacheli) select 0); }; _arrived = "Ground Team 1, We are at your coordinates, Pop green smoke on your LZ, Over!."; _heli globalChat _arrived; radio = _arrived; publicVariable "radio"; waitUntil {(count ( _evacpad nearObjects ["SmokeshellGreen", 300])) > 0}; hint "i detected the smoke"; _smokeShell = getPos _evacpad nearestObject "SmokeShellGreen"; sleep 1; // [_heli,_smokeshell] execVM "Landing.sqf"; sleep 1; // deletevehicle _evacpad; _evacpad setpos (getpos _smokeshell); sleep 1; //_heli domove getpos evacpad; // _wpsmoke = _evacheli addWaypoint [_evacpad, 10]; //_wpsmoke setWaypointType "MOVE"; // _wpsmoke setWaypointStatements ["true", ""]; //helidomove = [_heli,_evacpad]; // publicVariableserver "helidomove"; _smoke = "Ground Team 1, We see your smoke, We're bringing her in!"; _heli globalChat _smoke; radio = _smoke; publicVariable "radio"; hint "smoke variable should have fired"; _heli Land "GET IN"; heliland = _heli; publicvariableserver "heliland"; waitUntil { ((getPosATL _heli ) select 2)< 1 }; _landed = "Ground Team 1, We are on the ground, Load up!"; _heli GlobalChat _landed; radio = _landed; publicVariable "radio"; Hint "this works"; sleep 2; while {(count (waypoints _evacheli)) > 0} do { deleteWaypoint ((waypoints _evacheli) select 0); }; deletevehicle _evacpad; InitPVs.Sqf if (local _heli) then { _evacheli = group _heli; _wpsmoke = _evacheli addWaypoint [_evacpad, 10]; _wpsmoke setWaypointType "MOVE"; _wpsmoke setWaypointStatements ["true", ""]; } else { _evacheli = group _heli; _wpsmoke = _evacheli addWaypoint [_evacpad, 10]; _wpsmoke setWaypointType "MOVE"; _wpsmoke setWaypointStatements ["true", ""]; }; }; "heliland" addPublicVariableEventHandler { _heli = _this select 1 select 0; if (local _heli) then { _heli Land "GET IN";} else { _heli Land "GET IN";}; }; // if (local _heli) then // { // _evacheli = group _heli; // _wpsmoke = _evacheli addWaypoint [_evacpad, 10]; // _wpsmoke setWaypointType "MOVE"; // _wpsmoke setWaypointStatements ["true", ""]; // } // else // { // _evacheli = group _heli; // _wpsmoke = _evacheli addWaypoint [_evacpad, 10]; // _wpsmoke setWaypointType "MOVE"; // _wpsmoke setWaypointStatements ["true", ""]; // }; Im soo stuck, its beyond funny and i am damn sure i am missing something or so close that this just needs a slight tweak.
  2. I'm back and still having a few issues with this :( Basically, i can call the action now on the dedicated server and the chopper will fly to my chosen position. When it arrives, the crew ask for a smoke signal. I throw a smoke grenade, they see it and land on it. Now this works fine in editor and player hosted server but won't trigger on the dedicated server. I even tried giving it its own PVEH and calling it from another script but it won't work. Init.sqf if (isDedicated) then { [] execVM "initPVs.sqf"; //only server will create PVEH's //make sure you use publicVariableServer instead of publicVariable, to send traffic directly to the server, further reducing traffic }else{ //clients create local actions [] execVM "radio.sqf"; radiopack1 addAction ["<t color=""#8A3324"">" + ("Call for Evac") + "</t>", { openMap [true, false]; hint1 = hint parsetext format ["<t size='1.2' color='#CD5C5C'> ESTABLISHING SATELLITE UPLINK </t>"]; playsound3d ["a3\sounds_f\sfx\uav\UAV_03.wss",radiopack1]; sleep 1; hint parseText format["<t size='1.2' color='#CD5C5C'> ClICK ON THE MAP TO RELAY COORDINATES TO THE PILOT </t>"]; // publicVariable "mapclickhint"; evac1 globalChat "Please select a rendevous destination on the map sir."; ["callEvac", "onMapSingleClick", { evacpad = _pos; [evac1,evacpad] execVM "evac.sqf"; private ["_destination"]; _destination = "Please select a rendevous destination on the map sir."; message = _destination; publicVariable "message"; }] call BIS_fnc_addStackedEventHandler; [] spawn { waitUntil {!visibleMap}; ["callEvac","onMapSingleClick"] call BIS_fnc_removeStackedEventHandler; }; }, nil, 6, false]; evac1 addAction ["<t color=""#8A3324"">" + ("Return to base") + "</t>", { //openMap [true, false]; evac1 execVM "RTB.sqf"; ["returnToBase", "onMapSingleClick", { }] call BIS_fnc_addStackedEventHandler; [] spawn { // waitUntil {!visibleMap}; ["returnToBase","onMapSingleClick"] call BIS_fnc_removeStackedEventHandler; }; }, nil, 6, false]; evac1 addAction ["<t color=""#3A6629"">" + ("Select Destination") + "</t>", { openMap [true, false]; ["selectDesination", "onMapSingleClick", { }] call BIS_fnc_addStackedEventHandler; [] spawn { waitUntil {!visibleMap}; ["selectDestination","onMapSingleClick"] call BIS_fnc_removeStackedEventHandler; }; }, nil, 6, false]; }; initPVs.sqf //it's possible to make these PVEH's a lot more powerful by putting real code in them instead of just globalChat's "helidomove" addPublicVariableEventHandler { _heli = _this select 1 select 0; _pos = _this select 1 select 1; if (local _heli) then { _heli domove _pos} else { _heli domove _pos}; }; "heliseesmoke" addPublicVariableEventHandler { _heli = _this select 1 select 0; _pos = _this select 1 select 1; if (local _heli) then { _heli domove _pos} else { _heli domove _pos}; }; Evac.sqf hint "working"; private ["_evacpad","_onroute","_arrived","_smoke","_landed"]; _heli = _this select 0; _pos = _this select 1; _heli setbehaviour "CARELESS"; _heli setSpeedMode "FULL"; _evacpad = "Land_HelipadEmpty_F" createVehicle (getpos _heli); _evacpad setpos _pos; _heli domove getpos _evacpad; helidomove = [_heli,_pos]; publicVariableserver "helidomove"; _onroute = "Ground Team 1, We have recieved your coordinates, We are dusting off and on route. Hawk 1 Out."; radio = _onroute; _heli globalChat _onroute; publicVariable "radio"; while { ( (alive _heli) && !(unitReady _heli) ) } do { sleep 1; }; _arrived = "Ground Team 1, We are at your coordinates, Pop green smoke on your LZ, Over!."; _heli globalChat _arrived; radio = _arrived; publicVariable "radio"; waitUntil {(count ( _heli nearObjects ["SmokeshellGreen", 300])) > 0}; hint "i detected the smoke"; _smokeShell = getPos _evacpad nearestObject "SmokeShellGreen"; sleep 2; [_heli,_smokeshell] execVM "Landing.sqf"; sleep 1; deletevehicle _evacpad; Landing.sqf hint "landing.sqf"; private ["_landpad"]; _heli = _this select 0; _pos = _this select 1; _landpad = "Land_HelipadEmpty_F" createVehicle (getpos _pos); //evacpad setpos (getpos _pos); sleep 2; _heli domove getpos _landpad; heliseesmoke = [_heli,_landpad]; publicVariableserver "heliseesmoke"; _smoke = "Ground Team 1, We see your smoke, We're bringing her in!"; _heli globalChat _smoke; radio = _smoke; publicVariable "radio"; hint "smoke variable should have fired"; while { ( (alive _heli) && !(unitReady _heli) ) } do { sleep 1; }; _heli Land "GET IN"; waitUntil { ((getPosATL _heli ) select 2)< 1 }; _landed = "Ground Team 1, We are on the ground, Load up!"; _heli GlobalChat _landed; radio = _landed; publicVariable "radio"; Hint "this works"; sleep 2; //waituntil {player in _heli}; deletevehicle _landpad; _heli domove getpos _landpad; heliseesmoke = [_heli,_landpad]; // This would appear to be the lines of code where nothing is happening. publicVariableserver "heliseesmoke";// Any ideas chaps? Thanks, Andy
  3. Damn, that makes my code look puny lol. I saw these StackedEventHandlers when searching the forums and wiki. They do confuse me ever so slightly. radiopack1 addAction ["<t color=""#8A3324"">" + ("Call for Evac") + "</t>", { openMap [true, false]; ["callEvac", "onMapSingleClick", { evacpad getpos _pos; nul = [evacpad] execVM "evac.sqf"; // Would this be the correct way to pass the mapclick position to a script and then use _this select 0 to retrieve the variable and use it in that script? }] call BIS_fnc_addStackedEventHandler; [] spawn { waitUntil {!visibleMap}; ["callEvac","onMapSingleClick"] call BIS_fnc_removeStackedEventHandler; }; These fncs aren't my strongest point, i do understand the code above, just uncertain on passing information through them. P.S. Thanks a lot Dread for your patience and scripting skills. I have already learnt a lot.
  4. Apologies for the wrong format when i posted the code. Been a long time since i posted on here and i'm pretty sure it was the old forums last time i did. Anyways, back on topic. This code was used to wait until player is synchronised and so that the action would show for everyone on the server. if (!(isNull player)) then Is this not correct? The idea was to have the helicopter movement handled serverside, but broadcasting the variable "_pos" from the client and getting it to fire both via pveh and function have both not worked. Its obviously my poor scripting which is leading to this, and i am trying ever so hard to learn but this one hurdle has got me stumped. All of this code is running on everything via the init.sqf : if (local _heli) then { _heli doMove getpos _pos; }else{ helidomove = _this; publicVariable "helidomove"; }; "helidomove" addPublicVariableEventHandler { _heli = (_this select 1) select 0; //strange you don't have script error here _pos = (_this select 1) select 1; if (local _heli) then { _heli domove _pos; }; }; I guess this should only run on the server? P.S I will try this with the amendment you have added DreadedEntity, to see what result this gives.
  5. Hi folks, I am slowly but surely putting together my own evac/taxi script for use with my clan, and hoping to possibly release it in the future as an addon. I have studied and learnt a lot by reading through posts made by users on here and other sites, and my scripting has come on tenfold. Unfortunately, my scripts i have put together won't work on a dedicated server and i'm wondering if some can cast an eye over it and point me in the right direction, i'm literally pulling my hair out trying to get this working, and i presume it is something pretty simple now. I have a chopper called evac1 and a backpack called radiopack1 with the addactions attached. init.sqf // define function to move chopper on server spraggsy_fnc_helimove = { private ["_heli","_pos"]; _heli = _this select 0; _pos = _this select 1; if (local _heli) then { _heli doMove getpos _pos; } else { helidomove = _this; publicVariable "helidomove"; }; }; "helidomove" addPublicVariableEventHandler { _heli = _this select 1 select 0; _pos = _this select 1 select 1; if (local _heli) then { _heli domove _pos;}; }; //[evac1, evacpad] call spraggsy_fnc_helimove; //call function with above command "helimoveonclick" addPublicVariableEventHandler { Evac1 GlobalChat "We've recieved your coordinates sir, We are dusting off and on route!"; }; "requestevac" addpublicvariableeventhandler { evac1 globalChat "Ground Team 1, We have recieved your coordinates, We are dusting off and on route. Hawk 1 Out."; }; "seesmoke" addpublicvariableeventhandler { evac1 globalChat "Ground Team 1, We see your smoke, We're bringing her in!"; }; "mapclickhint" addPublicVariableEventhandler { hint parseText format["<t size='1.2' /*font='LucidaConsoleB' color='#ff0000'*/> ClICK ON THE MAP TO RELAY COORDINATES TO THE PILOT </t>"]; }; "landin10" addPublicVariableEventhandler { evac1 GlobalChat "We are on the ground, 10 seconds till dustoff. Get out now!"; }; "dustoff" addPublicVariableEventhandler { evac1 GlobalChat "Ground Team 1, We are dusting off and RTB! Good Luck down there! Hawk 1 out."; }; "RTB" addPublicVariableEventhandler { evac1 GlobalChat "Ground Team 1, We are RTB! Good Luck down there! Hawk 1 out."; }; "popsmoke" addpublicvariableeventhandler { evac1 globalChat "Ground Team 1, We are at your coordinates, Pop green smoke on your LZ, Over!."; }; "landed" addpublicvariableeventhandler { evac1 globalChat "Ground Team 1, We are on the ground, Load up!"; }; // }; if (!(isNull player)) then { radio_addactionMP = { private["_object","_screenMsg","_scriptToCall"]; _object = _this select 0; _screenMsg = _this select 1; _scriptToCall = _this select 2; _option = _this select 3; if(isNull _object) exitWith {}; _object addaction [_screenMsg,_scriptToCall,_option]; }; // define all addActions here so they display in multiplayer. [[radiopack1,("<t color=""#8A3324"">" + ("Call for Evac") + "</t>"),"radio.sqf", 1],"radio_addactionMP",nil,false] spawn BIS_fnc_MP; [[evac1,("<t color=""#8A3324"">" + ("Return to base") + "</t>"), "radio.sqf", 2],"radio_addactionMP",nil,false] spawn BIS_fnc_MP; [[evac1,("<t color=""#3A6629"">" + ("Select Destination") + "</t>"), "radio.sqf", 3],"radio_addactionMP",nil,false] spawn BIS_fnc_MP; // radiopack addAction ["Call For Evac", "radio.sqf", 1 ]; // evac1 addAction ["Return To Base", "radio.sqf", 2 ]; // evac1 addAction ["Select Destination", "radio.sqf", 3 ]; }; radio.sqf _selection = _this select 3; switch (_selection) do { case 1 : { nul = [evac1,radiopack1] execVM "evac.sqf"; }; case 2 : { nul = [evac1] execVM "rtb.sqf"; }; case 3 : { nul = [evac1] execVM "destination.sqf"; }; }; Evac.sqf - first part only as the rest of the code is a mess hint "working"; _heli = _this select 0; _heli setbehaviour "CARELESS"; _heli setSpeedMode "FULL"; // private ["landpad"]; _heli GlobalChat "Select your destination on the map sir!"; Hint parseText format["<t size='1.2' /*font='LucidaConsoleB' color='#ff0000'*/> ClICK ON THE MAP TO RELAY COORDINATES TO THE PILOT </t>"]; publicVariable "mapclickhint"; //// destination = true; private "_pos"; evacpad = "Land_HelipadEmpty_F" createVehicle (getpos _heli); ["click", "onMapSingleClick", { evacpad setPos _pos;destination = false; }] call BIS_fnc_addStackedEventHandler; waitUntil {!destination}; _heli setBehaviour "CARELESS"; _heli setSpeedMode "FULL"; _heli domove getpos evacpad; _heli GlobalChat "We've recieved your orders sir, We are dusting off and on route!"; [evac1,evacpad] call spraggsy_fnc_helimove; publicVariable "requestevac"; while { ( (alive _heli) && !(unitReady _heli) ) } do { sleep 1; }; Now i know onsinglemapclick is a local command only, but i can't really see why this doesn't broadcast with the above code. The event handler fires, telling me the chopper has recieved orders and is on route but nothing happens. :( Thanks in advance guys, Andy
  6. sprags

    IC ArmA

    Hi IceBreakr,The New island is in its Final Stages of Beta.Can't give an exact date this minute,but expect a release real soon.
  7. Just to clarify something that took us a few hours to get working,The DeathMessages and NetStats need to be in your Arma Profile under the Difficulties class,and not in the Server.cfg like the Wiki says. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class Difficulties { class regular { class Flags { Armor=0; FriendlyTag=0; EnemyTag=0; HUD=0; HUDPerm=0; HUDWp=0; HUDWpPerm=0; AutoSpot=0; Map=0; WeaponCursor=0; AutoGuideAT=0; ClockIndicator=0; 3rdPersonView=0; Tracers=0; UltraAI=0; AutoAim=0; UnlimitedSaves=0; DeathMessages=1; // Disables killed messages NetStats=1;// Disables Scoreboard (0) }; skillFriendly=0.750000; skillEnemy=0.750000; precisionFriendly=0.750000; precisionEnemy=0.750000; }; class veteran { class Flags { Armor=0; FriendlyTag=0; EnemyTag=0; HUD=0; HUDPerm=0; HUDWp=0; HUDWpPerm=0; AutoSpot=0; Map=0; WeaponCursor=0; AutoGuideAT=0; ClockIndicator=0; 3rdPersonView=0; Tracers=0; UltraAI=0; AutoAim=0; UnlimitedSaves=0; DeathMessages=0; // Disables killed messages NetStats=0;// Disables Scoreboard (0) }; Hope this Helps, Sprags
  8. sprags

    Fuel gauges

    Yep,Exactly them.
  9. sprags

    Fuel gauges

    Exactly what you Mean Gnat Just the Linear bar which would appear in the Top left Hud. sorry if i confused you guys with actually wanting to add in an animated fuel gauge to the model. Anyways,i did take a quick look at adding in sections of the MFD config and AirplaneHud from the Air.pbo config.cpp,but had no luck. I will take another look,and see if i get anywhere. Have any of you guys actually managed to get it to work?
  10. Hi guys. sorry if this has been posted before but I have searched high and low on all the Ofp/Arma forums i know off and am trying to find out if it is possible to add in the Fuel gauge to the hud of land vehicles. I am have looked through the MFD and Hud sections on the Biki,and tried adding in the simple bone and MFD classes,but it seems to give a MFD.scope not found error and doesn't work. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CfgPatches { class IC_Armour { units[] = {"ic_m1a1"}; weapons[] = {}; requiredVersion = 1.08; requiredAddons[] = {"CAWeapons", "CATracked"}; }; }; class CfgVehicleClasses { class IC_tracked { displayName = "IC_Armour"; }; }; class CfgVehicles { /*extern*/ class M1Abrams; class ic_m1a1: M1Abrams { vehicleClass="IC_tracked"; side = 2; model="\ca\Tracked\M1_abrams"; displayName = "M1A1"; fuelcapacity= 1; }; class MFD { class Bones { class Linear { type = linear; source = fuel; min = 0; //Min value this bone can display max = 1; //Max value this bone can display minPos[] = {0.5,0.2}; maxPos[] = {0.5,0.5}; }; }; }; }; }; If its possible and anyone could shed some light,that would be most appreciated. Thanks Sprags
  11. sprags

    Make civ's baddies

    Here Try this command SuperShooter,Should be able to define Civilian's as East(OPFOR).
  12. Thanks for the Help So far guys. Rewritten the code without all the check conditions,and only using "Not Alive" command and haven't any problems so far.
  13. sprags

    Linux server beta

    Shotglass and sprags from the IC-ArmA Tournament Here. Linux build running sweet so far,get some Freezing with a few players,believe it is down to there Location (Pacific area) so far. Server running 50 FPS and with 80MB of memory on our battle map. Should hopefully stress test the Linux build with over 100 players tomorrow and Email the Log files to yourselves to check.
  14. Hey Guys. To save starting a thread,thought i would post here. Currently,over at IC,We are mapping and getting around 110 players turn up for our saturday battle in the tournament. We are using the revised version of KaRRiLLioN's Vrs.sqf by norrin. Problem we seem to get is after maybe an hour or so of battling,the Sqf file seems to just stop,causing 55 or so vehicles to completely stop respawning. Currently,we have tried setting up 14 versions of the script,but we still get at least 3 or 4 sqf's just bug out on us. The code i'm using is this. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> //Here's the updated alternate vehicle respawn script in which the respawn timer only begins counting down when the crew bail. //Code Sample /* //VEHICLE RESPAWN SCRIPT SQF // Respawns vehicles when they are destroyed, cannot move or cannot fire // © JUNE 2007 - norrin (norrins_nook@iprimus.com.au), based upon KaRRiLLioN's original vrs.sqf script. // Version: 2.0 //****************************************************************************************** //*************************** //IMPORTANT: ADD A GAMELOGIC NAMED Server to the mission to prevent multispawn //To run this script place the following code in the init line of the vehicle: //v = [this, "vehicle name", x] execVM "vrs_move.sqf" //where x is the time you wish to set for the vehicle dammaged/destroyed respawn delay //Note: the vehicle name must be in quotation marks eg. if vehicle name's Hmm1 it must appear in the init line as "Hmm1", //if you don't want to name your vehicles just put "" in place of the vehicles name //****************************************************************************************** //**************************** //Start VRS_Move.sqf */ private ["_vcl","_respawndelay","_dir","_pos","_type","_run","_delay"]; if (!isServer) exitWith {}; _vcl = _this select 0; _name_vcl = _this select 1; _respawndelay = _this select 2; _dir = Getdir _vcl; _pos = Getpos _vcl; _type = typeOf _vcl; _run = TRUE; sleep 5; for [{}, {_run}, {_run}] do { while {canMove _vcl || canFire _vcl} do { sleep 1; }; while {!canMove _vcl && count crew _vcl > 0 || !canFire _vcl && count crew _vcl > 0} do { sleep 1; }; _delay = Time + _respawndelay; while {!canMove _vcl && Time < _delay && count crew _vcl == 0 || !canFire _vcl && Time < _delay && count crew _vcl == 0} do { sleep 1; }; if (!canMove _vcl && Time >= _delay && count crew _vcl == 0 || !canFire _vcl && Time >= _delay && count crew _vcl == 0) then { deleteVehicle _vcl; _vcl = _type createVehicle _pos; _vcl setVehicleVarName _name_vcl; _vcl setdir _dir; sleep 1; _vcl setvelocity [0,0,0]; _vcl setpos _pos; sleep 1; _vcl setvelocity [0,0,0]; sleep 2; }; }; I have change the code so it makes use of the "if (!isServer) exitWith {};" command,and removing the game logic. I'm using this code to initialize <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">v = [this, "vehicle", 300] execVM "Respawn\vrs_move.sqf" Any ideas on this problem?I believe it's just lag as the code works ok when Beta testing with 30 to 40 guys but i could be wrong?
  15. sprags

    108-Is there still hope?

    The Map was a Attack And Defend Style Map we play each week. The Map has been built and used by Myself,Wedge,Seanie,Norrin and Imustkill. The Map Contains 3 objectives which must be captured in order to advance the following week. E.g. One army must hold 2 or more points to win the battle in the three hours and gain the intiative for the following week.It uses a Flag Capture and Counter script written by Norrin,and also his revised version of Karrillion's vehicle Respawn Scripts. Currently no AI are used,due to obvious reasons. The player base consisted of 50 slots for Opfor and Blufor allowing members of both Armies to battle,with an additional 8 slots for the admins on the Independent Faction. The server ran reasonably well under such conditions and was more than playable.
×