Jump to content

falconx1

Member
  • Content Count

    179
  • Joined

  • Last visited

  • Medals

Everything posted by falconx1

  1. i resolved this bug to the best of my knowledge by doing the following: 1. Changing "_randOBJ" to "randOBJ" 2. using: PlayerConnected.sqf to read the Var "randOBJ" and remarking the marker So at this point I'm moving on to other issues. unless someone can offer a better fix. Thanks for all the help tho
  2. Can someone break down a few important fundamentals of the scripting syntax, i'm spending many hours debugging easy stuff like setting setpos of a single object for over 1 hour. I knew programming in the past but i forgot most. but i remember some things for strings use "" and close lines with ; . COmments start with // or the multi line comment etc anyway. What really is the most confusing ATM is when to use these: { } [ ] etc i thought from past experience that "hi" + "hi again" adds the strings making it "hihiagain" but havnt testing it in arma script yet i suppose i cld run it in the debugger but im geting burned out lololol anyway if anyone has some time to break some rules of syntax down or something please do,
  3. still looking how to fix this . i dont really know how to go about a fix
  4. how come this don't work? parameters.hpp class respawnDelay { // Param 0 title = "Respawn Delay"; values[] = {5,6,7,8,9,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90}; texts[] = {"5 Seconds","6 Seconds","7 Seconds","8 Seconds","9 Seconds","10 Seconds","15 Seconds","20 Seconds","25 Seconds","30 Seconds","35 Seconds","40 Seconds","45 Seconds","50 Seconds", "55 Seconds","60 Seconds","65 Seconds","70 Seconds","75 Seconds","80 Seconds","85 Seconds","90 Seconds"}; default = 10; }; Init.sqf respawnDelay = (paramsArray select 0);
  5. Ok, so here is what i crafted up from scratch with your help of course:) But i just ran my first dedicated server test, and the "ObjectiveCrate" Marker that marks the objective loads fine etc, but i noticed when i DC and return the Objective is gone could i just write in the onPlayerconnected.sqf to read the var from this file below and remark it or what do i do to fix it? private ["_ObjectiveMkrName","_ObjectiveMkr"]; _randOBJ = (floor(random 4)) + 1; sleep 1; //--------------------------------------------Objective Object is "ObjectiveCrate" Marker //---Static var _ObjectiveMkrName = "Objective"; if (_randOBJ == 1) then { ObjectiveCrate setPos (getMarkerPos "Objective1"); ObjectiveCrate setDir 0; _Obj = getmarkerpos "Objective1"; _ObjectiveMkr = createMarker [_ObjectiveMkrName, _Obj]; _ObjectiveMkr setMarkerShape "ICON"; _ObjectiveMkrName setMarkerType "mil_box"; _ObjectiveMkrName setMarkerColor "ColorGreen"; _ObjectiveMkrName setMarkerSize [0.9, 0.9]; _ObjectiveMkrName setMarkerText (_ObjectiveMkrName ); }; if (_randOBJ == 2) then { ObjectiveCrate setPos [getMarkerPos "Objective2" select 0, getMarkerPos "Objective2" select 1, 4]; ObjectiveCrate setDir 140; _Obj = getmarkerpos "Objective2"; _ObjectiveMkr = createMarker [_ObjectiveMkrName, _Obj]; _ObjectiveMkr setMarkerShape "ICON"; _ObjectiveMkrName setMarkerType "mil_box"; _ObjectiveMkrName setMarkerColor "ColorGreen"; _ObjectiveMkrName setMarkerSize [0.9, 0.9]; _ObjectiveMkrName setMarkerText (_ObjectiveMkrName ); }; if (_randOBJ == 3) then { ObjectiveCrate setPos [getMarkerPos "Objective3" select 0, getMarkerPos "Objective3" select 1, 4]; ObjectiveCrate setDir 95; _Obj = getmarkerpos "Objective3"; _ObjectiveMkr = createMarker [_ObjectiveMkrName, _Obj]; _ObjectiveMkr setMarkerShape "ICON"; _ObjectiveMkrName setMarkerType "mil_box"; _ObjectiveMkrName setMarkerColor "ColorGreen"; _ObjectiveMkrName setMarkerSize [0.9, 0.9]; _ObjectiveMkrName setMarkerText (_ObjectiveMkrName ); }; if (_randOBJ == 4) then { ObjectiveCrate setPosATL [getMarkerPos "Objective4" select 0, getMarkerPos "Objective4" select 1, 0]; _Obj = getmarkerpos "Objective4"; _ObjectiveMkr = createMarker [_ObjectiveMkrName, _Obj]; _ObjectiveMkr setMarkerShape "ICON"; _ObjectiveMkrName setMarkerType "mil_box"; _ObjectiveMkrName setMarkerColor "ColorGreen"; _ObjectiveMkrName setMarkerSize [0.9, 0.9]; _ObjectiveMkrName setMarkerText (_ObjectiveMkrName ); };
  6. its looks like the marker is assigned a Z in the mission.sqm ill try that out good idea
  7. hahah ,cool idea. but this is for precision placement like on 2nd floors, in rooms snugged right next to the wall etc, don't now how well it would turn out the easier way, prolly a little random placements. ill just do the random script and map tele to make sure they are perfect:) this forum is great thanks for the help! ---------- Post added at 01:03 AM ---------- Previous post was at 12:25 AM ---------- ok now im stuck on syntax again , this location requires a higher elevations since its in a building, and right now the object is in the ground to far. i cant get the code right, i want the x and y from marker called "Objective4" but i wanted to add some elevation on top of that code dont' work:( ObjectiveCrate setPosASL {getPosASL "Objective4", "Objective4" + 9}];
  8. cool thanks, its for a random objective mission, was trying to finish the part where each game the crate spawns randomly. i would of used creatvehicle but i have stuff in the init field and don't know how to dynamically add stuff in the init field.
  9. im trying to move the object to a marker not the player Land_WoodenBox_F
  10. I'm trying to execute two scripts when a player dies from the players Init in editor so far ive got this one which works great. how can i add another to it? the other one is called "Localmarker.sqf" null = [this] execVM "Gear\Sniper.sqf"; this addeventhandler ["respawn","_this execVM 'Gear\Sniper.sqf'"]; ---------- Post added at 01:36 AM ---------- Previous post was at 01:26 AM ---------- would this be right? cuzz on death is when i want the local marker.sqf to re-execute null = [this] execVM "Gear\Sniper.sqf"; this addeventhandler ["respawn","_this execVM 'Gear\Sniper.sqf'"]; this addeventhandler ["respawn","_this execVM 'LocalMarker.sqf'"];
  11. i can't get player setpos to work on dedicated, but it all works if i host a Lan game or click preview from the editor init.sqf //--- Mission parameters DebugMe = false; SwapGear = true; ShowIntel = true; enableTeamSwitch false; enableSaving [false, false]; //---GetSelected StartLocation Param GetStartLocation = (paramsArray select 9); if (isServer) then {ExecVM "server.sqf"}; if (local player) then {ExecVM "client.sqf"}; server.sqf if (GetStartLocation == 4) then { // Randomize and Pick Start Location / GetStartLocation = round ((random 3) + 0.5); // if (GetStartLocation == 1) then { AttackMarkerLocation = getMarkerPos "AttackAirport"; ExecVM "AI\AI_4X_Infantry_Airport.sqf"; sleep 5; }; if (GetStartLocation == 2) then { AttackMarkerLocation = getMarkerPos "AttackAirStation"; ExecVM "AI\AI_4X_Infantry_Airstation_Mike.sqf"; sleep 5; }; if (GetStartLocation == 3) then { AttackMarkerLocation = getMarkerPos "AttackMilitaryRange"; ExecVM "AI\AI_4X_Infantry_Military_Range.sqf"; sleep 5; }; }; //sleep 5; client.sqf if (GetStartLocation == 1) then { player setpos getmarkerpos "StartingLocation1"; player setdir 180; }; if (GetStartLocation == 2) then { player setpos getmarkerpos "StartingLocation2"; player setdir 180; }; if (GetStartLocation == 3) then { player setpos getmarkerpos "StartingLocation3"; player setdir 180; }; sleep 1;
  12. falconx1

    AI Skill Problems

    when setting AI skill using: setskill In multiplayer, will all the spawned AI have the new setskill for all players on the server? or do i need to use "if server" or something like that Example _grp1 = createGroup east; _grp1 = [getMarkerPos RandomDirection, east, (configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfTeam")] call BIS_fnc_spawnGroup; _wp0 = _grp1 addWaypoint [AttackMarkerLocation,0]; _wp0 setWaypointType "SAD"; _wp0 setWaypointSpeed "NORMAL"; _grpname = _this select 0; _grpleader = leader _grpname; _grpleader setskill 0.25; //-- easy AI
  13. how can i mod this to check if east units are all dead and only spawn more if all east units are dead? _waves_east = 0; while {_waves_east < 6} do { _waves_east = _waves_east + 1; //---count waves as we spawn them hint format["%1",_waves_east]; //---spawn AI group sleep 60; if (_waves_east == 5) then { hint "5 waves debug"; }; }; i guess i just don't know how to finish adding/modding this script into the one above if ( ({(side _x) == east} count allUnits) then { ---------- Post added at 08:58 AM ---------- Previous post was at 08:41 AM ---------- i think i got it can someone let me know if this is right? objective: Check before we spawn east ai and make sure none exist first, count waves as we spawn them using +1 and stop at 5 waves that's pretty much it _waves_east = 0; while {_waves_east < 6} do { _waves_east = _waves_east + 1; hint format["%1",_waves_east]; sleep 2; if ( ({(side _x) == east} count allUnits) == 0 ) then { //---spawn more east AI }; if (_waves_east == 5) then { //---Exit loop }; };
  14. Error in expression <r = RandomDirection select floor(random(count RandomDirection)); hint format ["I> Error position: <count RandomDirection)); hint format ["I> Error count: Type String, expected Array,Config entry File C:\Users\Arma 3 - Other Profiles\FalconX-1\missions\missionname.Stratis\server.sqf, line 60 server.sqf if (!isServer || time > 30) exitWith {}; createCenter EAST; WEST setFriend [EAST, 0]; EAST setFriend [WEST, 0]; //-- Relocate Players and Spawn AI if (GetStartLocation == 1) then { RandomDirection = ["North of Airport","North East of Airport","North West of Airport","South of Airport","South East of Airport","South West of Airport","West of Airport","East of Airport"] select floor(random 8); AttackMarkerLocation = getMarkerPos "AttackAirport"; player setpos getmarkerpos "StartingLocation1"; player setdir 180; ExecVM "AI\AI_4X_Infantry_Airport.sqf"; }; if (GetStartLocation == 2) then { RandomDirection = ["North of Airstation","North East of Airstation","North West of Airstation","South of Airstation","South East of Airstation","South West of Airstation","West of Airstation","East of Airstation"] select floor(random 8); AttackMarkerLocation = getMarkerPos "AttackAirStation"; player setpos getmarkerpos "StartingLocation2"; player setdir 180; ExecVM "AI\AI_4X_Infantry_Airport.sqf"; }; if (GetStartLocation == 3) then { RandomDirection = ["North of Military Range","North East of Military Range","North West of Military Range","South of Military Range","South East of Military Range","South West of Military Range","West of Military Range","East of Military Range"] select floor(random 8); AttackMarkerLocation = getMarkerPos "AttackMilitaryRange"; player setpos getmarkerpos "StartingLocation3"; player setdir 180; ExecVM "AI\AI_4X_Infantry_Airport.sqf"; }; if (GetStartLocation == 4) then { ExecVM "Randomize_Start_Location.sqf"; }; sleep 5; switch(GetStartLocation) do { case 1: {RandomDirection = "North of Airport","North East of Airport","North West of Airport","South of Airport","South East of Airport","South West of Airport","West of Airport","East of Airport";}; case 2: {RandomDirection = "North of Airstation","North East of Airstation","North West of Airstation","South of Airstation","South East of Airstation","South West of Airstation","West of Airstation","East of Airstation";}; case 3: {RandomDirection = "North of Military Range","North East of Military Range","North West of Military Range","South of Military Range","South East of Military Range","South West of Military Range","West of Military Range","East of Military Range";}; }; _waves_east = 0; while {_waves_east < 5} do { waitUntil {({(side _x) == east} count allUnits) == 0}; //Increase counter _waves_east = _waves_east + 1; random_Dir = RandomDirection select floor(random(count RandomDirection)); hint format ["Intel: Infantry Spotted: %1", RandomDirection]; ExecVM "AI\AI.sqf"; sleep 5; }; diag_log format ["ERROR CODES: %1", RandomDirection];
  15. im not good with syntax at all, this is what i am assuming to do with the code u showed lol switch(GetStartLocation) do { case 1: {whatever = ["North of Airport","North East of Airport","North West of Airport","South of Airport","South East of Airport","South West of Airport","West of Airport","East of Airport"];}; case 2: {whatever = ["North of Airstation","North East of Airstation","North West of Airstation","South of Airstation","South East of Airstation","South West of Airstation","West of Airstation","East of Airstation"];}; case 3: {whatever = ["North of Military Range","North East of Military Range","North West of Military Range","South of Military Range","South East of Military Range","South West of Military Range","West of Military Range","East of Military Range"] select floor(random 8); while {true} do { random_whatever = whatever select floor(random(count whatever)); }; while {_waves_east < 5} do { waitUntil {({(side _x) == east} count allUnits) == 0}; _waves_east = _waves_east + 1; execVM "AI\AI.sqf"; sleep 5; };
  16. no starting locations dont change after spawn. the only thing that needs new spawn locations is the AI if (GetStartLocation == 1) then { RandomDirection = ["North of Airport","North East of Airport","North West of Airport","South of Airport","South East of Airport","South West of Airport","West of Airport","East of Airport"] select floor(random 8); }; _waves_east = 0; while {_waves_east < 5} do { waitUntil {({(side _x) == east} count allUnits) == 0}; _waves_east = _waves_east + 1; execVM "AI\AI.sqf"; sleep 5; }; WOuld be nice if its possble to add if statmentes in the loop, i dont know if it's pssable? so while it loops if "getlocation" ==1 then it generates the Location 1 Airport Array etc... etc
  17. but it could be any of the 3 based on parameter RandomDirection = ["North of Airport","North East of Airport","North West of Airport","South of Airport","South East of Airport","South West of Airport","West of Airport","East of Airport"] select floor(random 8); RandomDirection = ["North of Airstation","North East of Airstation","North West of Airstation","South of Airstation","South East of Airstation","South West of Airstation","West of Airstation","East of Airstation"] select floor(random 8); RandomDirection = ["North of Military Range","North East of Military Range","North West of Military Range","South of Military Range","South East of Military Range","South West of Military Range","West of Military Range","East of Military Range"] select floor(random 8); ---------- Post added at 02:27 PM ---------- Previous post was at 02:24 PM ---------- i dont want to spawn ai buy the airport if the players playing the mission spawned at the milatary ranged vise versa ya see?
  18. the part in the server.sqf where it shows this: RandomDirection = ["North of Airport","North East of Airport","North West of Airport","South of Airport","South East of Airport","South West of Airport","West of Airport","East of Airport"] select floor(random 8); that works 1 time, but then the loop takes over at the bottom of the code in the server.sqf and keeps the old randomdirection looping, so all new ai in that loop spawn in the same spot instead of random. i need to add "RandomDirection" code to the loop some how so it regenerates a random location based on if the startlocation was airport, air station mike or miltary range.
  19. here is where i'm stuck again server.sqf if (!isServer || time > 30) exitWith {}; createCenter EAST; WEST setFriend [EAST, 0]; EAST setFriend [WEST, 0]; //-- Relocate Players and Spawn AI if (GetStartLocation == 1) then { RandomDirection = ["North of Airport","North East of Airport","North West of Airport","South of Airport","South East of Airport","South West of Airport","West of Airport","East of Airport"] select floor(random 8); AttackMarkerLocation = getMarkerPos "AttackAirport"; player setpos getmarkerpos "StartingLocation1"; player setdir 180; ExecVM "AI\AI.sqf"; }; if (GetStartLocation == 2) then { RandomDirection = ["North of Airstation","North East of Airstation","North West of Airstation","South of Airstation","South East of Airstation","South West of Airstation","West of Airstation","East of Airstation"] select floor(random 8); AttackMarkerLocation = getMarkerPos "AttackAirStation"; player setpos getmarkerpos "StartingLocation2"; player setdir 180; ExecVM "AI\AI.sqf"; }; if (GetStartLocation == 3) then { RandomDirection = ["North of Military Range","North East of Military Range","North West of Military Range","South of Military Range","South East of Military Range","South West of Military Range","West of Military Range","East of Military Range"] select floor(random 8); AttackMarkerLocation = getMarkerPos "AttackMilitaryRange"; player setpos getmarkerpos "StartingLocation3"; player setdir 180; ExecVM "AI\AI.sqf"; }; if (GetStartLocation == 4) then { ExecVM "Randomize_Start_Location.sqf"; }; sleep 5; _waves_east = 0; while {_waves_east < 5} do { //Wait until all east units are dead waitUntil {({(side _x) == east} count allUnits) == 0}; //Increase counter _waves_east = _waves_east + 1; hint format["Reinforcments: %1",_waves_east]; execVM "AI\AI.sqf"; //Some sleep sleep 5; }; AI.sqf //if (isServer) then { //SELECT ENEMY AI SKILL. Using the value from param AISkill. switch (AICurrentSkill) do { //Novice case 1: { AICurrentSkill = 0.25; }; //Rookie case 2: { AICurrentSkill = 0.45; }; //Veteran case 3: { AICurrentSkill = 0.65; }; //Expert case 4: { AICurrentSkill = 0.85; }; //Elite case 5: { AICurrentSkill = 0.95; }; }; //RandomDirection = ["North of Airport","North East of Airport","North West of Airport","South of Airport","South East of Airport","South West of Airport","West of Airport","East of Airport"] select floor(random 8); _rndDirhint = [nil,nil,"per",rHINT,RandomDirection] call RE; //Display Intel if true. if (ShowIntel) then { hint format ["Intel: Infantry Spotted: %1", RandomDirection]; }; _grp1 = createGroup east; _grp1 = [getMarkerPos RandomDirection, east, (configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfTeam")] call BIS_fnc_spawnGroup; _grp1 allowFleeing 0; _wp0 = _grp1 addWaypoint [AttackMarkerLocation,0]; _wp0 setWaypointType "SAD"; _wp0 setWaypointFormation "LINE"; _wp0 setWaypointBehaviour "COMBAT"; _wp0 setwaypointcombatmode "YELLOW"; _wp0 setWaypointSpeed "NORMAL"; _wp0 setWaypointCompletionRadius 20; //_wp0 = nil; fnc_AI_Skill ={ _grpname = _this select 0; _grpleader = leader _grpname; _grpleader setskill AICurrentSkill; { _x setskill ["aimingAccuracy",AICurrentSkill]; _x setskill ["aimingShake",AICurrentSkill]; _x setskill ["aimingSpeed",AICurrentSkill]; _x setskill ["commanding",AICurrentSkill]; _x setskill ["courage",AICurrentSkill]; _x setskill ["spotDistance",AICurrentSkill]; _x setskill ["spotTime",AICurrentSkill]; //Call Set Skill [_grp1] call fnc_AI_Skill; Appreciate all the help mate. Ok, so the code before i asked about is at the bottom of the server.sqf now, code is getting quite large. been messing with this for over an hour trying to get the new loop script added in a way in which, based on the start locations randomizes the 8 markers based on what ever of the start location was used. you follow me? i cant seem to figure it out.
  20. thanks, im prolly gonna use this one i think, but how can i get it to exit loop? after five waves? while {true} do { hint format["%1",_waves_east]; sleep 60; if ( ({(side _x) == east} count allUnits) == 0 ) then { _waves_east = _waves_east + 1; execVM "ai.sqf"; }; if (_waves_east == 5) then { //---Exit loop }; };
  21. Was wondering if anyone has like 5 mins to take a high quality screenshot. i recommend using splendidcam its super fast and easy. Open editor drop a player in by Air Station Mike, click preview, press Escape, click camera to open SpledidCam using w,q,a,s,z to navigate around to the spot, then press "h" to hide controls overlay, then press F12 to take a screenshot via steam and post it here for me :) this is the angle I'm looking for http://postimg.org/image/6a3be6j7f/ Settings: high settings or better preferably ultra Resolution: 2048 x 1024 or higher. i can always convert if its to high etc I will def put ya in the credits if I use the screenshot:) thanks goes to grab coffee and crosses fingers
  22. very nice thanks mate. check pm
  23. falconx1

    AddAction

    just crafted this up in a couple mins it's pretty simple and works Init.sqf player addAction["Options", "1.sqf"]; 1.sqf hint "works!"; if you want color use this: Init.sqf player addAction [("<t color=""#ffffff"">" + ("Options") + "</t>"),"1.sqf"]; google "hex genterator" for a different color code
  24. the mission im making is for multiplayer, i wanted to have it for players vs AI and if a parameter was selected = true it would run in East vs West mode is this possible? and if so what is the best setting for it via Description.ext class Header { gameType = CTI; ? Team DM or CoOp its both coop and players vs players at least i want it to be. minPlayers = 1; maxPlayers = 32; }; also. if use a trigger and set it with settings: switch , east, present. inside the trigger can i use that method to initiate the End1; to show players that the match is over, if so should i use in the trigger nul = this execVM "endmission.sqf"; and inside the endmission.sqf use: if (isServer) then endMission "END1"; or do i need to spawn script for all clients? if all the above methods used are all players connected going to get the mission ended popup? or is there another better way to end the mission for all players without executing the end script more than needed?
×