Jump to content

L.Trale

Member
  • Content count

    45
  • Joined

  • Last visited

  • Medals

  • Medals

Community Reputation

10 Good

2 Followers

About L.Trale

  • Rank
    Lance Corporal

core_pfieldgroups_3

  • Interests
    Scripting, Making Missions

Profile Information

  • Gender
    Male
  • Location
    United States

Contact Methods

  • Biography
    Dev for FapTactical Studios.
  • Youtube
    uscoastgaurd
  • Steam url id
    uscoastgaurd

Recent Profile Visitors

303 profile views
  1. Ah, thank you very much for your help guys :)
  2. Paradrop Boxes

    You could attach the crate to the plane, detect when the plane is near the waypoint, and then detach the crate when its near. Put this in the init of the crate and name your crate something like "Crate1" and name the plane something like "Plane". this disableCollisionWith plane; //Just in case they collide, no boom this attachTo [plane,[0,0,-1]]; //attach it to the plane, fiddle with the position You can use a trigger to make the plane drop the crate. Put this in the condition field of the trigger: Plane in thisList; Put this in the act field of the trigger: detach Crate1; //off it goes Chute = "B_Parachute_02_F" createVehicle position Crate1; //Create the chute Chute attachTo [Crate1, [0,0,1]]; // attach the chute to the crate You'll have to mess around with it, its not tested but should work.
  3. I did look into switch case, but It gives the same results. The objects are correct, the saw part is to check if the item the player has in their hands is a saw. I'm trying to get it to check in this order: 1. Does the player have an item in their hands and the belt slot is empty? Yes (go to 1a), No (go to 2) 1a. Does the player have a Hammer in their hands? Yes (Put item in belt), No (go to 1b) 1b. Does the player have a Saw in their hands? Yes (Put item in belt) 2. Does the player have no item in their hand and a Hammer in their belt? Yes (Take the item out of belt and into hand), No (go to 2a) 2a. Does the player have no item in their hand and a Saw in their belt? Yes (Take the item out of belt and into hand)
  4. So you're just trying to change the accuracy of the units with RPGs? Heres a few things I found: http://www.armaholic.com/forums.php?m=posts&q=22942 https://community.bistudio.com/wiki/setSkill_array Hope this helps
  5. Hello, I'm trying to make a script that uses multiple if then else statements, but for some reason it won't change a variable. (Messy code, sorry, still using notepad :D ) //Inventory Slot 1. _Item = nearestObject [player, "Thing"]; if ((HandInUse) && (BeltSlot1 == "isEmpty") && (_Item isKindOf "Land_Hammer_F")) then { //HandInUse is a bool variable on the player, BeltSlot1 is a string on the player _Item setVariable ["_isInCargo", true]; //_isInCargo is a bool variable on the object, same with below. _Item setVariable ["_InHand", false]; BeltSlot1 = typeOf ItemInHand; //Setting the value of BeltSlot1 to the detected item in players hand. ItemInHand is on the player player playMove "AmovPercMstpSrasWpstDnon_AmovPercMstpSnonWnonDnon"; sleep 0.9; Tool = 0; //Located on player HandInUse = false; sleep 0.1; _Item attachTo [player, [0.2,0,0], "Pelvis"]; exit; } else { if ((HandInUse) && (BeltSlot1 == "isEmpty") && (_Item isKindOf "Land_Axe_F")) then { //If its not hammer time, check if its a saw _Item setVariable ["_isInCargo", true]; _Item setVariable ["_InHand", false]; BeltSlot1 = typeOf ItemInHand; player playMove "AmovPercMstpSrasWpstDnon_AmovPercMstpSnonWnonDnon"; sleep 0.9; Tool = 0; HandInUse = false; sleep 0.1; _Item attachTo [player, [0.2,0,0], "Pelvis"]; exit; } else { if ((!HandInUse) && (BeltSlot1 == "Land_Hammer_F") && (_Item isKindOf "Land_Hammer_F")) then { //If you've got an item on your belt, take it into your hands _Item setVariable ["_isInCargo", false]; _Item setVariable ["_InHand", true]; BeltSlot1 = "isEmpty"; HandInUse = true; //Where it goes south. Won't change this to true for some reason? player playMove "AmovPercMstpSrasWpstDnon_AmovPercMstpSnonWnonDnon"; sleep 0.9; Tool = 1; sleep 0.1; _Item attachTo [player, [0,0,0], "righthandmiddle1"]; exit; } else { if ((!HandInUse) && (BeltSlot1 == "Land_Saw_F") && (_Item isKindOf "Land_Saw_F")) then { //same as above, except for Saw _Item setVariable ["_isInCargo", false]; _Item setVariable ["_InHand", true]; BeltSlot1 = "isEmpty"; HandInUse = true; player playMove "AmovPercMstpSrasWpstDnon_AmovPercMstpSnonWnonDnon"; sleep 0.9; Tool = 3; sleep 0.1; _Item attachTo [player, [0,0,0], "righthandmiddle1"]; exit; }; }; }; }; I know the code isn't very efficient, I'm just experimenting for the most part. The problem is that everything else works except for changing the "HandInUse" variable. Any ideas on whats going on? Update: I've neatened up the code a little bit to make it a little bit less of an eye sore and changed some things around, but still have the same result. I'm calling this from the init, when the player presses the 1 key (shown below). waituntil {!isnull (finddisplay 46)}; (findDisplay 46) displayAddEventHandler ["KeyDown","_this select 1 call MY_KEYDOWN_FNC;false;"]; MY_KEYDOWN_FNC = { switch (_this) do { //Key 1 case 2: { nul = [] execVM "Mechanics\Inventory\Belt_Slot1.sqf"; }; }; }; Updated Code: //File: Belt_Slot1.sqf //Desc: Action for putting item on tool belt. _Item = nearestObject [player, "Thing"]; if ((HandInUse) && (BeltSlot1 == "isEmpty")) then { if (_Item isKindOf "Land_Hammer_F") then { _Item setVariable ["_isInCargo", true]; _Item setVariable ["_InHand", false]; BeltSlot1 = typeOf ItemInHand; player playMove "AmovPercMstpSrasWpstDnon_AmovPercMstpSnonWnonDnon"; sleep 0.9; Tool = 0; HandInUse = false; sleep 0.1; _Item attachTo [player, [0.2,0,0], "Pelvis"]; } else { if (_Item isKindOf "Land_Axe_F") then { _Item setVariable ["_isInCargo", true]; _Item setVariable ["_InHand", false]; BeltSlot1 = typeOf ItemInHand; player playMove "AmovPercMstpSrasWpstDnon_AmovPercMstpSnonWnonDnon"; sleep 0.9; Tool = 0; HandInUse = false; sleep 0.1; _Item attachTo [player, [0.2,0,0], "Pelvis"]; }; }; } else { if ((!HandInUse) && (BeltSlot1 == "Land_Hammer_F")) then { _Item setVariable ["_isInCargo", false]; _Item setVariable ["_InHand", true]; BeltSlot1 = "isEmpty"; HandInUse = true; player playMove "AmovPercMstpSrasWpstDnon_AmovPercMstpSnonWnonDnon"; sleep 0.9; Tool = 1; sleep 0.1; _Item attachTo [player, [0,0,0], "righthandmiddle1"]; } else { if ((!HandInUse) && (BeltSlot1 == "Land_Saw_F") && (_Item isKindOf "Land_Saw_F")) then { _Item setVariable ["_isInCargo", false]; _Item setVariable ["_InHand", true]; BeltSlot1 = "isEmpty"; HandInUse = true; player playMove "AmovPercMstpSrasWpstDnon_AmovPercMstpSnonWnonDnon"; sleep 0.9; Tool = 3; sleep 0.1; _Item attachTo [player, [0,0,0], "righthandmiddle1"]; }; }; };
  6. I'm having a problem selecting an option for a module. I'm trying to use the Zeus Game Master Module, and trying to change the default addons to "NONE", but when I select it and select OK, it sets the default addons to default. It works for every other option except for "NONE". Anyone else having problems with Eden Dialog?
  7. Help with Dog Script

    Thanks for the heads up. In the meantime, you can use this to stop the looping animal animations: _animal disableAI "ANIM";
  8. Hello, I've been using this script for a while and back in the Alpha/Beta it worked properly. attack = false; "Alsatian_Sandblack_F" createUnit [getPos player, group player]; dog = nearestobject [getpos player,"animal"]; dog setVariable ["BIS_fnc_animalBehaviour_disable", true]; [dog] join grpNull; null=[] spawn { while {alive dog} do {waituntil {!attack}; sleep 2; dog domove getpos player}}; The dog doesn't follow the player anymore like it used to. After doing some research, I found this: dog setVariable ["BIS_fnc_animalBehaviour_disable", true]; This is supposed to override the default AI of the dog. This to is not working. I've tried to disable the dogs animations and FSM but no luck, still the same problem. I've also tried using createAgent instead of createUnit.
  9. Hello, I'm making a mission which includes a lot of Arrays. So I made this simple script: cost=1; yourmoney = myVariable2; if (yourmoney < cost) then {hint "You don't have any Tomato Seeds!"} else { yourmoney = yourmoney - cost;hint format ["%1 Tomato Seed(s) Remaining", myVariable2]; Plant = "Land_BottlePlastic_V1_F" createVehiclelocal position player; Plant attachTo [item, [0, 0, 0] ]; player playMove "AinvPknlMstpSnonWnonDnon_1"; sleep 1; deleteVehicle Item; Detach Plant; Plant addAction ["Check State", "Actions\CheckState.sqf"]; execVM "Plant_init\Tomato_init.sqf"; myVariable2 = yourmoney; }; It works great but there is only one problem; If you use the script more than once, it breaks. i.e I plant a Tomato, then I plant another one. Everything is good until this next part: hint "You've planted a Tomato Plant."; sleep 10; PlantS2 = "Sign_Pointer_F" createVehiclelocal position Plant; PlantS2 attachTo [Plant, [0, 0, 0.2] ]; sleep 20; DeleteVehicle PlantS2; PlantS3 = "Sign_Pointer_Pink_F" createVehiclelocal position Plant; PlantS3 attachTo [Plant, [0, 0, 0.2] ]; sleep 20; DeleteVehicle PlantS3; PlantS4 = "Sign_Pointer_Yellow_F" createVehiclelocal position Plant; PlantS4 attachTo [Plant, [0, 0, 0.2] ]; sleep 30; DeleteVehicle PlantS4; PlantS5 = "Sign_Pointer_Green_F" createVehiclelocal position Plant; PlantS5 attachTo [Plant, [0, 0, 0.2] ]; Plant addAction ["Harvest Tomato", "Actions\Harvest_Tomato.sqf"]; Then the only one plant grows, and the other just sits there. I've tried createVehiclelocal, but no luck. I've also tried to use private arrays: private ["Plant", "PlantS2", "PlantS3", "PlantS4"]; [code]Any help? Thanks.
  10. _Stab = if (player == _Selector) then {player addaction ["STAB", "Stab.sqf"]} else {}; is working fine, but I might need this for something else. Thanks for the help! :D
  11. So I should add something similar to if (_Selector == this) then {_Selector addaction ["STAB", "Stab.sqf"]} else {}; Think I've gotten the answer: _Stab = if (player == _Selector) then {player addaction ["STAB", "Stab.sqf"]} else {}; It seems to work, but I'll have to do more testing.
  12. Yes. The problem is that any unit can walk up to the "_Selector" and use the addaction. I've tried _Stab = _Selector addAction ["STAB", "Stab.sqf", nil, 1.5, True, True, "", "this == _Selector"]; but It doesn't work.
  13. Yes, they are the same names.
  14. I've done this, still doesn't work. I've tried messing around with the parameters for addaction but no luck. Thanks for the help though :bounce3:
×