Jump to content

Erwin23p

Member
  • Content Count

    142
  • Joined

  • Last visited

  • Medals

Everything posted by Erwin23p

  1. Hello, after almost 10 years playing Arma 3 and following these forums I'm happy to create my first topic in this section. I bring you a small mod but that I always wished I had in Arma 3, Mh9 Advanced Cockpit Interaction uses Hatchet Framework to bring life to the Mh9 cockpit, for now it is only working for the Advanced Flight Model. The main aspect I was the most interested in is the advanced startup, there is no damage yet as this is an alpha, but I'm already working on trying to simulate TOT (Turbine Outlet Temperature) to have some melting turbines. Fow now just keep an eye on N1 and you'll be fine. Mh9 Advanced Cockpit Interaction My plans are to bring more Arma 3 helicopters to be interactive, I want to try to make some sound modifications because now the default sound acts weird during startup. Thanks!
  2. Hello, knowsAbout can also be used by a group object, and for the value, when an AI sees a player it usually goes up from 1 to 4 directly that is the maximum according to the knowsAbout wiki. You could use it this way in your script: if (_ReconTeams knowsAbout player > 1) then { // your code when the group detects the player }; Try it and play with the value, 2 should work fine too.
  3. Hi, while exploring some public missions to learn, I have come around custom classes defined with custom names and it's variables, it was inside a github I found online while looking for extdb3/sql info. Though not related to data base and sql, this could come handy for something I have planned, I looked on the biki and on google but found no info on this, so what is the use of this? Can I declare my own classes to use with other scripts? Could these classes have it's own functions? For example, could I do a class named base, with variables like position, markers, garrison and faction, and then declare various bases? Or, one class named bases with inside the class of each base?
  4. Erwin23p

    Custom config classes

    Would this be a good way to use configs? it's a mission with different jobs and each job has several tasks. _job is a string variable. params ["_job"]; private ["_taskList","_task","_missionFnc","_taskInfo"]; _taskList = getArray (missionConfigFile >> "Jobs" >> _job >> "tasks"); _task = selectRandom _taskList; _missionFnc = getText (missionConfigFile >> "Tasks" >> _task >> "function"); _taskInfo = call compile _missionFnc; _taskInfo;
  5. Erwin23p

    Custom config classes

    Thanks a lot, I will have to study that to absorb all that knowledge, so, in a big mission or campaign the usefulness of this is to set up some non editable classes with non editable variables? And, being able to access it over the whole place? Sorry I didn't get the usability.
  6. Erwin23p

    AI Deaths (Editor)

    If by statistics you mean how many AI killed in a mission, TAG_aiKilled is a variable, in this case will have a value of a number, 0 at the start of the mission and 10 after killing 10 AIs. There are plenty of ways to show the value of TAG_aiKilled, easiest way but not subtle at all would be to hint it with each kill: TAG_aiKilled = 0; addMissionEventHandler ["EntityKilled", { params ["_unit"]; if !(isPlayer _unit) then { TAG_aiKilled = TAG_aiKilled + 1; hint format ["Number of AI killed: %1",TAG_aiKilled]; }; }]; With this line added, at each AI death a hint will appear with how many AI killed so far, as I say this would work well for debugging but not for a mission. Now it's down to you on how you want to display this.
  7. Erwin23p

    Open map and set waypoint

    Did you try the edited code above?
  8. Erwin23p

    Open map and set waypoint

    I'm not sure, but I think getMarkerPos requires the name of the marker, not the marker itself so in this case "LandingPosition". Syntax: getMarkerPos markerName Parameters: markerName: String EDIT: You could simplify your script by skipping all the marker stuff if you don't need it by using directly the parameter "_pos" from "onMapSingleClick". onMapSingleClick { _pilot doMove _pos; openMap false; onMapSingleClick ""; //This line concludes this command code }; And by the way, when you use a function, a command or something new try to read the community wiki about it, it gives you useful info like for example that the line onMapSingleClick "" concludes the code inside this brackets, so this line should be the last inside this command code.
  9. For something simple as this I don't recommend your using a mod, I prefer doing some coding/scripting to make something work and having a "cleaner" mission/scenario but nonetheless that mod should do exactly what it says without the need of activating anything. Does the mod work on the campaign or other scenarios of Arma? Maybe the mod is not loaded correctly. Going for the scripting solution, you could start by trying to apply that code in the debug console in the editor pause menu: paste the code in the console, and press local exec: "player enableStamina false" Sorry crappy res 😂 If this script does what you what, now it's time to see the best way to apply this to your mission, is this for a short time of your mission, after something happens or more easily, the whole mission? Let's say it's for your whole mission, first create the mission on the editor and most important save it, for this example the map is good old Stratis and we name the mission "MyMission". Then go to "Documents/Arma 3/missions" and search the folder corresponding to the name you saved your mission in the editor, a dot and the map in which the mission is, in this case the folder for our mission is "MyMission.Stratis". Now, in this file is where you will have all your files, configs and scripts for this only mission, for now you should only have a mission.sqm that is the Arma 3 file for everything you have placed in the editor including triggers, modules, options, etc. So let's create in the mission folder a text document and add in the code "player enableStamina false;". This is our "init.sqf", similar to "InitPlayerLocal.sqf" but used in SP scenarios, this file automatically executes all the code inside at the start of the mission, and to wrap it up just save it as "init.sqf" (make sure you have file extension visible in file explorer) and with this, when you load up your mission in the editor and try it your player shouldn't run out of stamina anymore. Another tip, in the launcher enable "showscripterror", this will enable Arma to help you figure out if there is anything wrong with your code. Good luck!
  10. Erwin23p

    Open map and set waypoint

    Hi, you can use onMapSingleClick: e.g. : openMap true; hint "Select on the map the designated position"; onMapSingleClick { //Inside here code to execute when clicked on the map heloWaypoint = createMarker ["LandingPosition", _pos]; heloWaypoint setMarkerShape "ICON"; heloWaypoint setMarkerType "hd_pickup"; "LandingPosition" setMarkerPos _pos; onMapSingleClick ""; }; This script above will open the map, and when you click on the map it will create a "LandingPosition" marker where you clicked.
  11. Don't want to sound rude, but he explains everything in the post and try to read the right side description of what each line of code does, because this would be a too long post to explain it, so if you want I can give you a hand through discord.
  12. Erwin23p

    Apply to all units

    You could change the condition of the while loop. //Before the loop: _timer = 0; //Loop condition: _timer < 300 //After the sleep: _timer = _timer + 1; but, I suggest you use a spawn when the unit is touching ground, because you will mess with the timer. if (isTouchingGround _x) then { [] spawn { sleep 5; _x allowDamage true; }; };
  13. Erwin23p

    Apply to all units

    You could make the script work on only the first minutes when the units are dropping, or if you wanna go advanced, make a script that detects if the unit is para dropping and activate the script and once the unit is on the ground, disable the script.
  14. Erwin23p

    playSound3D Help...

    Remember that if a player gets in, and then after a few seconds another gets in, the trigger will reproduce again the sound over the one already playing, so maybe use some variable and for the loop you could spawn a simple for loop in the trigger onAct with a sleep command: But then, if the sound should execute only one time and keep sounding for the time you want, don't make it repeatable.
  15. Erwin23p

    Spectating without Spoiling

    You should check the end game spectator mode and BIS_fnc_EGSpectator. I didn't try it but it should be easy to configure it to only allow first or third person spectating.
  16. Erwin23p

    Apply to all units

    For sure there is a way, but remember that the condition cycles for all units each frame in a zone or maybe the whole mission so find a way to limit the usage of this... For example, if you want to make a damaged ship spawn units make only units near that ship or something like that. just add this to the init.sqf. I tried this and it's pretty laggy but it works, I recommend using another kind of condition, or maybe an array to limit the usage of this script, or raise the sleep to 5.
  17. Erwin23p

    playSound3D Help...

    I think what is wrong is the other arguments: playSound3D [filename, soundSource, isInside, soundPosition, volume, soundPitch, distance] so, 3rd element should be a boolean, not an array, 4th should be the position where you want the sound to source from, in your case if it's the radio: getPosASL radio 5th, is an integrer, is the volume: Default: 1 Maximum value: 5 6 is another integrer, is the pitch: 1: Normal, 0.5: Darth Vader, 2: Chipmunks, etc. Default: 1 and last the one where you set 15, is the distance: How far is sound audible (0 = no max distance) Default: 0. So your function should look something like this: playSound3D [MISSION_ROOT + "soundz\radio.wav", radio, false, getPosASL radio, 1, 1, 15]; Now it should work.
  18. Erwin23p

    playSound3D Help...

    From what I've read, I think playSound3D and drawIcon3D doesn't look for the file in your mission directory but in the game directory or another more general one... Well what KK did, is give us a simple tool to recover that path and tell Arma easily where our sound or/and picture is. First you need to create a function in the init.sqf, this function will automatically look for the path of the mission and return a valid path: MISSION_ROOT = call { private "_arr"; _arr = toArray __FILE__; _arr resize (count _arr - 8); toString _arr }; now, each time you use "MISSION_ROOT" it will run that code and return a good path for us to use, mix this with your function above and you got what you wanted! playSound3D [MISSION_ROOT + "soundz\generator", gen, [], [], [], [], 50]; //BTW isn't there supposed to be a file extension in your path? Thanks a lot to kk👍
  19. Erwin23p

    Apply to all units

    One way I see to make this work is to call a script for each individual AI unit you want to do that for, because you need to constantly check each unit where it is... If you want to try that, create a file called swimFaster.sqf and add this: And then in the unit init: _script = [this] execVM "swimFaster.sqf"; There are a lot of ways of doing this: different, cleaner and better but this is a simple way,
  20. I've been trying to do that myself, the way I've seen bis do it is by using the arma conversation files and the BIS_fnc_kbTell function to make it work.
  21. Well I don't know why it isn't working, I tried it in multiplayer with a friend and it's working well...
  22. So if I understand correctly, you want to make some dead corpses unlootable, but if one of your npc teammates dies, you can loot them? You could force close player invetory: Put this in the non lootable npc: this setvariable ["lootable",false,true]; and then add this to the init.sqf player addEventHandler ["InventoryOpened", { _lootable = (_this select 1) getVariable ["lootable", true]; if !_lootable then {true}; }]; With the set variable, you're assigning that npc the variable lootable, a false boolean, then in the init you're adding an eventhandler to the player that when he opens the inventory it will check if that npc is lootable or not through the above assigned variable, and if it results false, it will override the open inventory action by doing anything.
  23. Erwin23p

    hpp editiing in GUI EDITOR

    How to import a dialog into the gui editor
  24. Erwin23p

    CUP LHD Rear Gate Opening Scripts?

    After trying a little bit more, I got it working using a nearest objects (I looked into the lhd functions and all used this) _Vehs = nearestobjects [lhd,[],100]; { _x animate ["door_welldeck",1]; _x animate ["door_welldeck_2",1]; _x animate ["door_welldeck_3",1]; } forEach _Vehs; Now, you could situate an object close to the end of the ship, or use coordinates and lower the radius of the nearestobjects.
  25. Erwin23p

    CUP LHD Rear Gate Opening Scripts?

    Try this: //Open: this animate ["door_welldeck", 1]; this animate ["door_welldeck_2", 1]; this animate ["door_welldeck_3", 1]; //Close this animate ["door_welldeck",0]; this animate ["door_welldeck_2",0]; this animate ["door_welldeck_3",0]; //and also I don't know what is this this animationPhase "door_welldeck" < 0.5; this animationPhase "door_welldeck" >= 0.5; I just looked a little bit into the config.cpp
×