-
Content Count
147 -
Joined
-
Last visited
-
Medals
Everything posted by MKD3
-
Creating GUIs: Why does createDialog returns "False"?
MKD3 replied to Moldisocks's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Im gonna guess its because youre doing it in description.ext and there is two totally different definitions, mine which are from an addon and use BIS classes, and yours, which redefine everything. It probably boils down to a description.ext UI requiring definition.- 30 replies
-
- gui
- createdialog
-
(and 2 more)
Tagged with:
-
Creating GUIs: Why does createDialog returns "False"?
MKD3 replied to Moldisocks's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Nah, means it isnt configured correctly so even though the code is correct, its not opening. your createdialog code is fine, its the way the UI thats configured that is causing issues- 30 replies
-
- gui
- createdialog
-
(and 2 more)
Tagged with:
-
Creating GUIs: Why does createDialog returns "False"?
MKD3 replied to Moldisocks's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This could be right actually. In which case, cut all of that out, whack it in defines.hpp and include it in description.ext so you dont need to ever look at it again. Ive only really worked on addon UIs, so my example above is that. Hope it helps anyway- 30 replies
-
- gui
- createdialog
-
(and 2 more)
Tagged with:
-
Creating GUIs: Why does createDialog returns "False"?
MKD3 replied to Moldisocks's topic in ARMA 3 - MISSION EDITING & SCRIPTING
It returns true if it successfully opens the dialog. If it fails, it returns false, Ie. the dialog isnt configured or referenced correctly. Which is likely your problem- 30 replies
-
- gui
- createdialog
-
(and 2 more)
Tagged with:
-
Creating GUIs: Why does createDialog returns "False"?
MKD3 replied to Moldisocks's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yup, all of those classes are BIS created and already exist, you just reference them. Here is an example of a small UI I have made.- 30 replies
-
- gui
- createdialog
-
(and 2 more)
Tagged with:
-
Creating GUIs: Why does createDialog returns "False"?
MKD3 replied to Moldisocks's topic in ARMA 3 - MISSION EDITING & SCRIPTING
All of that crap up the top of your config can be replaced with this class IGUIBack; class RscPicture; class RscFrame; class RscText; class RscEdit; class RscListbox; class RscControlsGroup; class RscCombo; class RscButton; class RscStructuredText; class RscButtonMenu; As to your problem? If it returns false, it means it failed to open a dialog Try formatting your GUI like this class My_Dialog { idd = 10000; name = "My_dialog"; class controls { class MY_BackGround: IGUIBack { idc = 6501; x = 0.355625 * safezoneW + safezoneX; y = 0.39 * safezoneH + safezoneY; w = 0.350625 * safezoneW; h = 0.242 * safezoneH; }; }; }; And calling this createDialog "my_dialog";- 30 replies
-
- 1
-
- gui
- createdialog
-
(and 2 more)
Tagged with:
-
Creating GUIs: Why does createDialog returns "False"?
MKD3 replied to Moldisocks's topic in ARMA 3 - MISSION EDITING & SCRIPTING
misread, edited out- 30 replies
-
- gui
- createdialog
-
(and 2 more)
Tagged with:
-
Problem with a hint firing from an addaction on a Dedicated Server
MKD3 replied to burdy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You dont need to be using remoteExec if youre doing this locally for a client for one. Here is a BIS example: _act = player addAction ["Exec the file", "somescript.sqf"] If you already know its local, you should be able to rework that for your purposes, including whats above :) -
This is locking the script. Its checking the first element and waiting until its dead, not looping through all the elements. //Put whatever you want to stop the loop in here, eg while atleast one unit is alive while { ({alive _x} count ARRAY_UNIT > 0) } do { { if (!alive _x) then {ARRAY_UNIT = ARRAY_UNIT - [_x]}; } foreach ARRAY_UNIT; sleep 1; };
-
How to make a script loop forever
MKD3 replied to ZU23's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yeah just putting it out there -
How to make a script loop forever
MKD3 replied to ZU23's topic in ARMA 3 - MISSION EDITING & SCRIPTING
^ youre gonna have a bad time without a sleep in there also. -
Teleport players into vehicle
MKD3 replied to Luckyas's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Why wouldnt you mention it was JIP dependent then? Outline exactly what you want or you wont get the correct answer. //Initplayerlocal.sqf fn_teleport = { if (didJIP) then { player moveincargo unit1}; }; //Wherever you want [] remoteExec ["fn_teleport", allPlayers]; -
Teleport players into vehicle
MKD3 replied to Luckyas's topic in ARMA 3 - MISSION EDITING & SCRIPTING
{_x moveincargo unit1} foreach allplayers; Pretty simple one -
Yeah, but not in what I provided...
- 11 replies
-
RemoteExec calls the function on all player clients, meaning global commands are not needed. Shouldnt affect anything. Use the code with the hint in it and see if your friend sees it, if he doesn't, then there is a problem. This doesnt require a trigger. Try adding the code to initplayerlocal.sqf, that will ensure its defined on all clients.
- 11 replies
-
_hider and _seeker are passed to the function via the addaction. No need to do anything with naming them. Just tested myself using this code fn_Catch = { params ["_hider", "_seeker"]; if (_hider == player) then {player enablesimulation false;}; hint format ["%1,%2", _hider, _seeker]; }; That will show you who is set as hider and seeker in a hint if you want to see that its working in SP, use it on an AI unit, youll see no result other than a hint. The code I gave will work, but as it requires the _hider to be a player (_hider == player) in this instance, it will only work in MP
- 11 replies
-
Forgot to double the ""; h1 addaction ["Catch!", "[_this select 0, _this select 1] remoteExec [""fn_catch"",allplayers]"]; See if that works
- 11 replies
-
Use this: https://community.bistudio.com/wiki/remoteExec maybe something like: h1 addaction ["Catch!", "[_this select 0, _this select 1] remoteExec ["fn_catch",allplayers];"]; //init.sqf fn_Catch = { params ["_hider", "_seeker"]; if (_hider == player) then {player enablesimulation false;}; };
- 11 replies
-
- 1
-
Yeah sorry no need to name the units, I was half awake. But you had it sorted, I wouldnt use an isServer check, just run that code in initServer.sqf - Less chance of a mix up, sorry about the half assed initial response lol.
-
Problem 1: Unit inits are global, every player that connects and enters will call that code. Use initPlayerLocal.sqf and name your units. Problem 2: try https://community.bistudio.com/wiki/addBackpackCargoGlobal
-
I use it as a sound config so players who have music turned off hear it. Same thing for music but slightly different configs. Add (in this case) music.ogg to your mission file (copy class music and change it for additional files) //In description.ext class CfgSounds { class music { name = "music"; sound[] = {"music.ogg", db+5, 1}; titles[] = {}; }; }; //Locally on clients player say2d 'Music'; Thats how I do it for intro scenes, basic and works
-
Selection of a unit in a group
MKD3 replied to Ivanoff.N's topic in ARMA 3 - MISSION EDITING & SCRIPTING
params ["_unit"]; private ["_selectedUnit"]; _group = group _unit; { _vehicle = vehicle _x; //if vehicle != unit, unit is mounted if ((_unit != _vehicle) && (_unit == gunner _vehicle)) then {_selectedUnit = _x}; } foreach units _group; _selectedUnit; Try that, written here so not tested but should return a unit if it is a gunner. -
how to you stop AI units from using a empty vehicle on the map.
MKD3 replied to avibird 1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
https://community.bistudio.com/wiki/setVehicleLock This is what I meant. EDIT: LockHelicopter.sqf //Not tested on dedicated Server helicopter1 setVehicleLock "LOCKED"; waituntil { sleep 3; ( {_x distance (getPos Helicopter1) < 10} count allPlayers) > 0; }; helicopter1 setVehicleLock "UNLOCKED"; -
how to you stop AI units from using a empty vehicle on the map.
MKD3 replied to avibird 1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Lock it and have it unlock when players are within 5 metres of it? -
Add WP to randomly spawned unit.
MKD3 replied to egbert's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Look into this https://dev.withsix.com/docs/cba/files/ai/fnc_taskPatrol-sqf.html