-
Content Count
191 -
Joined
-
Last visited
-
Medals
Everything posted by Smart Games
-
performance difference between deleteVehicle and hideObject
Smart Games replied to Smart Games's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@gc8, I optimized my code and made them only spawn when I am near + hide them, if the players are far away. I pretty much doubled my fps. ^^ -
force spawned Ai to move on roads
Smart Games posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi there, I want to create some Ai units which drive on roads from one position to another in a cycle. I managed to spawn them, but can't make them move. I tried calculatepath, setDestination, forcefollowroad and waypoints. spawn code (works fine): private _pos1 = [_center, 5, _axis, 3, 0, 20, 0] call BIS_fnc_findSafePos; private _road1 = [_pos1, 500] call BIS_fnc_nearestRoad; private _agent = (createGroup east) createUnit [getText (_units_town select (random ((count _units_town) -1))), getPos _road1, [], 0, "NONE"]; private _car = (getText (_vehicles_military select (random ((count _vehicles_military) -1)))) createVehicle (getPos _agent); _agent moveInDriver _car; private _pos2 = [_center, 5, _axis, 3, 0, 20, 0] call BIS_fnc_findSafePos; private _road2 = [_pos1, 500] call BIS_fnc_nearestRoad; The Ai should move from _road1 to _road2. Thanks for your help! -
force spawned Ai to move on roads
Smart Games replied to Smart Games's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Oh God - I am so stupid. I forgot to make the second position a random one. Yeah, thank you! 😉 -
force spawned Ai to move on roads
Smart Games replied to Smart Games's topic in ARMA 3 - MISSION EDITING & SCRIPTING
That doesn't help. Anyone else has an idea? -
Configure Spawn-Locations in Config-File?
Smart Games posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello all, I am currently working on a Ui in which you can select a spawn location from a list box and then be teleported there. I imagine to store the locations in something of the following type in a config file, but I have no idea how to do it: class JF_Locations { class Devils_Mountain { name = "Devil's Mountain"; id = 001; air = true; //is it allowed to spawn via airdop land = true; //is it allowed to spawn on the ground water = false; //is it allowed to spawn on the water coordinates = [100, 100, 0]; description = "blablabla"; }; class Under_Water_Palace { name = "Under Water Palace "; id = 002; air = false; //is it allowed to spawn via airdop land = false; //is it allowed to spawn on the ground water = true; //is it allowed to spawn on the water coordinates = [50, 250, 0]; description = "blablabla"; }; }; If it's possible, how do I read the locations from the config file and turn them into an array or something? Is there a better way? I like this clean format. Thank in advance, Jacob -
Configure Spawn-Locations in Config-File?
Smart Games replied to Smart Games's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thank you, @gc8! Works like a charme 🙂 -
Help on Random Spawn direction
Smart Games replied to 1para{god-father}'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
_myUnit = (createGroup east) createUnit ["O_Soldier_F", getpos player, [], 0, "NONE"]; _myUnit setDir (random 360); @Nemanjic just follow @beno_83au's advice next time -
Possible to create a HUD with ctrlCreate?
Smart Games posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Today I discovered the command CtrlCreate and saw that you can create a full UI with it via function and without description.ext. But I wonder if it is also possible to create a HUD with this (or an unknown but similar) command. My attempts so far have always failed, because by default you create a UI that you can interact with. Many thanks, Jacob -
Possible to create a HUD with ctrlCreate?
Smart Games replied to Smart Games's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Found a solution: description.ext: #include "Core\GuiBaseClasses.hpp" class CfgFunctions { class JF { class Hud { class DynamicCreate {file = "Core\Scripts\DynamicCreate.sqf"}; class DynamicChange {file = "Core\Scripts\DynamicChange.sqf"} }; }; }; class RscTitles { class Ui_Dynamic { idd = -1; duration = 9999999; onLoad = "uiNamespace setVariable ['dynamic_ui', _this select 0]; [] spawn JF_fnc_DynamicCreate"; onUnLoad = "uiNamespace setVariable ['dynamic_ui', nil]"; }; }; DynamicCreate.sqf: disableSerialization; private _parent = uiNamespace getVariable "dynamic_ui"; private _ctrl = _parent ctrlCreate ["RscText", 111]; _ctrl ctrlSetPosition [0,0,1,0.04]; _ctrl ctrlSetBackgroundColor [0,0,0,1]; _ctrl ctrlSetText "Test"; DynamicChange.sqf: disableSerialization; params ["_text"]; private _parent = uiNamespace getVariable "dynamic_ui"; private _ctrl = _parent displayCtrl 111; _ctrl ctrlSetText _text; Got the base classes with: "Default" call BIS_fnc_exportGUIBaseClasses; Call it with: 111 cutRsc ["Ui_Dynamic", "PLAIN"] Edit it with: ["MyNewText"] call JF_fnc_DynamicChange I really would like to know, wheter the creation via function could be more beneficial than the creation via .hpp file, or limiting. Thanks! -
Activating a trigger with any combination of multiple conditions
Smart Games replied to Mebeover's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Here is an example of a solution, even if the trigger could have been omitted. The whole thing is not particularly variable in use, but it offers a good basis. Just take a look at it: https://ufile.io/3xkho8j3 -
Will-my-pc-run-Arma3? What cpu/gpu to get? What settings? What system specifications?
Smart Games replied to Placebo's topic in ARMA 3 - GENERAL
I wonder whether we can expect more frames in ArmA from Intels or AMDs next gen processors. -
Will-my-pc-run-Arma3? What cpu/gpu to get? What settings? What system specifications?
Smart Games replied to Placebo's topic in ARMA 3 - GENERAL
I'd say they use a completely different game engine. -
Will-my-pc-run-Arma3? What cpu/gpu to get? What settings? What system specifications?
Smart Games replied to Placebo's topic in ARMA 3 - GENERAL
@Groove_Cwhat's the benefit of a much higher L3 Cache? Are we going to see some performance increases in Arma? -
At the moment I don't have any ideas for scripts (MP), so I wanted to ask if you can give me some suggestions. Jacob
-
Will-my-pc-run-Arma3? What cpu/gpu to get? What settings? What system specifications?
Smart Games replied to Placebo's topic in ARMA 3 - GENERAL
@Groove_C i wonder if it's worth waiting for Intels 12th gen. I didn't play Arma in a while, but i assume my i3-9350kf is still one of the better CPUs for Arma. -
I would like to create a Startscreen with black background like this: Mission Name //text given by first variable Made by Me //text given by second variable But I am not able to create two titletexts at the same time. So i tried to use titletext with structured text: titleText [_var1 <br/>_var2,"PLAIN",-1,false,true]; //not working Any Ideas?
-
Will-my-pc-run-Arma3? What cpu/gpu to get? What settings? What system specifications?
Smart Games replied to Placebo's topic in ARMA 3 - GENERAL
@Gunter Severloh sometimes some tasks challenge your PC more than you think! For example i tried to run my (i3 9350kf @5ghz) @1,285 V. 30 min of AIDA64, CPU at 100% usage, no problems. Then i started a game and Netflix to relax. Everything fine...? NO, when i opened a ingame shop and it had to load some items, my PC froze. Same thing as you described. Changed my Cpu Voltage to 1.296V and everything is fine now. Maybe your CPU config wasn`t as stable as you thought? Good luck to find it out, maybe I was a help! -
Error when there is no player in squad lead spot
Smart Games replied to InsanityGamer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Didn`t refresh the page and @Larrow was faster 🙂 -
Error when there is no player in squad lead spot
Smart Games replied to InsanityGamer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi. welcome to the forum! 2 advices: 1) Organize your Code description.ext: class CfgFunctions { class JF { class Scripts { class SetPos {file = "SetPos.sqf"}; } } } initPlayerLocal.sqf player addAction [ "<t color= '#FFFF00'>Teleport to Squad Leader</t>", {[player] spawn JF_fnc_SetPos} ] SetPos.sqf params ["_unit"]; private _counter = { for "_i" from 10 to 1 step -1 do { hint format ["You will be teleported in %1 seconds.", _i]; sleep 1; }; }; private _isLeader = 0; switch (_unit) do { case SquadLeader_1: {hint "You are the Squad Leader, Figure out a ride for your squad!"; _isLeader = 1}; case SquadLeader_2: {hint "You are the Squad Leader, Figure out a ride for your squad!"; _isLeader = 1}; }; if (_isLeader != 1) then { switch (group _unit) do { case (group SquadLeader_1): {[] call _counter; _unit setPos (getMarkerPos "SquadTeleportLocation_1"); hint "0"}; case (group SquadLeader_2): {[] call _counter; _unit setPos (getMarkerPos "SquadTeleportLocation_2"); hint "0"}; case (group COC): {hint "You're an officer. Just order your own ride."}; case (group Pilot): {hint "Why dont you go take your helicopter?"}; case (group Recon): {hint "You're Recon, Right? Looks like your humping it in."}; }; }; //i know, it`s awful 2) Read some documentations about MP scripting Your code is fine, but it isn`t ready for MP. You said that you get an error when you want to spawn on the unit: That`s the case because most likely you do not play with the leader as an ai unit. For Example: Your leader`s name is SquadLeader_1. If this unit isn`t played by ai or a player it simply does not exist! You Script wants to compare the group of the player with the group of a non existing unit. That can`t work! So double check and rethink your code. In the beginning it`s really difficult! -
Hello, i want to use a structured text to display a message on a UI. But the attributes color, valign, shadowColor don`t change! If you find my mistake, i`d be really happy. UI Class: class Notification { idd= 55000; duration = 5; onLoad= "uiNamespace setVariable ['MMF_Notification', _this #0]"; controls[]= { MyNotification }; class MyNotification: RscStructuredText { idc = 1; }; }; Function to call and set it: disableSerialization; params [ ["_text", ""], ["_position", [0,0,0.2,0.1]], ["_bgColor", [0,0,0,1]], ["_size", "1"], ["_font", "PuristaMedium"], ["_color", "#FFFFFF"], ["_align", "right"], ["_valign", "middle"], ["_imagePath", ""], ["_shadow", "0"], ["_shadowColor", "#000000"], ["_shadowOffset", "0.5"], ["_underline", "0"] ]; titleRsc ["Notification","PLAIN"]; private _parent = uiNamespace getVariable "MMF_Notification"; private _ctrl = _parent displayCtrl 1; _ctrl ctrlSetPosition _position; _ctrl ctrlCommit 0; _ctrl ctrlSetBackgroundColor _bgColor; _ctrl ctrlSetStructuredText parseText format [ " <t size=%2 font=%3 color=%4 align=%5 valign=%6 shadow=%7 shadowColor=%8 shadowOffset=%9 underline=%10 image=%11> %1 </br> </t> ", _text, _size, _font, _color, _align, _valign, _shadow, _shadowColor, _shadowOffset, _underline, _imagePath ]; Any Ideas? Thanks in advance, Jacob
-
Calculate height and width of letter on GUI
Smart Games posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I use RscStructuredText. The size attribute is set by default to: (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) That equals font size 1. Now i want to set my UI width and height exactly to the height and width of the entered text. Any Ideas? Thanks, Jacob -
Calculate height and width of letter on GUI
Smart Games replied to Smart Games's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks again @Larrow, I didn't know these commands 🙂 -
Structured text on UI
Smart Games replied to Smart Games's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You`re an angle, @Larrow! Looks like you mostly have to help me out with these simple mistakes. But one more thing. -> I can`t get valign to work. The Syntax should be right now. Is there some sort of bug with this command? Thanks, Jacob -
Want to display a notification window via titleRsc but can`t change its text. class Notification { idd= 55000; duration = 5; onLoad= "uiNamespace setVariable ['JF_Notification', _this]"; controlsBackground[]= { }; controls[]= { RscNotification }; objects[]= { }; class RscNotification: RscText { idc = 1; colorBackground[] = {0,0,0,1}; colorText[] = {1,1,1,1}; font = "PuristaMedium"; x = 0; y = 0; h = 1/15 * safezoneH; w = 1/8 * safezoneW; }; }; And my function to create it: ... titleRsc ["Notification","PLAIN"]; ... private _parent = uiNamespace getVariable "JF_Notification"; private _ctrl = _parent displayCtrl 1; ... _ctrl ctrlSetText "HI"; Any Ideas? Thanks in advance Jacob
-
Define Arrays in Description.ext?
Smart Games posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Is there a way to define global arrays in the description.ext? Atm i have written them into a .sqf file, but i don`t like the idea to call them via init.sqf. Any ideas?