-
Content Count
275 -
Joined
-
Last visited
-
Medals
-
Billy Banter started following wyattwic
-
Locally mute another player via script
wyattwic replied to wyattwic's topic in ARMA 3 - MISSION EDITING & SCRIPTING
removed. I just realized I re-asked the same old question. Still no luck. -
Export Vehicles and Player - stats to DB
wyattwic replied to Erzengel's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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; -
Export Vehicles and Player - stats to DB
wyattwic replied to Erzengel's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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? -
wyattwic started following Detect player about to throw nade and Adding a weapon with attachments to a box
-
Adding a weapon with attachments to a box
wyattwic replied to wyattwic's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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; -
Adding a weapon with attachments to a box
wyattwic posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
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! -
Detect player about to throw nade
wyattwic replied to wyattwic's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Detect player about to throw nade
wyattwic replied to wyattwic's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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! -
Detect player about to throw nade
wyattwic replied to wyattwic's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I had no luck there, it still returns a throwable even if the player is not able to throw. -
"Encrypting" Sqf scripts
wyattwic replied to Robin Withes's topic in ARMA 3 - MISSION EDITING & SCRIPTING
It was a general statement my friend. I say that because of all the Altis Life people I see asking about the same thing. :) -
Detect player about to throw nade
wyattwic replied to wyattwic's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Detect player about to throw nade
wyattwic replied to wyattwic's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
"Encrypting" Sqf scripts
wyattwic replied to Robin Withes's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Detect player about to throw nade
wyattwic replied to wyattwic's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thank you!!! I completely forgot about inputaction. When I'm on lunch, test it out and let y'all know of the results! -
Detect player about to throw nade
wyattwic replied to wyattwic's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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? -
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!