Jump to content

wyattwic

Member
  • Content Count

    275
  • Joined

  • Last visited

  • Medals

Everything posted by wyattwic

  1. I have been searching the Wiki like a madman attempting to find the hierarchical class tree for ArmA 3. I can locate the older games, but not the A3 full tree. Help would be nice!
  2. Hello! Is there any way to restrict turret movement of a vehicle? In my situation I have individuals abusing the Cheetah as a anti-tank/infantry weapon and ignoring aircraft. How would it be possible to restrict vertical movement of the turret below a certain point to discourage engaging ground targets? Thank you!
  3. Hello everyone, I had originally released this while I was VERY drunk - I have since refined and cleaned a few things up. Enjoy! Below is my current release of our jump script. This script provides players the ability to jump while running using their "climb over" key. They key is detected on load from the player's keybinds, allowing them to utilize any key on the keyboard as well as some controllers. You are no longer bound to just one hard coded key! This script is plug and play ready. See below for install instructions. Main features Weight adjusted for use with BI's default fatigue system. Heavy players do not jump as far/high. Requires and uses fatigue. Defaults require 20% stamina remaining and causes 20% fatigue on use. JIP and network compatible. All players will see as you jump gracefully in the air, Players late to the party can see you too! Detailed explanations in the code for adjustments. Want to jump higher without the guesswork and death? We got you covered fam To use this code, save the below SQF to your mission. Wyatt's Jump Script 0.2b (Right click and save as) And add the following to your init.sqf OR initPlayerLocal.sqf if (!isserver) then {execVM "path\jumpscript.sqf"}; This code was mainly made as a learning experience for myself. Any tips for improvement is appreciated. Currently the only known issue is jumping without a primary weapon does not animate well. The jump occurs but no animation, or a broken animation is played. This does not seem to break game play much. This code is made with a dedicated server in mind. If you plan on using this in SP or ran from your PC as server, change "if (!isServer)" on the init.sqf or initPlayerLocal.sqf and on line 7 of the script to "if (true)".
  4. Hello! I have been having a hard time finding a way to detect if a player is standing within a particle effect, such as smoke. I am trying to make a "Nerve gas" script where if a player steps into a specific color smoke grenade he begins to take damage and spaz out. While I can easily detect if the player is standing near the smoke grenade, I am interested if they are standing within the smoke emitted. Can anyone point me in the right direction?
  5. Hello guys! A while back I made a custom grenade script, but lately I've ran into a few issues mainly surrounding a few different revive systems and vehicles. My issue appeared to be centered around how we detect that the player wanted to toss a grenade. In my current implementation, we detect the keystroke, intercept it then do our magic. The issue is that the same keybind may be used in other applications where they wouldn't interfere normally. How would I detect that someone has actuated a specific action key, or is about to start throwing a grenade? So far, my best idea was to detect using the Fired EH, but that EH triggers after the throw animation. My goal is to stop that animation from happening, then run my own code. I'll keep experimenting, but input would be great!
  6. Hello all! I am working on writing a script that saves a box's inventory in its entirety, then restores it. My biggest stall out is weapons, their attachments and loaded mags. Right now I am saving the weapons in the box using weaponsItems - I am unsure how to restore the weapon and its attachments/mags (including the number of rounds in that loaded mag). Tips would be appreciated!
  7. removed. I just realized I re-asked the same old question. Still no luck.
  8. Hello! Would anyone be able to guide me as to how to mute a player locally via a script? Currently players, if they needed to mute someone, need to go to the map, select the player and hit mute. I have no clue what code the mute button triggers. Thank you!
  9. Okay. May want to lead with what you need next time. :) Here is how I do it on my servers. The big issue with this code right now is attachments on weapons will be lost. I'm working on that now. _pos = getpos _object; _vect = [vectordir _object,vectorUp _object]; _dam = [damage _object,getAllHitPointsDamage _object]; _inv = [getItemCargo _object, getBackpackCargo _object, getMagazineCargo _object, getWeaponCargo _object]; _vinv = _object getVariable ["VINV",[]]; _class = str typeof _object; _stat = _object getVariable ["STAT",[]]; [format["UPDATE `objects` SET `POS` = '%1', `VECT` = '%2', `DAM` = '%3', `INV` = '%4', `VINV` = '%5', `CLASS` = '%6', `STAT` = '%7' WHERE `OID` = '%8'",_pos,_vect,_dam,_inv,_vinv,_class,_stat,_OID],false] spawn db_fnc_DBQuery;
  10. If you already have players saving, you already know how to pass things back and forth. What part of saving and loading vehicles are you stuck on?
  11. Thanks guys! Focusing on adding configured weapons back to the box I am following grump's suggestion. The code below works, but for some reason intermittently doesn't do the dropWeapon action. I've tried Put and Drop Weapon variations, I've also tried waiting up to 10 seconds. Any ideas? This code is spawned. Coming in as _this is "[unit,[container,weaponclass,[array of attachments]]]". params ["_thread","_process"]; removeAllWeapons _thread; removeAllItems _thread; _process params ["_container","_weapon","_attachments"]; _thread addWeapon _weapon; { _thread addWeaponItem [_weapon,_x]; } forEach _attachments; _thread action ["PutWeapon", _container, _weapon]; sleep 5;
  12. Does anyone know how to utilize the old menu_position respawn screen, as seen here? When I am using this template, I am only able to use the new system. Thank you!
  13. Thanks @pierremgi and @phronk. The goal of my script is to allow the player to pull the pin on their grenade and carry (or cook). It works in its current implementation by detecting the grenade DIK code on key down. Here is my issue - Outside of my script, the engine is very restrictive as to when you can activate a grenade, and permissive in unusual situations. Something I haven't been able to mimic accurately in my code. The goal of my post was to see if anyone knew of a way to detect when the engine was about to have a grenade throw happen, then intercept and run my own code. The issue with all of the implementations I have tried so far, is they fire after the throw animation or they return true when in actuality you wouldn't be able to throw something.
  14. So, more digging. At this point im convinced that I am after is engine based and I am not having a ton of luck. On the bright side, thanks to @phronk, I figured out inputaction is better for handling keydown type events. In the past if I was taking over something that required tracking an action bound to something weird, it make handling the DIK codes for it near impossible. Now I just watch inputaction and there we go! I'm giving up on this for now. Thanks for the help guys!
  15. I had no luck there, it still returns a throwable even if the player is not able to throw.
  16. wyattwic

    "Encrypting" Sqf scripts

    It was a general statement my friend. I say that because of all the Altis Life people I see asking about the same thing. :)
  17. Its not so much if they have a grenade or not (I already am checking for that), its more that people are tossing nades when down/incapacitated or otherwise wouldn't be. My big issues is there are so many "otherwise shouldn't be" situation.
  18. So, the problem persists. InputAction returns 1 if I am pusing the key associated. It doesn't fire when then the character is about to throw. Qualifying the above, it returns true if I am throwing a grenade, but also returns true if its pushed in a situation the action cant be completed. Do you all know of any way to determine if an action is possible? Maybe I could use that as a second qualifier for my script? EDIT: I dont think determining if an action is possible will work - Its picking up on switch grenade as well (Ctrl+G, or anything+G), so that isn't working out.
  19. wyattwic

    "Encrypting" Sqf scripts

    Just adding my 2 cents - I am not a huge fan of obfuscation or encryption, but something that has helped prevent people from ripping off code is to have as much as possible in a server side add on. You cant steal what you dont have. Everything that's ran by the server only doesn't need to be sent to the client. For most of everything else to be ran by the client, remoteexec and publicvariables work well too, just don't forget the potential network impacts. Security wise, I dont know if there is a method to export the contents of a remoteexec if your recieving (I'm not quite sure how the receiving engine handles it) and if your using a PV, anyone with console access during a live game could copy it. Still, it makes the cost of effort vs reward high enough that if they get it, they kinda earned it lol. Edit: I dont think asking for help on the community then not sharing the result is a good practice. You dont have to armaholic everything, but at least "take a penny, leave a penny". There is no way to learn code (without it becoming a second job) without a contributing community.
  20. Thank you!!! I completely forgot about inputaction. When I'm on lunch, test it out and let y'all know of the results!
  21. So, I need to refine my question after some more research - How do I detect when action "ThrowGrenade" is starting/in progress? How do I stop the action?
  22. @Ze_AwPp The ArmA community and engine does not support native file encryption. It hinders progress to the community at large and is only used by BIS to protect some DLCs. If you have found that another server has taken your content, I recommend working to enforce your copyrights via DCMA. Being said, since your mission uses BIStudio's materials, contents as well as content and materials from other community contributors, you have no legal claim. You might have a claim protecting a custom texture or external resource accessed by an addon, but SQF code belongs to BIS and is licenced to the community at large. The only way to keep your code from being sent to clients is to keep it on the server via a server side addon and remoteexec. I'll let you figure that out yourself, as its meant to assist in performance, not security.
  23. Hey guys, How would you recommend I save a vehicle's or ammo box's detailed inventory? Currently I am saving and restoring using the "getBackpackCargo" family of commands but I have learned it doesn't save contents, attachments etc. and would love a fresh opinion. Thank you!
  24. Welp, I discovered after posing I had a few errors. I corrected them, but now I have another issue. For some reason, the below code wont return the contents of a backpack. When broken down and ran in debug, I have no issues. Any ideas? getContainerItems = { private _return = []; { _name = _x select 0; _object = _x select 1; _mags = magazinesAmmo _object; _weaps = weaponsItems _object; _items = itemCargo _object; _containers = everyContainer _object; _containers = if (_containers isEqualTo []) then {[]} else {_containers call getContainerItems}; _return pushBack [_name,_mags,_items,_weaps,_containers]; } foreach _this; _return }; _veh = cursorObject; _top_mags = magazinesAmmoCargo _veh; _top_weaps = weaponsItemsCargo _veh; _top_items = itemCargo _veh; _top_containers = everyContainer _veh; _top_containers = if (_top_containers isEqualTo []) then {[]} else {_top_containers call getContainerItems}; return = [_top_mags,_top_items,_top_weaps,_top_containers];
  25. I'm working on creating code to address my issue, but for some reason my code below freezes the game. Any idea what I am doing wrong here? This is being ran from debug console. _veh = cursorObject; _getContainerItems = { _return = []; { _name = _x select 0; _object = _x select 1; _mags = magazinesAmmoCargo _veh; _weaps = weaponsItemsCargo _veh; _items = itemCargo _veh; _containers = everyContainer _veh; _containers = if (_containers isEqualTo []) then {[]} else {_containers call _getContainerItems}; _return pushBack [_name,_mags,_items,_weaps,_containers]; } foreach _this; _return }; _top_mags = magazinesAmmoCargo _veh; _top_weaps = weaponsItemsCargo _veh; _top_items = itemCargo _veh; _top_containers = everyContainer _veh; _top_containers = if (_top_containers isEqualTo []) then {[]} else {_top_containers call _getContainerItems}; return = [_top_mags,_top_items,_top_weaps,_top_containers];
×