-
Content Count
17 -
Joined
-
Last visited
-
Medals
Posts posted by Unluckymonster
-
-
20 hours ago, 7erra said:Just so you know I am reading all of the comments but development has been laid off cause I've been working on another project and been busy. Getting back into the code will take some time so thanks for the kind words and sorry for the lack of support 😉
Hey no problem sir, my own mission was on hold due the inflammatory bowel disease and what else things, we are humans after all.
But returning to the subject as I asked earlier is there "Anyway for player to check how much money he currently have/ have trigger execute once player have enough money?" other than checking in the store or is this planned feature on future update(s)?
-
Wow, thx @ixaak , didn't expect anyone to reply so thank you very much. One step closer to victory with my challenges 😉
-
Hi, I'm creating open-world SP-mission which would be relaying on this awesome script but there's a couple of challenges on the way.
1. Many CfgFunctions at description.ext -> problems
When I tested the script on simple null mission plate it worked perfectly. However in the mission I'm creating there's also HLF UnitCapture-script also used and that is activated also by using CfgFunctions at Description.ext so my description.ext currently looks like this:
Quoteclass CfgFunctions
{
#include "arsenalShop\cfgFunctions.hpp"#include "functions1.hpp" // HLF UnitCapture, works perfectly this way, no need to worry about it
};But in-game when I start the mission I get following error-notification
Quote'...ms ["_typeInit",["_didJIP",true]];
if (|#|_typeInit == "postInit") exitWith {
TER_...'
Error Undefined variable in expression: _typeinit
File missions\Unluckymission.map\arsenalShop\config.sqf, line 3
The arsenal shop opens up like expected but trying to add money with example command:
Unlucky setVariable ["TER_money",300];
Won't work and thus player is unable to buy anything from the Arsenal Shop.
Of course other problems might rise currently that I'm not aware of but I don't know how I should handle many CfgFunctions same time, given the fact that one of them works fine. 🤔
2. How add money cumulatively?
The above mentioned setVariable is a good way to set specific amount of money for player but how you are supposed to add more money into player's pocket? Some above conversations in this topic have examples how to get money from killing enemies but what if I'm looking to add money in script for example after player completes a side quest that might not involve killing enemy forces at all? addVariable code doesn't exist according to my poor coding knowledge.
3. Anyway for player to check how much money he currently have/ have trigger execute once player have enough money?
This is the smallest problem of all three as failing to do so wouldn't stop mission to be creatable by me but it definitly would help out if player can check through radio repeatably how much money he have and if I have objective for player like "Collect 2000 dollars to buy the house" then I would need some way that trigger detects when player have enough money for that.
Thanks for the possible replies in advance! 😊
- Unluckymonster
-
Alright, this should be everything needed. Just need to start customize it's bits to fitting me personally but already huge thanks for creating this script!

-
1
-
-
22 hours ago, GEORGE FLOROS GR said:There is an exclude list inside the code .
So you can just remove the ! from the code , in order to reverse this and have only the certain units to change their loadout.
Think I got now mostly figured it out the way I intended at the start!
22 hours ago, GEORGE FLOROS GR said:&& (!((typeOf _x) in GF_Exported_Loadouts_Exclude_List))
You can even copy the whole script as it is and just change all the global variables like :
GF_Exported_Loadouts_1 = {
so that you can run more than one script.
Though this part I still fail to do. Do you mean to create seperate SQF-file or add new part to already existing sqf-file?
I created new GF_Exported_Loadouts_Sniper.sqf, Loadout_Sniper_1.sqf and Loadout_Sniper_2.sqf files but it didn't work.
GF_Exported_Loadouts_Sniper.sqf (It's in the same folder as GF_Exported_Loadouts.sqf, is that a problem?)
Spoiler
//________________ Author : GEORGE FLOROS [GR] ___________ 09.01.19 _____________/*
________________ GF Exported Loadouts Script ________________Please keep the Credits or add them to your Diary
https://community.bistudio.com/wiki/SQF_syntax
Don't try to open this with the simple notepad.
For everything that is with comment // in front or between /*
means that it is disabled , so there is no need to delete the extra lines.You can open this ex:
with notepad++
https://notepad-plus-plus.org/and also use the extra pluggins
(this way will be better , it will give also some certain colors to be able to detect ex. problems )
http://www.armaholic.com/page.php?id=8680or use any other program for editing .
For the Compilation List of my GF Scripts , you can search in:
https://forums.bohemia.net/forums/topic/215850-compilation-list-of-my-gf-scripts/
*/
//________________ You can add in the init of a unit to exclude ________________
// this setVariable ["Var_GF_Exported_Loadouts_Sniper", true];
//________________ Settings ________________
//________________ Set true or false ________________//these are set false as normal weapons kit randomize already does this message. - Unluckymonster
_Systemchat_info = false;
_diag_log_info = false;
if(_Systemchat_info) then {
systemchat "GF Exported Loadouts Script Initializing";
};if(_diag_log_info) then {
diag_log "//________________ GF Exported Loadouts Script Initializing _____________";
diag_log "//________________ GF_Exported_Loadouts.sqf _____________";
};
//________________ add your sqf names of the exported loadouts ________________GF_Exported_Loadouts_array_Sniper = [
"Loadout_Sniper_1",
"Loadout_Sniper_2",
];
//________________ You can add an Exclude List ________________GF_Exported_Loadouts_Exclude_List_Sniper = [
"O_sniper_F",
];
GF_Exported_Loadouts_Sniper = {
_List = selectRandom GF_Exported_Loadouts_array_Sniper;
[_this] execVM format ["GF_Exported_Loadouts_Sniper\Loadouts\%1.sqf", _List];};
[] spawn {
while {true} do {
{
if (
((alive _x))
&& (!(_x getVariable ["Var_GF_Exported_Loadouts_Sniper",false]))
&& (((typeOf _x) in GF_Exported_Loadouts_Exclude_List_Sniper))
/*
//________________ You can filter the side here ________________
&& {((side group _x) == west ||
(side group _x) == east ||
(side group _x) == independent ||
(side group _x) == civilian)}
*/
// && (side group _x == playerSide)
// && (!(side group _x == playerSide))
) then {
_x spawn GF_Exported_Loadouts_Sniper;
};
_x setVariable ["Var_GF_Exported_Loadouts_Sniper",true];
{waitUntil {!alive _x};
_x setVariable ["Var_GF_Exported_Loadouts_Sniper",false];
};
}forEach allUnits;
sleep 5;
};
};
if(_Systemchat_info) then {
systemchat "GF Exported Loadouts Script Initialized";
};if(_diag_log_info) then {
diag_log "//________________ GF Exported Loadouts Script Initialized _____________";
};And here's Loadout_Sniper_1.sqf, (It's in the same Loadouts-folder as GF_Exported_Loadouts.sqf, is that a problem?)
Spoiler
//________________ Author : GEORGE FLOROS [GR] ___________ 09.01.19 _____________/*
________________ GF Exported Loadouts Script ________________
Please keep the Credits or add them to your Diaryhttps://community.bistudio.com/wiki/SQF_syntax
Don't try to open _unit with the simple notepad.
For everything that is with comment // in front or between /*
means that it is disabled , so there is no need to delete the extra lines.You can open _unit ex:
with notepad++
https://notepad-plus-plus.org/and also use the extra pluggins
(_unit way will be better , it will give also some certain colors to be able to detect ex. problems )
http://www.armaholic.com/page.php?id=8680or use any other program for editing .
For the Compilation List of my GF Scripts , you can search in:
https://forums.bohemia.net/forums/topic/215850-compilation-list-of-my-gf-scripts/
*/
_unit = _this select 0;
// Paste your exported loadout and change this to _unit//________________ Paste here : ________________
comment "Exported from Arsenal by Unluckymonster";
comment "Remove existing items";
removeAllWeapons this;
removeAllItems this;
removeAllAssignedItems this;
removeUniform this;
removeVest this;
removeBackpack this;
removeHeadgear this;
removeGoggles this;comment "Add containers";
this forceAddUniform "U_B_GhillieSuit";
this addItemToUniform "FirstAidKit";
for "_i" from 1 to 2 do {this addItemToUniform "7Rnd_408_Mag";};
this addItemToUniform "SmokeShell";
this addVest "V_Chestrig_rgr";
for "_i" from 1 to 3 do {this addItemToVest "7Rnd_408_Mag";};
for "_i" from 1 to 2 do {this addItemToVest "16Rnd_9x21_Mag";};
this addItemToVest "ClaymoreDirectionalMine_Remote_Mag";
this addItemToVest "APERSTripMine_Wire_Mag";
this addItemToVest "SmokeShellGreen";
this addItemToVest "SmokeShellBlue";
this addItemToVest "SmokeShellOrange";
for "_i" from 1 to 2 do {this addItemToVest "Chemlight_green";};comment "Add weapons";
this addWeapon "srifle_LRR_camo_F";
this addPrimaryWeaponItem "optic_LRPS";
this addWeapon "hgun_P07_F";
this addHandgunItem "muzzle_snds_L";
this addWeapon "Rangefinder";comment "Add items";
this linkItem "ItemMap";
this linkItem "ItemCompass";
this linkItem "ItemWatch";
this linkItem "ItemRadio";
this linkItem "ItemGPS";
this linkItem "NVGoggles";comment "Set identity";
this setFace "WhiteHead_04";
this setSpeaker "male07eng";-
1
-
-
21 hours ago, pierremgi said:I'm not sure George let you with such bad code with evident errors
20 hours ago, GEORGE FLOROS GR said:Indeed !
I gave him as well a working example .
Unluckymonster ,
generally what you want to achive is to have like a number of certain loadouts and aply one of them on random , to all units.
Since you asked for help ,
i will add a code here , in order to help , because as i'm always saying , this is why the forum is !
Helping and sharing information.
But if you want to ask a question for a certain thing , as now with my scripts , you can add your question to the current topic , in order everyone to get benefit from.
Yes you are both fully right, I apologize for my miscorrect writing.
16 hours ago, GEORGE FLOROS GR said:Not yet published
+GF_Exported_Loadouts_Script.VR.zip
Expires in: 4 Weeks | Size: 12.5 KB |
_this addEventHandler ["Killed",{ params ["_unit"]; _mag = primaryWeaponMagazine _unit select 0; removeAllWeapons _unit; _unit addMagazines [_mag,1]; }];
Yes, this script is very close of what I'm searching for!

However instead of randomizing all EAST or other side units, what I'm searching is to put like [] exec "Var_GF_Exported_Loadouts.sqf"; or something like that to each unit's Init-field. That way I could randomize sniper and ground forces-weaponneries seperately with own script-entities.
Right now I try to figure out which parts of code can be removed/ customised so that it would work like I'm searching for.
- Unluckymonster
-
1
-
-
So what kind of script I'm creating/ searching for is to have certain kits from which each unit's equippement is randomly selected from like kit2 is ACP2 and kit6 is revolver etc. for each unit which will have
[] exec "Class_randomize_script.sqf"; in their Init-field (or some other way?).
I already asked help from great scripter George Floros GR in private and he have helped me very openly already but it hasn't been enough to me get through with this problem.
Here's how far I have got this far:
SpoilerClass_randomize_simplest.sqf
//Randomise unit with one of created kits.
// Customised from _Custom Ammo Crates with Random Loadout_ script from _NotASemiPro_ user plus with George Floros GR assist
// - Unluckymonster//generates random number, I actually managed to get this work, such talented scripter wow
_number = selectRandom [1,2,3,4,5,6];
//Based on the random number, it adds the kit which is numbered. Example four-five pistol is 1 and Taurus revolver is 6.
// These kit's won't be used in my ArmA Far Cry-missions but I created these so it's easy for both of test/ customize the script without any mods.// 6 Pistol classes
if (_number == 1) then {Paul addMagazines ["11Rnd_45ACP_Mag", 3]; Paul addWeapon "hgun_Pistol_heavy_01_F";};
if (_number == 2) then {Paul addMagazines ["9Rnd_45ACP_Mag", 3]; Paul addWeapon "hgun_ACPC2_F";};
if (_number == 3) then {Paul addMagazines ["16Rnd_9x21_Mag", 3]; Paul addWeapon "hgun_P07_F";};
if (_number == 4) then {Paul addMagazines ["10Rnd_9x21_Mag", 3]; Paul addWeapon "hgun_Pistol_01_F";};
if (_number == 5) then {Paul addMagazines ["16Rnd_9x21_Mag", 3]; Paul addWeapon "hgun_Rook40_F";};
if (_number == 6) then {Paul addMagazines ["6Rnd_45ACP_Cylinder", 3]; Paul addWeapon "hgun_Pistol_heavy_02_F";};And here's what I'm aiming for:
SpoilerClass_randomize_simple.sqf
//Randomise unit with one of created kits.
// Customised from _Custom Ammo Crates with Random Loadout_ script from _NotASemiPro_ user.
// - Unluckymonster//I'm not even sure does the _unit statement work or does it need to be enterily something else?
_unit = _this select 0;
//generates random number
_number = selectRandom [1,2,3,4,5,6];
//Based on the random number, it adds the kit which is numbered. Example four-five pistol is 0 and Taurus revolver is 5.
// End of each kit have KILLED eventHandler which removes all Magazines except 1 magazine.
// These kit's won't be used ArmA Far Cry-missions but I created these so it's easy for both of test/ customize the script without any mods.// 6 Pistol classes
if (_number == 1) then {_unit addMagazines ["11Rnd_45ACP_Mag", 3]; _unit addWeapon "hgun_Pistol_heavy_01_F"; _unit addEventHandler ["KILLED", "this removeMagazine ""11Rnd_45ACP_Mag"]; _unit addEventHandler ["KILLED", "this removeMagazine ""11Rnd_45ACP_Mag"];};
if (_number == 2) then {_unit addMagazines ["9Rnd_45ACP_Mag", 3]; _unit addWeapon "hgun_ACPC2_F"; _unit addEventHandler ["KILLED", "this removeMagazine ""9Rnd_45ACP_Mag"]; _unit addEventHandler ["KILLED", "this removeMagazine ""9Rnd_45ACP_Mag"];};
if (_number == 3) then {_unit addMagazines ["16Rnd_9x21_Mag", 3]; _unit addWeapon "hgun_P07_F"; _unit addEventHandler ["KILLED", "this removeMagazine ""16Rnd_9x21_Mag"]; _unit addEventHandler ["KILLED", "this removeMagazine ""16Rnd_9x21_Mag"];};
if (_number == 4) then {_unit addMagazines ["10Rnd_9x21_Mag", 3]; _unit addWeapon "hgun_Pistol_01_F"; _unit addEventHandler ["KILLED", "this removeMagazine ""10Rnd_9x21_Mag"]; _unit addEventHandler ["KILLED", "this removeMagazine ""10Rnd_9x21_Mag"];};
if (_number == 5) then {_unit addMagazines ["16Rnd_9x21_Mag", 3]; _unit addWeapon "hgun_Rook40_F"; _unit addEventHandler ["KILLED", "this removeMagazine ""16Rnd_9x21_Mag"]; _unit addEventHandler ["KILLED", "this removeMagazine ""16Rnd_9x21_Mag"];};
if (_number == 6) then {_unit addMagazines ["6Rnd_45ACP_Cylinder", 3]; _unit addWeapon "hgun_Pistol_heavy_02_F"; _unit addEventHandler ["KILLED", "this removeMagazine ""6Rnd_45ACP_Cylinder"]; _unit addEventHandler ["KILLED", "this removeMagazine ""6Rnd_45ACP_Cylinder"];};
Above code (obviously?) doesn't work and I have taken parts of it from _NotASemiPro_ user's "_Custom Ammo Crates with Random Loadout_ script" but since he hasn't visited BI-forum in 5 years I didn't even try to ask his help.
So what I still need help with?:
1) How I get _unit or whatever work so that it works for any unit seperatly? Creating sqf-file for each enemy unit doesn't sound wise way to do it

2) How to get eventHandlers work in .sqf form? In-game I get it work like this
Spoilerthis addEventHandler ["KILLED", "this removeMagazine ""11Rnd_45ACP_Mag"];
but in sqf it doesn't work and I have tried many different " ] } ; placements without getting it to work.
Those who have opened my earlier published missions and campaigns at Eden editor might have realized I'm not very good with .sqf-codes. I tried to check George's "Drop Loot Script", "Set Custom Loadout Script" and "Auto random loadout script" but don't been able to understand if I could customize those scripts the way I want to and if I could, how?What I'm asking for your help is to either customize my Class_randomize_simple or simplest so that it would work like I have intended, customize one George's great scripts so that I can use it the way I intend or either create totally new script that would work like intended.
If you manage to help me you will be absolutly credited in the missions credits-scenes and in the download-page like I have done in my earlier missions and campaigns when people have helped me in various obstacles.
- Unluckymonster -
Got excatly same report with Avast.
-
Thanks phronk, that worked! Will mention you in campaign credits once I get it finished.
-
Hey,
in the last mission of my campaign that I'm working with I want in last briefing mention player's real name like this:
player createDiaryRecord["Diary", ["1. THANKS FOR PLAYING!", "Hello ABCPlayer123 it's Unluckymonster, creator of this campaign. First of all congratulations, you are one cutscene away from finishing Nogova Crisis campaign! I hope you have enjoyed this far."]];
The thing works in nuxil's code-example in titleText but is there anyway it works in createDiaryRecords too?
https://forums.bistudio.com/forums/topic/87663-displaying-players-name-in-mp/
-
Ah, now I realized it.
BI have simply just removed the coloring style used earlier so now on it's all just white text but with bigger font. Might try later if I'm able to change colors of names so it's easier to realize what faction talking person is pat of.
["Niko","There arrives Pietar Strugar, he wanted to see you immeaditly when you arrive to my home."] call BIS_fnc_showSubtitle;
Thx for all who replied.
-
4 hours ago, fn_Quiksilver said:good time to advise people that if they are using any BIS functions, to make a local copy of it to use instead, so your project isn't put at further risk by arma updates.
What do mean by "make a local copy of it"?
-
So,
before release Laws of War-DLC with BIS_fnc_dynamicText worked so that you were able to have dialogue where you were able seperately change color and font of who is speaking and the text. Most who have played APEX Protocol-campaign what I'm talking about but here's a picture where I have changed my WIP campaign cutscene name "Niko" in to purple as civilians marker color.
["<t color='#9900cc'font = 'TahomaB'>Niko","<t font = 'TahomaB'>There arrives Pietar Strugar, he wanted to see you immeaditly when you arrive to my home."] call BIS_fnc_showSubtitle;
However, in Laws of war-DLC this was changed that talker's name is above and the text is lower as picture below.
Problem with this is that BI either accidentally or purposly removed ability to use earlier mentioned method and now all my cutscene dialogues are not working. I searched internet and this forum with keyword "text" 15 pages and with "subtitles" two topics without resulst.
And since all DLC content is .EBO and not .PBO form I'm not even able to check how the dynamicText works after LOW-DLC update.

So next time you BI change something already existing atleast please tell how the new way works before replacing one so I don't need to get depressed and use that small time I dedicate to create missions to instead find resolution for something that worked earlier.
- Unluckymonster
EDIT:
Figured it out like I wanted! Simply adding blank "", and then doing the customisation works like earlier before LOW-DLC update.
["","<t color='#99ccff'>Alpha</t> Bravo, this is Alpha. What is your status?"] call BIS_fnc_showSubtitle;
-
1
-
-
When BI releases next ArmA I really wish we can find their names also on some graveyard.
-
6
-
-
A bit more information might be helpful for those who don't know what to do with that.
That syntax belongs into the init field of the unit. But its also possible to make this a bit more generic, so it doesn't depend on a single unit:
Before the car is hooked:
{_x enableSimulationGlobal false} forEach crew _car;No success, disabled also Inform model but didn't help either.
-
Hi,
got idea to make small mission where you interrigate inform by putting him inside car, hook car to helicopter and fly around and hitting car to trees etc.
However, the Ai likes to jump out of vehicle sometimes. What I'm searching answer for is to make Ai just simply to stay in vehicle no matter what happens when vehicle is hooked.
Down below command lines used but that dosen't have worked:
(inform: guy which is inside car and idea is to just stay inside car whole mission)
commandstop this;
this enableAttack false;
this disableAI "target";
doStop this;
this allowFleeing 0;
this setBehaviour "CARELESS";
this allowCrewInImmobile true;
this disableai "autotarget";
this disableAI "FSM";
this disableAI "THREAT_PATH";
this disableAI "PATHPLAN";
this disableAI "GROUNDAVOID";
this disableAI "MOVE";
this disableAI "ANIM";
-----
Put part of these commands to car also but these don't help either:
(car: vehicle inside have the inform which is going to be hooked to helicopter and make inform day worst)
car lockCargo true;
car lockDriver true;
this allowCrewInImmobile true;
this disableAI "FSM";
this disableAI "THREAT_PATH";
this disableAI "PATHPLAN";
this disableAI "GROUNDAVOID";
this disableAI "MOVE";
this disableAI "ANIM";
And of course vehicle set to lock. Disabling inform "show model" and "enable simulation" haven't helped either.
Hard to belive it's so hard to make just one unit inside one car and stay there no matter what. :wacko:
- Unluckymonster
EDIT:
also tried this setUnloadInCombat [FALSE,FALSE]; command to both vehicle and interrigated, no success either.
[Release] Virtual Arsenal Shop System
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted
Damn @ixaak you should be promoted already! 🕺