Jump to content

Scatoogle

Member
  • Content Count

    16
  • Joined

  • Last visited

  • Medals

Community Reputation

1 Neutral

About Scatoogle

  • Rank
    Private First Class
  1. Scatoogle

    DoMove not working

    Neither of them work -_-
  2. Scatoogle

    DoMove not working

    BList has its own Game Logic and I removed the use of _HMMWV to simplify the logic. It is designed to attack convoys so that it may not get the car infront but it will get the one in the back. However, All of these work. I want to know how to may the bomber move.
  3. I have searched and searched and searched. For some reason I have a script that won't work. The Idea is that the Suicide Bomber should run at you however he doesn't run. I have debugged and had it return values and everything is working as it should like perfection but it won't make the AI move. Sleep 5; _i=0; _Exit = 0; Hint format ["%1 %2 %3", GetPos _Unit1,GetPos _DeadThing, _Exit]; _Unit1 = _this Select 0; _HMMWV = [HMMWV1, HMMWV2, HMMWV3, HMMWV4, HMMWV5, HMMWV6, HMMWV7, HMMWV8, HMMWV9, HMMWV10, SOV1, SOV2, SOV3, SOV4, SOV5, SOV6, SOV7, SOV8, SOV9, SOV10]; _DeadThing = [0,0,0]; While {_Exit == 0} Do { If (_i < 30) Then {_i=_i+1}; If (_i >= 30) Then {_i=0}; _NearUnit = (position _Unit1) nearEntities 15 Select _i; _NearVehicle = (position _Unit1) nearObjects ["Car", 15] Select _i; If (_NearUnit in BList) Then { _Exit = 1; _DeadThing = _NearUnit; }; }; Hint "Loop Done"; _BombLocation = CreateMarker["BombLocation1", Position _DeadThing]; _Pos = GetMarkerPos "BombLocation1"; _Unit1 Move [((_Pos)select 0), ((_Pos)select 1)]; "BombLocation1" setMarkerType "Warning"; _Exit = 0; While {_Exit == 0} Do { _Dist = (_Unit1 Distance (getMarkerPos "BombLocation1")); Hint format ["%1 %2 %3 %4 %5", GetPos _Unit1,GetPos _DeadThing, _Exit, _pos, _Dist]; if (_Dist < 10) Then { hint "Allah Hu Akbar"; Sleep 2; _SB = "R_80mm_HE" CreateVehicle (GetPos _Unit1); }; }; Nul = [This]execVM"SB.sqf";
  4. You Call a script and get a return variable..... like a Quadric Formula Class.
  5. No I mean how to I request a variable from another class or script. like Script one has Varible A this is = to 5. And I what to know what Variable A is equal to.
  6. I was wondering how I could request a varible from a script. Kind like this public static void main (String[] args){ System.Out.Print(Hello()); } Public Static String Hello (){ RetVal = "Hello"; } I don't think SQF is object oriented so I don't know how to call a variable like in Java or CPP because there are no classes. If you know of any Tuts that would delve deep into Arma Scripting it would be much appreciated. And I did google how to do it but they were talking Arma 2 Scripting and I don't speak that fluently yet.
  7. All the values have been passed that need to be passed. Trust me I have tested them.
  8. The problem isn't that the values aren't being passed. The problem is that my if then with _missionactive==0 isn't working. -_-
  9. ActionID Comment "Determine which addaction has been selected"; _Selector = _this Select 2; UsedBy Comment "Determine the players name"; _User = _this Select 1; Target Comment "Determine which Port Man has been selected"; _UserCall = _this Select 0;
  10. They are [code} Hint Format ["%1 1", _Selector]; []ExecVM "PickUpTruckDM.sqf"; sleep 1; Hint "PickUp"; [/code] When I had selected them the Hint showed up. Now I am at know it has something to do with the If-Then in the BigTruckDM.sqf because it is the only thing that will not execute when I bypass the DeliveryMission.sqf script.
  11. DeliveryMission.sqf _DeliveryStarts = [DS1]; _DeliveryPoints = [DP1, DP2, DP3, DP4, DP5, DP,6, DP7, DP8]; Comment "Determine which addaction has been selected"; _Selector = _this Select 2; Comment "Determine the players name"; _User = _this Select 1; Comment "Determine which Port Man has been selected"; _UserCall = _this Select 0; Hint"Boke 1"; if (_Selector == 2) then { Hint Format ["%1 2", _Selector]; Hint "Car Delivery Started"; }; if (_Selector == 1) then { Hint Format ["%1 1", _Selector]; []ExecVM "PickUpTruckDM.sqf"; sleep 1; Hint "PickUp"; }; Comment "if the Cargo Truck Delivery Mission was selected go through If-Then statement."; if (_Selector == 0) then { Hint Format ["%1 0", _Selector]; []ExecVM "BigTruckDM.sqf"; sleep 1; Hint "BigTruck"; }; comment "Produce a random number called _RandomDeliveryTruck"; _RandomDeliveryTruck = -1; _RandomDeliveryTruck = round random 7; comment "If the mission is still active inform player"; if (MissionActive == 1) then { Hint "A DeliveryMission is Active!"; }; comment "Use the random number to place a marker at a selected posistion based on gamelogic"; if (MissionActive != 1) Then { Hint "Mission is now Active!"; if (_RandomDeliveryTruck == 0) then { _DM = createMarker ["DeliveryMission", position DP1]; "DeliveryMission" setMarkertype "Flag"; }; if (_RandomDeliveryTruck == 1) then { _DM = createMarker ["DeliveryMission", position DP2]; "DeliveryMission" SetMarkerType "Flag"; }; if (_RandomDeliveryTruck == 2) then { _DM = createMarker ["DeliveryMission", position DP3]; "DeliveryMission" SetMarkerType "Flag"; }; if (_RandomDeliveryTruck == 3) then { _DM = createMarker ["DeliveryMission", position DP4]; "DeliveryMission" SetMarkerType "Flag"; }; if (_RandomDeliveryTruck == 4) then { _DM = createMarker ["DeliveryMission", position DP5]; "DeliveryMission" SetMarkerType "Flag"; }; if (_RandomDeliveryTruck == 5) then { _DM = createMarker ["DeliveryMission", position DP6]; "DeliveryMission" SetMarkerType "Flag"; }; if (_RandomDeliveryTruck == 6) then { _DM = createMarker ["DeliveryMission", position DP7]; "DeliveryMission" SetMarkerType "Flag"; }; if (_RandomDeliveryTruck == 7) then { _DM = createMarker ["DeliveryMission", position DP8]; "DeliveryMission" SetMarkerType "Flag"; }; comment "Set mission active"; MissionActive = 1; }; Here are the scripts but commented so that you can see what is going on as the game moves through the script.
  12. The Referenced scripts have their own Hint but they don't show. This allowDamage False; This disableAI "ANIM"; This disableAI "MOVE"; This addAction ["Cargo Truck Delivery Mission", "DeliveryMission.sqf","",2]; This disableAI "MOVE"; This addAction ["PickUp Truck Delivery Mission", "DeliveryMission.sqf","",1]; This disableAI "MOVE"; This addAction ["Car Delivery Mission", "DeliveryMission.sqf","",0];
  13. Boke 1 confirms that it has entered the IF-Then _this ExecVM "PickUpTruckDM.sqf"; sleep 1; Hint "PickUp"; These three lines confirm that the If-Then statement has been executed, but it will not allow the program to execute the script it just skips it.
  14. This Script is called through an Add Action on a person that is already there. The Problem isn't that the If-Then isn't working it is that the ExecVM I tried _this = []ExecVM "PickUpTruckDM.sqf"; but it just wont run the script.
  15. I have a script that for some reason will not run the next script. Delivery Mission _Selector = _this Select 2; _User = _this Select 1; _UserCall = _this Select 0; Hint"Boke 1"; if (_Selector == 2) then { Hint Format ["%1 2", _Selector]; Hint "Car Delivery Started"; }; if (_Selector == 1) then { Hint Format ["%1 1", _Selector]; _this ExecVM "PickUpTruckDM.sqf"; sleep 1; Hint "PickUp"; }; if (_Selector == 0) then { Hint Format ["%1 0", _Selector]; _this ExecVM "BigTruckDM.sqf"; sleep 1; Hint "BigTruck"; }; Big Truck DM _RandomDeliveryTruck = -1; _RandomDeliveryTruck = round random 7; _Test = compile preprocessfile "PickUpTruckDM.sqf"; _TestActive = [MissionActive]_Test; Hint format["%1", _TestActive]; Sleep 1; if (MissionActive == 1) then { Hint "A DeliveryMission is Active!"; }; if (MissionActive != 1) Then { Hint "Mission is now Active!"; if (_RandomDeliveryTruck == 0) then { _DM = createMarker ["DeliveryMission", position DP1]; "DeliveryMission" setMarkertype "Flag"; }; if (_RandomDeliveryTruck == 1) then { _DM = createMarker ["DeliveryMission", position DP2]; "DeliveryMission" SetMarkerType "Flag"; }; if (_RandomDeliveryTruck == 2) then { _DM = createMarker ["DeliveryMission", position DP3]; "DeliveryMission" SetMarkerType "Flag"; }; if (_RandomDeliveryTruck == 3) then { _DM = createMarker ["DeliveryMission", position DP4]; "DeliveryMission" SetMarkerType "Flag"; }; if (_RandomDeliveryTruck == 4) then { _DM = createMarker ["DeliveryMission", position DP5]; "DeliveryMission" SetMarkerType "Flag"; }; if (_RandomDeliveryTruck == 5) then { _DM = createMarker ["DeliveryMission", position DP6]; "DeliveryMission" SetMarkerType "Flag"; }; if (_RandomDeliveryTruck == 6) then { _DM = createMarker ["DeliveryMission", position DP7]; "DeliveryMission" SetMarkerType "Flag"; }; if (_RandomDeliveryTruck == 7) then { _DM = createMarker ["DeliveryMission", position DP8]; "DeliveryMission" SetMarkerType "Flag"; }; MissionActive = 1; };
×