-
Content Count
3566 -
Joined
-
Last visited
-
Medals
Everything posted by iceman77
-
Insurgency Style Markers & BIS Respawn Points
iceman77 replied to Kolmain's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I just tested Tajin's lastest post and it works good. -
Make addAction added to players persist for JIP players.
iceman77 replied to Rellikplug's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This is actually very interesting :). I think it is safe to say that without further investigation, it certainly wouldn't hurt to check bis_fnc_init. Better safe then sorry. On the other hand, I would like to know for sure and I think we all would. We need some test(s) and break down how it's actually working and edit the wiki to reflect the truth lol. -
Draw Arguments from .txt file
iceman77 replied to ohally's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You know I'm not sure. But I do know people have been making server side -only- scripts that remain explicitly on their server (not mission directory), to bogart their missions. Where the mission is reliant on said script to function. Mainly for people not wanting other servers to utilize their mission(s) by simple snagging it from the MPmission cache. There are some very knowledgeable people in this regard. I'm surprised no one has provided a solution for you. Well.. maybe they want to bogart the solution too? LOL. Cheers. -
Draw Arguments from .txt file
iceman77 replied to ohally's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Maybe you could have a server side script that checks UIDs? onuserconnected looks useful maybe? https://community.bistudio.com/wiki/ArmA:_Server_Side_Scripting -
How can I create an arbitrary position on the map?
iceman77 replied to Handle1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi. Alternatively you could pull vanilla location's positions of the currently loaded world from the cfg. No markers or objects needed. Cheers. private ["_locations","_position","_grp"]; _locations = []; " _locations pushBack (getArray (_x >> 'position')); false " configClasses (configFile >> "CfgWorlds" >> worldName >> "Names"); _position = _locations call bis_fnc_selectRandom; _grp doMove _position; -
Okay. Thanks for the in-depth explanation.
-
postinit functions are being ran in a non-scheduled environment (??). I think that's why suspending the function with waitUntils / sleeps and such causes the game to error / hang. Hence the needed spawned thread. Oh man. I could be sooo wrong here. Just some of my warped (and probably wrong) thoughts =(. My bad 2c. Cheers.
-
Make addAction added to players persist for JIP players.
iceman77 replied to Rellikplug's topic in ARMA 3 - MISSION EDITING & SCRIPTING
That's what I had thought. After I went to the wiki link he provided and seen there was nothing regarding A3 and the function being obsolete, I just went with it. Cheers. :cool: ---------- Post added at 13:16 ---------- Previous post was at 13:08 ---------- Yes well he is the one here asking for help after all. If you see mistakes, or what you think are mistakes, then tell him. If you are wrong then you are wrong. Big deal. If you are right, then you are right. hurray. At the very least, if you are wrong, you can rest assured you'll have a good grasp on the subject after forum goers get through with letting you know just how wrong you are. But atleast you'll have upped your knowledge a bit. And the OP gets help. More help than they bargained for :) -
Thanks guys. I use Gimp atm. It's no PS, but still I don't know why the heck exported .png doesn't work on the forum here. Maybe something to do with alpha channel / layer? Meh.. Saving it as a .gif works on my end atm. So that's fine. Cheers.
-
Make addAction added to players persist for JIP players.
iceman77 replied to Rellikplug's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Though I've never had any issues using BI functions in A3 without it. I thought it was an obsolete check now with A3? Meh. In A2 I always placed a function's module and made sure bis_fnc_init wasn't nil before using any bi functions. I know we don't need the module now, but do we still advise a nil check (bis_fnc_init) in A3? He isn't even utilizing any BI functions in any case. bis_fnc_mp :p -
Make addAction added to players persist for JIP players.
iceman77 replied to Rellikplug's topic in ARMA 3 - MISSION EDITING & SCRIPTING
In the 29thActions.sqf you are waiting until the player variable is initialized, but in an entirely separate thread. [] spawn // -- Spawn a new thread and continue the script. Do not wait here. { waitUntil {!isNull player && player == player}; waitUntil{!isNil "BIS_fnc_init"}; }; // -- Thus you're trying to add actions prematurely to jip clients. Should be if (isServer) exitWith {}; waitUntil { // -- Wait here until player variable is initialized on the (jip) client's machine. !(isNull player) && {(player == player)} && {!isNil "BIS_fnc_init"} }; // -- Store your functions into local (non-public) global variables for the client. // -- Call function that add's the addaction to the player controlled object // -- Add your Ehs to the player controlled object Additional information This EH can be cut down to the following. No need to waituntil the player is alive. The respawn Eh (should) only fires when the unit respawns and has control over the unit. player addEventHandler ["Respawn", {[] spawn RP_fnc_salute;}]; All of those publicVariables also seem redundant. Each client will automatically receive the global variables (functions) when they run the script. To sum it all up, your 29thActions.sqf could look something like this: if (isServer) exitWith {}; waitUntil { !(isNull player) && {(player == player)} && {!isNil "BIS_fnc_init"} }; RP_fnc_mpGlobalChat = {(_this select 0) globalChat (_this select 1);}; RP_fnc_mpSideChat = {(_this select 0) sideChat (_this select 1);}; supplyCrateCounter = 0; // -- Only need to PV when it's updated (if applicable). Initially, it's set to 0 for every client that runs the script. RP_fnc_salute = { player addAction [ "<img image='Pictures\yinyang.paa' /><t color='#4cccd1'>*Salute*</t>", "scripts\29th Actions\salute.sqf", "", -95, false, true, "Salute", "" ]; nil // -- This (now) called function doesn't need to return anything. So lets return "void" so we know exactly what the return is (or isn't in our case). }; _nul = call RP_fnc_salute; // -- No need to spawn a new thread. Though it wouldn't "hurt" to use spawn, it's good practice to use call if possible. player addEventHandler ["Respawn", {_nul = call RP_fnc_salute;}]; player addEventHandler ["Killed", {removeAllActions (_this select 0);}]; Anyhow, those are some things that stuck out to me. I hope that clears a few things up. If I missed anything hopefully some other knowledgeable forum goer can catch it. Cheers. -
-Snippet- Jump Action (For all you BF Flippers)
iceman77 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
After looking in the configuration, I noticed BI still hasn't given us the ability to hurdle stuff on the fly. Aside from the step-over animation with the V key. Or am I wrong :confused:. Anyhow, this is a pretty neat animation. It siphons a shit ton of stamina when used. Oh lord I'll feel silly if this is already a default action LOL. Cheers. // Shift + T to jump (running too) waitUntil {!(isNull (findDisplay 46))}; (findDisplay 46) displayAddEventHandler ["keyDown",{ if ( (_this select 1) isEqualTo 20 && (_this select 2) ) exitWith { if ( (getFatigue player) < 0.4) then { player playMoveNow "AovrPercMrunSrasWrflDf"; } else { titleText ["Not enough stamina","PLAIN DOWN"]; }; true }; }]; -
-Snippet- Jump Action (For all you BF Flippers)
iceman77 replied to iceman77's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Exactly. Feel free to add onto the snippet. Post any updates here or in a new thread. Atm I can't be bothered. It was an animation I found by accident while searching for others in the animation's viewer. I figured it'd make for some good conversation in any case. Cheers. -
terrainGrid 48 is also a kick ass terrain grid for low end PCs. It's the lowest terrainGrid that still render's grass. It lets you render some grass, but performs identical terrainGrid 50. Well in A2 it worked well. My2C.
-
Is it possible to get the idc of the button that was used?
iceman77 replied to alleycat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
That's because using action and simply passing the idc is too easy. :p -
-Snippet- Jump Action (For all you BF Flippers)
iceman77 replied to iceman77's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Pretty much. I suppose you could just use a different animations based on what weapon the player has (if any), what his stance is, and how fast he is traveling. -
Is it possible to get the idc of the button that was used?
iceman77 replied to alleycat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Noted the same. -
-Snippet- Jump Action (For all you BF Flippers)
iceman77 replied to iceman77's topic in ARMA 3 - MISSION EDITING & SCRIPTING
if ((currenWeapon player) isEqualTo (primaryWeapon player)) then { hint "The player is holding his primary weapon."; }; currentWeapon handGunWeapon secondaryWeapon primaryWeapon stance speed velocity -
Making a trigger deactivate when another trigger activates
iceman77 replied to becario's topic in ARMA 3 - MISSION EDITING & SCRIPTING
https://community.bistudio.com/wiki/triggerActivated https://community.bistudio.com/wiki/setCaptive -
-Snippet- Jump Action (For all you BF Flippers)
iceman77 replied to iceman77's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Well, the animation I posted is a vanilla animation. I was actually looking for another animation and seen that one. I was like wth.. that's a pretty neat animation and be perfect for making a jump script. -
Is it possible to get the idc of the button that was used?
iceman77 replied to alleycat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ment idc derp. Yes you returned the idc with the ctrlidc command. Seeing as how the command returns an idc (number) and all. -
Swiveling 3DLine / Icon
iceman77 replied to iceman77's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The Mission Event Handler works fine and the posted solution works. The code in the original post actually works too. I just needed the 90 and icon to swivel and Larrow hooked it up on that end :) -
I'm attaching 3Dlines and a 3Dicon to a few pilot's corpses in my SP mission. I would like the 3D lines and icon(s) to "swivel" on the corpse's position relative to the player's position. If you check out the code in the editor, note the lines and icon(s) are static. Which is okay, but I wanted to do a bit more. However I'm bad at math and such. Or simply lack the ability to make this happen otherwise. Any help is appreciated. DEADPILOTS = []; { if (getText (configfile >> "CfgVehicles" >> typeOf _x >> "textSingular") == "pilot") then { DEADPILOTS pushBack _x; _x addAction ["Search Pilot", {(_this select 0) call SSC_fnc_pilotSearch;}, [], 0, false, true, "", "!(_this getVariable 'PLAYER_HAS_KEYS') && _this distance _target <= 3" ]; }; } forEach allDeadMen; Color75 = [ (profilenamespace getvariable ['GUI_BCG_RGB_R', 0.75]), (profilenamespace getvariable ['GUI_BCG_RGB_G', 0.75]), (profilenamespace getvariable ['GUI_BCG_RGB_B', 0.75]), 0.75 ]; addMissionEventHandler ["Draw3D", { if ( { player distance _x <= 25 } count DEADPILOTS > 0 ) then { { private ["_corpsePos","_line1_start","_line1_end","_line2_start"]; _corpsePos = getPos _x; if (player distance _corpsePos <= 25) then { _line1_start = _corpsePos; _line1_end = [(_line1_start select 0), (_line1_start select 1), 0.5]; _line2_start = [(_line1_end select 0), (_line1_end select 1) + 0.5, (_line1_end select 2)]; drawLine3D [_line1_start, _line1_end, Color75]; drawLine3D [_line1_end, _line2_start, Color75]; drawIcon3D ["#(argb,8,8,3)color(1,1,1,1)", [0,0,0,0.5], _line2_start, 0.5, 0.5, 0]; drawIcon3D ["\a3\ui_f\data\gui\cfg\hints\Take_ca.paa", Color75, _line2_start, 0.5, 0.5, 0]; }; } forEach DEADPILOTS; }; }];
-
Is it possible to get the idc of the button that was used?
iceman77 replied to alleycat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Because you're leet and used ctrlIDC to return the button?! /gasps! XD -
Is it possible to get the idc of the button that was used?
iceman77 replied to alleycat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Meh. I always store my IDCs and dialog's IDD into "recognizable" local global variables before hand in an "IDC_Init" script / function. I hate having to remember lots numbers and what controls they go to. eg; client script // DIALOG IDD // IDD_DLSR_DIALOG = 100000; // PICTURES // IDC_DLSR_PICTURE_PIP = 30000; // PROGRESS BARS // IDC_DLSR_PROGRESS_UNIFORM = 40000; IDC_DLSR_PROGRESS_VEST = 40001; IDC_DLSR_PROGRESS_BACKPACK = 40002; // TEXT // IDC_DLSR_TXT_MAINHEADER = 50000; IDC_DLSR_TXT_MUNITIONHEADER = 50001; IDC_DLSR_TXT_COMPATIBLEHEADER = 50002; IDC_DLSR_TXT_CONTAINERHEADER = 50003; IDC_DLSR_TXT_DESCRIPTION_FOOTER = 50004; // ACTIVE TEXT // IDC_DLSR_ACTIVET_UNIFORM = 60000; IDC_DLSR_ACTIVET_VEST = 60001; IDC_DLSR_ACTIVET_BACKPACK = 60002; IDC_DLSR_ACTIVET_SAVELOAD = 60003; IDC_DLSR_ACTIVET_CTC = 60005; IDC_DLSR_ACTIVET_GEAR = 60006; // LIST BOXES // IDC_DLSR_LB_MAIN = 70000; IDC_DLSR_LB_CONTAINER = 70001; IDC_DLSR_LB_COMPATIBLEACC = 70002; IDC_DLSR_LB_COMPATIBLEMAGS = 70003; // BUTTONS // IDC_DLSR_BTN_ADDITEM = 80000; IDC_DLSR_BTN_REMOVEITEM = 80001; IDC_DLSR_BTN_ADDMAGAZINE = 80002; IDC_DLSR_BTN_ADDACC = 80003; IDC_DLSR_BTN_WEAPONS = 80004; IDC_DLSR_BTN_AMMO = 80005; IDC_DLSR_BTN_ACCESSORIES = 80006; IDC_DLSR_BTN_UNIFORMS = 80007; IDC_DLSR_BTN_VESTS = 80008; IDC_DLSR_BTN_BACKPACKS = 80009; IDC_DLSR_BTN_HEADGEAR = 80010; IDC_DLSR_BTN_GLASSES = 80011; IDC_DLSR_BTN_EXIT = 80012; // BACKGROUNDS // IDC_DLSR_BG_MAIN = 90000; IDC_DLSR_BG_PIP = 90001; IDC_DLSR_BG_UNIFORM = 90003; IDC_DLSR_BG_VEST = 90004; IDC_DLSR_BG_BACKPACK = 90005; IDC_DLSR_BG_GEAR = 90006;