Jump to content

cougarxr7

Member
  • Content Count

    98
  • Joined

  • Last visited

  • Medals

Everything posted by cougarxr7

  1. You told me to run it from the db console, wow it sucks getting old! Any links that you know of that are for scripting for dummies, please post them for me. Thanks!
  2. Larrow, It works! I have screen shots, but I could not figure out how I could upload them. Thank you for the home work, that was fun to figure out! Even though it worked, not sure why it had these errors in the RPTs, Sever and client. terminate h; h = [] spawn { while {true} do { wait> Error Undefined variable in expression: h and Error in expression <ition select 0; _turretPath = _position select 1; switch (_positionType) do { > 1:05:10 Error position: <select 1; switch (_positionType) do { > 1:05:10 Error Zero divisor Just curious how it still worked even with those errors? Thank you!
  3. IT07, lol, I know. I used; Private [ "_unit", "_helo1","_dr", "gu", "_co", "_ch", "_unitname"]; Larrow, It would be great if it could be like a switch. Please understand I know my scripting sucks! However I do like to trial and error things With the correct syntax I know this can work! switch (Param1) do { case 0: { if(pilot) then {_handle = [] execVM "pilot.sqf"}; }; case 1: { if(copilot) then {_handle = [] execVM "copilot.sqf"}; }; case 2: { if(leftgunner) then {_handle = [] execVM "crewchief.sqf"}; }; case 3: { if(rightgunner) then {_handle = [] execVM "doorgunner.sqf"}; }; case 4: { if(cargo) then {_handle = [] execVM "cargo.sqf"}; }; case 5: { }; }; Again thank you so very much for your help! Granddaughter is waking up gotogo! If I can be of any help to you, (Electrical, Automotive, Computers) just ask, be glad to help!
  4. IT07, I followed your link and it says; That fieldname has been the source of scripting problems. But I now know when someone ask or brings up name, it is what we named it, not much as in game name. Thanks for helping me get that correct! Also, fnc_MySystem = { Private [ ]}; < I remember when that was introduced in arma 2, but being old and full of meds it was easy to forget! Larrow, you script functioned flawless! I plan on really studying it, thanks for explaining each line! However what I was hoping for was more of the in game name return of the turret, example; the "moveInTurret" command gives the name of the turret. https://community.bistudio.com/wiki/moveInTurret You take the pilot position in the helo. The hint returns the turret. "You are in turret [0]! I have an idea I am going to try. Please feel free to post any and all scripts you want! Thanks for you help!
  5. IT07 , Larrow wow thanks! I will give it a test run! Post results asap!
  6. Lala14 , it was never stated earlier the name was from the editor. community.bistudio.com/wiki/Arma_3_CfgVehicles_WEST Shows that to be the name as that helicopter. Now I know name means from the editor, that might help me get this to work. Now I understand there is a, "classname", B_Heli_Transport_01_F "gamename", UH-80 Ghost Hawk "fieldname", helo1 <(or whatever I want to call it!) I bet if we look hard enough we might find a fourth description we can call that helicopter. Thanks for your help!
  7. Lala14, I used a script like that to eject players from helos who were not pilots. So I know that is doable, however I am working on below; hint "CREW SQF IS UP AND RUNNING!"; SLEEP 4; // _helo1 = UH-80 Ghost Hawk ; for [{_loop=0}, {_loop<1}, {_loop=_loop}] do { if(player == vehicle player) then { hint "You are not in the Helo"; }else{ hint "You are in a Helo!"; }; _dr = _helo1 emptyPositions "driver"; _gu = _helo1 emptyPositions "gunner"; _co = _helo1 emptyPositions "copilot"; _ch = _helo1 emptyPositions "crewchief"; if (_dr > 0)|| (_gu > 0) || (_co > 0) || (_ca > 0)) then { hint "Someone is on Board Helo1!"; }; sleep 1; hint format["%1 %2 %3 %4 %5 %6 %7 %8","Pilot =",_dr,"CoPilot =",_co," Crew Chief =",_ch,"DoorGunner =",_gu]; sleep 4; }; This works, when I am not in the helo, it hints me I am not in. When I am in the helo, it hints me I am in. I am getting scallar on the hint of dr, co, ch, gu, and I am also getting undefined variables on them too. now when I unblock the // _helo1 = UH-80 Ghost Hawk ; it kills the script for some reason. I get the hint "CREW SQF IS UP AND RUNNING!";, but that is all, the rest is dead. Thanks for the info about the name UH-80 Ghost Hawk, I was hoping that would solve my problems. I am back to testing! Thanks for your help!
  8. IT07 I tested what you recommended and here are the results. publicVariable "_nameofvehicle"; publicVariable "b_heli_transport_01_f"; _nameOfVehicle = b_heli_transport_01_f; if (driver _nameOfVehicle == Player) then { hint"You are the Pilot"; }; From RPT file. Error in expression <heli_transport_01_f"; _nameOfVehicle = b_heli_transport_01_f; if (driver _name> Error position: <b_heli_transport_01_f; if (driver _name> Error Undefined variable in expression: b_heli_transport_01_f No matter what I tried I could not get it to work. Always keep getting that undefine variable error. I am sure it is on my end, just not sure what I am doing wrong. Lala14 Here are you results. publicVariable "_VehName"; publicVariable "b_heli_transport_01_f"; publicVariable "B_crew_F"; if ((driver _VehName) isKindOf "B_crew_F") then { hint "you are are crew man, you are qualified to drive" }; From RPT, if ((driver _VehName) isKindOf "B_crew_F") then { hi> Error position: <_VehName) isKindOf "B_crew_F") then { hi> Error Undefined variable in expression: _vehname As far as both of those, that undefined variable error is constant. I do not know what to do, but I will keep on trying until I figure out! Thanks for your help!
  9. Thanks guys, I will give those a try! Will post results! Again thanks!
  10. IT07, thanks for replying! Not so much as what positions are taken but when they are taken. You jump in a helo as a pilot, if ( (Vehicle Player) == Vehicle Driver) then {a script will run only for you, the pilot and not some ground pounder 5 km away from your position.}; Same goes for all other positions, Copilot, Crew Chief, Door Gunner, Cargo positions too. I am not sure why this seems to be such a confusing question. Thanks for helping! Hope I cleared up what had you confused!
  11. Thanks for replying! It is not so much to show a hint as it is to run some scripting code. The hint is just a way to confirm that position is being taken and that the script code should run. You said, Not sure what you mean that option has been disabled. Being disabled or not, that would not be the first thing that does not work in arma! To me, it is common for things to not work in arma! I had found this, and yes I know it is for arma 2, thought it might work for 3. Door Gunner Crew Chief this moveInTurret [ch ,[1]] this moveInTurret [ch ,[0]] Pilot Co-Pilot/Cargo this moveInDriver ch this moveInCargo [ch, 0] I would like to be able to run a different scripts for all 4 of those positions when they are taken. I just need to get the syntax correct. This was for arma 2, hoping there was some syntax for 3! if((vehicle player) == driver vehicle _unit) then {}; if((vehicle player) == gunner vehicle _unit) then {}; if((vehicle player) == commander vehicle _unit) then {}; Thanks for the help.
  12. Hello, I used the search, no luck. I am trying to set the enemy officers up with god mode. They are getting killed by their own men. Here is what I have, _unit = _officerE; for [{_loop=0}, {_loop<1}, {_loop=_loop}] do { if(officerE_godmode==1)then { _unit addeventhandler["hit",{_unit setdammage 0}]; _unit addeventhandler["dammaged",{_unit setdammage 0}]; sleep 0.01; hint "OFFICER GOD MODE IS ON"; sleep 2.00; } else { _unit removeEventHandler ["hit",0]; _unit removeEventHandler ["dammaged",0]; sleep 0.01; hint "OFFICER GOD MODE IS OFF"; sleep 2.00; }; sleep 1.00; }; I get the hint "OFFICER GOD MODE IS ON", but you can kill him with 1 shot. I hope there are some scriptors around. Thanks!
  13. cougarxr7

    God mode for AI officer

    If I did that then the Officer will always be in god mode! That is not what I am doing, God mode is to be removed from the officer when certain vars are met. As far as JetlinerX calling my code insane, he has no clue as to what I am doing. Thanks!
  14. cougarxr7

    God mode for AI officer

    So this is what I should do? officerE_godmode.sqf" this allowdamage false; But how does the game engine know which Officer to run that line of code on?
  15. cougarxr7

    God mode for AI officer

    The following code works on my dedicated server. My server name is "ULTIMATE COMBAT", I run the ECS mod only. All others crash my server! You can get it here, http://www.ecsteam.online.fr/index.php?watch=downloads Download: ECS Client version 10150 ECS Client patch version 10151 Try it, you'll be glad you did! I am still in the testing phase with this. "officerE_godmode.sqf" sleep 1; counttowns = (count MissionTowns); currentprog = MissionProgress; OfficersE = [parso2,somso2,cayso2,dolso2,ortso2,corso2,obrso2,bagso2,eposo2,masso1,pitso2]; unit = (OfficersE select currentprog); hint format["%1 %2","MissionTowns =",counttowns]; sleep 3; hint format["%1 %2","MissionProgress =",currentprog]; sleep 3; hint format["%1 %2","OfficerE Name =",unit]; sleep 3; officerE_godmode = 1; unit addeventhandler["hit",{unit setdammage 0}]; unit addeventhandler["dammaged",{unit setdammage 0}]; sleep 3; for [{_loop=0}, {_loop<1}, {_loop=_loop}] do { if(officerE_godmode==1)then { unit setdamage 0; hint "OFFICER GOD MODE IS ON"; sleep 3; }else{ _loop=1 } }; unit removeEventHandler ["hit", 0]; unit removeEventHandler ["dammaged", 0]; hint "OFFICER GOD MODE IS OFF"; sleep 3; Any and all are welcome to check out and play at "ULTIMATE COMBAT"!
  16. cougarxr7

    God mode for AI officer

    Thanks for helping! I am interested in the best way to do this. This is just a way I hoped would work. I am going to test your scripting. I run the "ULTIMATE COMBAT", join sometime when you are playing and you see the server, be glad to show you everything else I've done. UPDATE: It is still not working. I checked on that command "allowDammage", this link says it is obsolete. http://www.ofpec.com/COMREF/index.php?action=details&id=17&game=All Thanks, I will keep at it!
  17. Does anyone know anything about this? "Protocol bin\config.bin/RadioProtocolEN/:" Where is that bin it is refering to? Thanks!
  18. Thought this can be done. Can't remmember where I saw the info of how to do it. Like to have a mission stay at 12 noon at all times. Thanks!
  19. cougarxr7

    Continous time of day.

    Celery, thanks! works great!
  20. cougarxr7

    Server.rpt

    Rommel, 12-12-2008, 11:55 PM < the date you posted this and no one even the devs never answered this! At this time I am in the same position my server RPT is constantly writing those lines and yet I have found only 2 answer . 1. Client: Object 2:9 (type UpdatePositionMan) not found.Happens when you setPos someone (?) (Dedicated server only) link: http://community.bistudio.com/wiki/arma.RPT#Client:_Object_2:9_.28type_UpdatePositionMan.29_not_found. 2. Client: Object 4:28 (type UpdatePositionMan) not found. -- when you create a unit on client computer but it is local to server. Fix: create on server. --Doolittle 01:06, 7 April 2008 (CEST) Fix: create on server < and how would you do that. Instead of letting clients that recruit AI create the AI , we need to figure out how to make the server create the clients AI for the client that is recruiting! I think?? Is Doolittle still around?? Be nice if he could chime in on this one! UPDATE!! Looks like it's the "setpos"! Had 2 files with; "player setPos _spawnPos;" block out those 2 lines and no more "(type UpdatePositionMan) not found."! Now for to find the work around for this.
  21. cougarxr7

    Continous time of day.

    Celery, Thanks for the reply! I did what you said to do. But, I got an error. "type Script. expected Nothing" May I ask this. Would you make the trigger and copy it from the sqm file. Then post it like I did below under code? class Item142 { position[]={10180.531250,139.994995,10155.835938}; activationBy="ANY"; repeating=1; timeoutMax=600.000000; age="UNKNOWN"; expActiv="skiptime -0.1"; class Effects { }; This way there is no room for error. Thanks!
  22. cougarxr7

    Continous time of day.

    This comes close but it is not 100% continous 12 noon! Thanks DaMaan3 for that info! Anyone know of another way?
  23. cougarxr7

    Continous time of day.

    Thanks! Will give that a try! Update! It worked perfectly on host and play. However on dedicated it seemed to move 2.5 minutes then back 5 minutes. here's the trigger code; class Item142 { position[]={10180.531250,139.994995,10155.835938}; activationBy="ANY"; repeating=1; timeoutMax=600.000000; age="UNKNOWN"; expActiv="skiptime -0.1"; class Effects { };
  24. Not sure why this is happening. I believe it has to do with an update/updates. Pilots that eject from an aircraft are not being killed or deleted. Original files use in Killjoys' "EvolutionB2.Sara", "makesu.sqf" and "bury.sqf" makesu.sqf if (not (local server)) exitwith {}; rscripts=rscripts+1; for [{_loop=0}, {_loop<1}, {_loop=_loop}] do { _starts = [ka1,ka2,ka3,ka4]; _poscreate = position (_starts select (round random 3)); _pilot = createGroup (east); "SoldierEPilot" createUnit [position tpos2, _pilot]; "SoldierEPilot" createUnit [position tpos2, _pilot]; _recy = [_pilot,"none",objNull] spawn {[_this select 0,_this select 1,_this select 2] call EVO_gRecy}; //if(isNull (units _pilot select 0)) exitWith {}; _heli = createVehicle ["Su34", _poscreate, [], 100, "FLY"]; _heli setpos [getpos _heli select 0, getpos _heli select 1, 200]; _heli setdir (random 359); _heli engineon true; _vec setVelocity [200, 0, 0]; _sumark = [_heli] execVM "scripts\sumarker.sqf"; (units _pilot select 0) assignAsDriver _heli; (units _pilot select 1) assignAsGunner _heli; (units _pilot select 0) moveInDriver _heli; (units _pilot select 1) moveInGunner _heli; //player moveInGunner _heli; //_pilot setSpeedMode "LIMITED"; _pilot setCombatMode "RED"; {_x addEventHandler ["killed", {handle = [_this select 0] execVM "scripts\bury.sqf"}]} forEach (units _pilot); _heli addEventHandler ["killed", {handle = [_this select 0] execVM "scripts\bury.sqf"}]; _handle = [_pilot] execVM "scripts\flightpath.sqf"; sleep 10.0; waitUntil {not (alive _heli) or isNull (driver _heli)}; if (alive _heli) then {_heli setdammage 1}; sleep 600.0; //10 mins }; bury.sqf _unit = _this select 0; _tag = "none"; _tag = _this select 1; _grp = group _unit; //sleep 600.0; //3 min =180 //sleep 10.0; //3 min =180 _unit removealleventhandlers "killed"; _unit removealleventhandlers "getout"; _unit removealleventhandlers "getin"; if (not (_unit isKindOf "Man")) then { _class = typeOf _unit; _pos = position _unit; _dir = direction _unit; _speed = speed _unit; _vel = velocity _unit; //if (_unit isKindOf "Air") then {sleep 5.0}; {deletevehicle _x} foreach ([_unit] + crew _unit); _vcl = _class createVehicle _pos; _vcl setpos _pos; _vcl setdir _dir; _vcl setVelocity _vel; _vcl setFuel 0.0; _vcl setDamage 1; sleep 300.0; deletevehicle _vcl; }; if (_unit isKindOf "Man") then { sleep 300.0; if( not (isnull _unit)) then {server action ["HIDEBODY", _unit]}; }; You can't use makesu.sqf file without making code changes or at lest I can't. After making changes it will work, here it is. modifided makesu.sqf if (not (local server)) exitwith {}; rscripts=rscripts+1; for [{_loop=0}, {_loop<1}, {_loop=_loop}] do { _starts = ["EnemyAir01","EnemyAir02","EnemyAir03","EnemyAir04"]; _poscreate = getmarkerpos (_starts select (round random 3)); _pilot = createGroup (east); "SoldierEPilot" createUnit [position tpos2, _pilot]; "SoldierEPilot" createUnit [position tpos2, _pilot]; _heli = createVehicle ["Mi17", _poscreate, [], 100, "FLY"]; _heli setpos [getpos _heli select 0, getpos _heli select 1, 200]; _heli flyinheight 100; _heli setdir (random 359); _heli engineon true; _vec setVelocity [200, 0, 0]; _sumark = [_heli] execVM "scripts\sumarker.sqf"; (units _pilot select 0) assignAsDriver _heli; (units _pilot select 1) assignAsCargo _heli; (units _pilot select 0) moveInDriver _heli; (units _pilot select 1) moveInCargo _heli; _heli setDamage .6; sleep 6; _pilot setCombatMode "RED"; {_x addEventHandler ["killed", {handle = [_this select 0] execVM "scripts\bury.sqf"}]} forEach (units _pilot); _heli addEventHandler ["killed", {handle = [_this select 0] execVM "scripts\bury.sqf"}]; _handle = [_pilot] execVM "scripts\flightpath.sqf"; sleep 10.0; waitUntil {not (alive _heli) or isNull (driver _heli)}; if (alive _heli) then {_heli setdammage 1}; sleep 30.0; //10 mins }; If you shoot the helo and kill it along with both pilot, no problem. If they eject, 1 will be killed/deleted/removed in time. The other pilot will wonder the map going to a wpt 3,000 meters away. OK no problem lets kill/delete/remove this pilot. new moddified "makesu.sqf" if (not (local server)) exitwith {}; rscripts=rscripts+1; for [{_loop=0}, {_loop<1}, {_loop=_loop}] do { _starts = ["EnemyAir01","EnemyAir01","EnemyAir01","EnemyAir01"]; _poscreate = getmarkerpos (_starts select (round random 3)); _pilot = createGroup (east); _unit1 = _pilot createUnit ["SoldierEPilot",getmarkerpos "centerp", [], 300, "NONE"];Sleep GlobalSleep; _unit2 = _pilot createUnit ["SoldierEPilot",getmarkerpos "centerp", [], 300, "NONE"];Sleep GlobalSleep; [_unit1,_unit2] join _pilot; _heli = createVehicle ["Mi17", _poscreate, [], 000, "NONE"];Sleep GlobalSleep; _heli setpos [getpos _heli select 0, getpos _heli select 1, 000]; _heli flyinheight 000; _heli setdir (random 359); _heli engineon true; _sumark = [_heli] execVM "scripts\sumarker.sqf"; (units _pilot select 0) assignAsDriver _heli; (units _pilot select 0) moveInDriver _heli; (units _pilot select 1) assignAsCargo _heli; (units _pilot select 1) moveInCargo _heli; _pilot setCombatMode "RED"; {_x addEventHandler ["killed", {handle = [_this select 0] execVM "scripts\bury.sqf"}]} forEach (units _pilot); _heli addEventHandler ["killed", {handle = [_this select 0] execVM "scripts\bury.sqf"}]; _spawne = [_heli] spawn {[_this select 0] call idelSVEC}; _handle = [_pilot] execVM "air\DMi17_rockets_RUflightpath.sqf"; sleep 1; waitUntil {(speed _heli == 0) or not (alive _heli)}; sleep 30; _heli setDamage 1; Sleep 10.0; (units _pilot select 0) setDamage 1; (units _pilot select 1) setDamage 1; sleep 40.0; }; With the code above this is the error it causes! Error in expression <ot select 0) setDamage 1; (units _pilot select 1) setDamage 1; sleep 40.0; }; > Error position: <select 1) setDamage 1; sleep 30.0; }; > Error Zero divisor That error only happens when you kill the helo with both pilots in the helo. Blocking out "//" the helo "addEventHandler", all errors stop, as well as the helo getting removed from the map. If they (Pilots) eject before the helo is killed, then no error and both pilots are killed/deleted/removed in time! I hope someone has an answer, I'm really curious as to why this is happening.
  25. My bad! my custom makesu.sqf if (not (local server)) exitwith {}; rscripts=rscripts+1; for [{_loop=0}, {_loop<1}, {_loop=_loop}] do { _starts = ["EnemyAir01","EnemyAir01","EnemyAir01","EnemyAir01"]; _poscreate = getmarkerpos (_starts select (round random 3)); _pilot = createGroup (east); _unit1 = _pilot createUnit ["SoldierEPilot", getmarkerpos "centerp", [], 300, "NONE"];Sleep GlobalSleep; _unit2 = _pilot createUnit ["SoldierEPilot", getmarkerpos "centerp", [], 300, "NONE"];Sleep GlobalSleep; [_unit1,_unit2] join _pilot; //hint format ["%1 %2 %3",_pilot,_unit1,_unit2]; //sleep 3; _heli = createVehicle ["Mi17", _poscreate, [], 000, "FLY"];Sleep GlobalSleep; _heli setpos [getpos _heli select 0, getpos _heli select 1, 200]; _heli flyinheight 100; _heli setdir (random 359); _heli engineon true; _sumark = [_heli] execVM "scripts\sumarker.sqf"; (units _pilot select 0) assignAsDriver _heli; (units _pilot select 0) moveInDriver _heli; (units _pilot select 1) assignAsCargo _heli; (units _pilot select 1) moveInCargo _heli; _heli setDamage .6; sleep 6; _pilot setCombatMode "RED"; {_x addEventHandler ["killed", {handle = [_this select 0] execVM "scripts\bury.sqf"}]} forEach (units _pilot); _heli addEventHandler ["killed", {handle = [_this select 0] execVM "scripts\bury.sqf"}]; _recy = [_pilot,"none",objNull] spawn {[_this select 0,_this select 1,_this select 2] call EVO_gRecy}; _handle = [_pilot] execVM "air\DMi17_rockets_RUflightpath.sqf"; sleep 1; waitUntil {(speed _heli == 0) or not (alive _heli)}; sleep 2; _heli setDamage 1; sleep 60; if (alive (units _pilot select 0)) then {(units _pilot select 0) setdammage 1}; //(units _pilot select 0) setDamage 1; sleep 3; if (alive (units _pilot select 1)) then {(units _pilot select 1) setdammage 1}; //(units _pilot select 1) setDamage 1; sleep 3; //deletevehicle _heli; sleep 30.0; //15 mins }; //hint format["%1 %2",_unit,_type]; {_me = _this select 0; _him = _this select 1; //_spawne = [_heli] spawn {[_this select 0] call idelSVEC}; // if (alive (units _pilot select 0)) then {(units _pilot select 0) setdammage 1}; if (alive (units _pilot select 1)) then {(units _pilot select 1)> That was from the wrong file I used. The many of which I tried to troubleshoot this with. Sorry! I believe you are correct in why it is happening! I've tried alot of different ways and had no luck! I saw in the hints, the game did not even see the 2nd pilot! But can kill him if he ejects from the helo in time??? Now how do we fix it??
×