samatra
Member-
Content Count
652 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by samatra
-
Turning vehicles lights off
samatra replied to Norbak's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
There is no scripting command to turn them off, but you can break the lights. fnc_killLights = { private "_cfg"; _cfg = configFile >> "CfgVehicles" >> (typeOf _this) >> "Reflectors"; for "_i" from 0 to count(_cfg) - 1 do { _this setHit [getText((_cfg select _i) >> "selection"), 1]; }; }; myvehicle call fnc_killLights; -
How to setDamage without affecting part damage? (for an improved damage/armor system)
samatra replied to galzohar's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Sorry for late response, but here it is for "_i" from 0 to 0 was used to include base class hit points, it is no longer used and you can remove it (as well as if(_i > 0) check). I didn't quite understand your question, are you talking about HandleDamage and (possible) different selection names for body parts? -
MPRespawn eventhandler and setPosATL trouble
samatra replied to uncookedzebra's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You don't need MPRespawn here, simply add normal Respawn event handler for each player so they will handle themselves. init.sqf: true spawn { //Wait until player is initialized waitUntil {player == player}; player addEventHandler ["Respawn", { //Get dead body pos _pos = getPosATL (_this select 1); _pos set [2, (_pos select 2) + 200]; //Set new unit pos (_this select 0) setPosATL _pos; }]; }; -
[WIP] CorePatch: config patch for ArmA 2 OA
samatra replied to goliath86's topic in ARMA 2 & OA - ADDONS & MODS: DISCUSSION
Great job with CorePatch, goliath86! I really hope it will be included officially with the game like CCP was. Here is two things that I would love to see done and what CCP didn't have time to do: 1) https://dev.withsix.com/issues/67651 2) Include hiddenSelections and hiddenSelectionsTextures for BTR-60, it fully supports it. -
Whatever will be decided I would like to see ability to control it with script or at very least with config. Also doubling Killzone_Kid about seat change event handlers, it is very needed.
-
Odd behavior with helicopter and attachto?
samatra replied to kocrachon's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Attached objects are simulated with the same rate as object they were attached to. You'll need to attach it to object that is simulated more often, I can't suggest you any though. You can try setting helicopter position each frame (onEachFrame) and reseting its velocity with setVelocity [0,0,0]; -
How to setDamage without affecting part damage? (for an improved damage/armor system)
samatra replied to galzohar's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yes, I do "cache" it in setVariable on the vehicle, I didn't include this so script wouldn't be even more complicated. For units you'll need to check for previous uniform though. -
How to setDamage without affecting part damage? (for an improved damage/armor system)
samatra replied to galzohar's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Unfortunately there is no such scripting command, plus even if you save all selections damages, then do setDamage and then restore selections damages back, some selection damages will be lost because there are unnamed selections as well as selections not listed in vehicle hitpoints or improperly configured selections (plenty in A2, not sure about A3) which you can not modify with setHit or setHitPointDamage. Here is said solution with saving and then restoring hit points damage that I use in King of the Hill, modified a bit for your needs: func_getAllHitPointsFromConfig = { private ["_hitpoints", "_hps_fnc", "_cfg", "_class", "_uniform", "_trt", "_trts", "_trts2"]; _hitpoints = []; _hps_fnc = { private "_hitpoint"; for "_i" from 0 to count(_this) - 1 do { _hitpoint = configName(_this select _i); if(_hitpoints find _hitpoint == -1) then { _hitpoints set [count _hitpoints, _hitpoint]; }; }; }; _uniform = (if(uniform _this == "") then {getText(configFile >> "CfgVehicles" >> (typeOf _this) >> "nakeduniform")} else {uniform _this}); _class = (if(_uniform == "") then {typeOf _this} else {getText(configFile >> "CfgWeapons" >> _uniform >> "ItemInfo" >> "uniformclass")}); _cfg = configFile >> "CfgVehicles" >> (typeOf _this); for "_i" from 0 to 0 do { if(_i > 0) then {_cfg = inheritsFrom _cfg}; if(!isClass(_cfg)) exitWith {}; if(isClass(_cfg >> "HitPoints")) then { (_cfg >> "HitPoints") call _hps_fnc; _trts = _cfg >> "turrets"; for "_i" from 0 to (count _trts - 1) do { _trt = _trts select _i; _trts2 = _trt >> "turrets"; (_trt >> "HitPoints") call _hps_fnc; for "_j" from 0 to (count _trts2 - 1) do { ((_trts2 select _j) >> "HitPoints") call _hps_fnc; }; }; }; }; _hitpoints }; func_setOverallDamage = { private ["_vehicle", "_damage", "_hitdamages"]; _vehicle = _this select 0; _damage = _this select 1; _hitdamages = []; { _hitdamages pushBack [_x, (_vehicle getHitPointDamage _x)]; } forEach (_vehicle call func_getAllHitPointsFromConfig); _vehicle setDamage _damage; { _vehicle setHitPointDamage [_x select 0, _x select 1]; } forEach _hitdamages; }; [cursorTarget, 0.9] call func_setOverallDamage; This script scans config for all hit points, including uniform-specific hitpoints since they're sometimes different from hitpoints of base unit class, saves damage for all hitpoints, does setDamage and then restores hitpoints damage back. It is not ideal solution, as I said it will not restore damages of some selections for reasons listed above, but this is best of what we can do with sqf because of lack of proper damage manipulation commands. -
Making Vehicle Invincible to Damage from EAST
samatra replied to InfantryChild's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I just double checked and it works fine, I simply pasted my code into car's init line and was an opfor unit. Keep in mind that it checks for group side, not unit side. If you will be an OPFOR unit in BLUFOR group damage will apply. Screen: http://cloud-4.steamusercontent.com/ugc/707398498558082848/C50A45CF2377ED69C75B6722634252F04EDC4439/ -
Changing Cargo value of a box (configfile)
samatra replied to drunken officer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You cannot change config values with script, you'll need an addon (mod) for that. There is nothing you can do. -
Taru doorName (transport Pod) ?
samatra replied to zakiechan's topic in ARMA 3 - MISSION EDITING & SCRIPTING
heli animateDoor ["Door_6_source", 1] -
Respawn one of the players in MP
samatra replied to Zombitch's topic in ARMA 3 - MISSION EDITING & SCRIPTING
forceRespawn works only with local units\players, you'll need to send them a public variable to trigger forceRespawn. init.sqf: "forceRespawnMe" addPublicVariableEventHandler { forceRespawn player; }; Somewhere on server: (owner PapaBear) publicVariableClient "forceRespawnMe"; -
AI players NOT deducting tickets but human players are. Help
samatra replied to owmyeye's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Provide code piece that handles ticket deduction and how it is setup -
Dialogs - Transparency in Pictures
samatra replied to Armitxes's topic in ARMA 3 - MISSION EDITING & SCRIPTING
colorText[] in the picture defines color modulation and transparency, make sure you don't have this transparency set there -
Making Vehicle Invincible to Damage from EAST
samatra replied to InfantryChild's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Editor init line compatible this addEventHandler ["HandleDamage", { _damageold = (_this select 0) getHit (_this select 1); _damagenew = _this select 2; if(side group(_this select 3) == opfor) then { _damagenew = _damageold; }; _damagenew }]; Read EH documentation to understand what is going on: https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HandleDamage -
onPlayerConnected - deriving player object
samatra replied to fn_Quiksilver's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Basically onPlayerConnected's _id is useless and was always useless since its introduction, you can't do anything with it script-wise. (Correction, the only scripted way to use dpnid from onPlayerConnected's _id is https://community.bistudio.com/wiki/allMapMarkers command where user-defined markers use dpnid in marker name) Cycling through playableUnits\allUnits is bad approach because these arrays are generated from groups, which get bugged over time in MP and exclude some units and players as well as never include dead units so if player is in respawn they will not be in array. Personally I use scripted approach to solve this issue, whenever player finishes loading (player == player) or respawns ("Respawn" EH), I send a public variable onto server and update their actual unit deleting old record by comparing UID with server array, same when they leave, onPlayerDisconnected walks through array and deletes the record by uid of player that left. Each time script walks through array it also removes units that are not alive (either null or really dead), so quick leaving to lobby and joining back still maintains proper array of player units. This way you can manage precise array of player units on server as well as to send them to clients in public variable. -
Toadie's SmallArms and Animations for Arma3
samatra replied to toadie2k's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Any plans to update RHS-HLC compatibility addon for both new RHS and HLC versions? Thanks. -
Mission file being ripped off and passed as their own - obfiscator wanted. Will Pay !
samatra replied to spitfire007's topic in ARMA 3 - MISSION EDITING & SCRIPTING
onPlayerConnected's _id is dpnid which is not the same as network identity's playerid that owner command returns. Host's dpnid is always 2 which is equal to server's playerid being 2 but these are two completely different entities. -
Toadie's SmallArms and Animations for Arma3
samatra replied to toadie2k's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Point blank, all hits right into left hand using 5.45 Subsonic ammo. Other subsonic magazines do normal damage comparable to non-subsonic magazines. As table (http://pastie.org/pastes/9813804/text) shows CfgAmmo "hit" value for said magazine has 2.74983 which is lowest of all ammunitions in the game and HLC, even less than Saiga buckshot. Video, 27 hits to left hand with subsonic 5.45, 4 hits to left hand with ball 5.45 to kill naked man. Now imagine how it performs when players have proper uniforms and vests :) -
Toadie's SmallArms and Animations for Arma3
samatra replied to toadie2k's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Wanted to report another issue (didn't find it in search thread), subsonic AK74 5.45 mags are absolutely useless, it takes 27 (!) hits to the hand to kill naked person (friendly fire), while normal 5.45 kill with 3 hits to hand in same conditions. I'll have to remove this ammunition until its fixed. We're actively using your great addons in Wasteland Chernarus so I'm going to nag in this thread quite often now :) Table with mags and respective hit values, sorted by hit value with HLC addons enabled: http://pastie.org/pastes/9813804/text -
Toadie's SmallArms and Animations for Arma3
samatra replied to toadie2k's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Wanted to report small issues with Saiga12: 1) AI shoot them in bursts or even what seems to be full auto, doesn't seem to be natural for the shotgun 2) Buckshot does no damage to overall damage of the vehicle, only to vehicle parts (wheels, glass, hull, etc.), while damage always remains at 0 -
Panopticum - most weird and exotic scripts you ever made?
samatra replied to Rydygier's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Checks if player is close to a ball and if they are, kicks it by player's velocity. Failed experiment turned into bunny hopping script Fun with blood particles Field toilet bowling Having fun with arma glitches (do not ask how, its not usable in actual mission) Wanted to make a flappy bird mission but somebody beat me to it so it never went past experiments. Image rotation is done through RscMap -
GUI add Buttons and Text to ListBox
samatra replied to HerrVorragend's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Reposting the answer from https://forums.arma.su/forum/main-category/main-forum/king-of-the-hill/14118-scripting-question-how-to-add-buttons-textfields-etc-to-listbox Its not ListBox or ListNBox but set of different controls laid out to appear like list inside controls group. I prepare 100 instances of each control for each list line and when menu opens I use these controls to build the menu while hiding unused leftovers through script. Now, with introduction of ctrlCreate it can be done much easier without having to have 100s of controls on the dialog as you can create exactly as much as you need of fly. How list items look in process of development: http://cloud-4.steampowered.com/ugc/577877533472077430/BA3E1D3B3A22CC431CA5648F126103BCBAE89731/ http://cloud-4.steampowered.com/ugc/577877533463059390/1E3980D04AEF8CB0D5D26619969FFA0914DD4BBA/ First I make single list item to make sure it looks how I want it, then I copy 100 sets of the list item (by using preprocessor macros) in the dialog and the script does the rest in onLoad event of the dialog or whenever you need to build the list again. -
v12 update is out: [NEW] Sales in gun store [NEW] Anti global VON script from King of the Hill [NEW] Fatigue bar from King of the Hill [NEW] Gun store now sells contents of all backpacks, not just first one [NEW] Gun store now sells all attachments and loaded magazines off weapons inside vehicles or loot piles along with the weapon [NEW] Gun store now supports buying and selling of facewear [NEW] Gun store now sells all new ArmA 3 content [FIX] Name no longer shows up during revive with stream safe option turned on [FIX] Geo cache mission no longer ends right away [FIX] AI no longer should spawn naked [FIX] Underwater wreck mission no longer ends right away
-
Non-public mission on the competition
samatra posted a topic in Arma 3 - MAKE ARMA NOT WAR CONTEST - QUESTIONS & ANSWERS
Hello. I am developer of King of the Hill mission and we submitted our mission to the competition with empty Workshop entry because we keep our mission non-public and we provide it only to selected hosts that we trust in order to keep mission as cheater-free as possible as well as have the mission follow our design vision without unbalancing changes by individual hosts. This practice proved to be very effective in order to provide best possible experience for our players. The question is would there be a possibility of providing the mission to the jury individually for their review and possible play testing? Thank you.