Jump to content

HazJ

Member
  • Content Count

    2756
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by HazJ

  1. HazJ

    ListBox Help

    Works for me? 10 is 10 seconds. // description.ext #include "test.hpp" // test.hpp class test { idd = 2001; movingEnable = 1; onLoad = "[] spawn sg_fnc_helpInfo;"; onUnload = ""; class controls { class sg_helpInfoText_1 : RscStructuredText { idc = 5546; x = safeZoneX + safeZoneW * 0.4675; y = safeZoneY + safeZoneH * 0.38666667; w = safeZoneW * 0.126875; h = safeZoneH * 0.04; text = "Default text..."; // to see if issue is with SQF code setting new text }; }; }; // init.sqf sg_fnc_helpInfo = { disableSerialization; private _display = findDisplay 2001; _text = _display displayCtrl 5546; _text ctrlSetStructuredText parseText "You have selected Spawn A Vehicle."; // instantly shows... // even with: _text ctrlCommit 10; }; // It now seems that ctrlCommit isn't needed?
  2. HazJ

    ListBox Help

    Ah, ctrlCommit lol. DAMN IT ARMA!!!! https://community.bistudio.com/wiki/ctrlCommit You need this. Add after ctrlSetStructuredText line.
  3. Yeah, same here... They like to troll us! Haha. 😋 EDIT: No, it is there lol. On second check haha!
  4. HazJ

    ListBox Help

    Do you not even the default initial text? I just had a thought, do you have a background or another control there? It might be overlapping since I can see it. I just had to adjust the height value as it was extremely hard to read. // description.ext #include "test.hpp" // in root // test.hpp class test { idd = 113175; movingEnable = 1; onLoad = ""; onUnload = ""; class controls { class sg_helpInfoText_1 : RscStructuredText { idc = 5546; x = safeZoneX + safeZoneW * 0.4675; y = safeZoneY + safeZoneH * 0.38666667; w = safeZoneW * 0.126875; h = safeZoneH * 0.04; // adjusted this text = "Default text..."; // to see if issue is with SQF code setting new text }; }; }; Confirm you can see it then we can look at the next thing.
  5. You're welcome! It wasn't you. I couldn't see it on first glance. In fact I couldn't see it at all when I had filters on All All, etc... I had to change second combo. Probably just me being blind haha.
  6. HazJ

    ListBox Help

    Add disableSerialization; in sg_fnc_helpInfo too. This should fix it but if that doesn't then: No errors when calling sg_fnc_helpInfo? Correct IDD and IDCs. Try using latest base defines here. Or share your RscStructuredText defines so I can check them. I notice you set style there, etc... class sg_helpInfoText_1 : RscStructuredText { idc = 5546; x = safeZoneX + safeZoneW * 0.4675; y = safeZoneY + safeZoneH * 0.38666667; w = safeZoneW * 0.126875; h = safeZoneH * 0.01; text = "Default text..."; // to see if issue is with SQF code setting new text };
  7. You mean this? /* Author: Nelson Duarte Description: Spawns object of given class and makes it travel, hooming towards the target To be used with CfgAmmo type of entity, but can be used with virtually any kind of object Parameters: _startPos: ARRAY The initial position of the projectile (ASL) _class: STRING or OBJECT The class name of the object to spawn or an object entity already existing _target: OBJECT The target object the projectile will be hooming towards to _speed: SCALAR The speed the object should assume _destroyTarget: BOOL Whether to force destruction of the target object on detonation _localOffset: ARRAY The model space position offset that projectile should be hooming towards to _minDistanceToTarget: SCALAR The minimal distance projectile needs to be from target position to enter ballistic mode _function STRING The function to execute on the created object with params [<object>] _isGlobalFunction BOOL Whether the executed function should be executed on all connected machine, false to execute only on the server Returns: NOTHING */ // Campaign common includes #include "\A3\Missions_F_Exp\Campaign\commonDefines.inc" // Can only be run on the server if (!isServer) exitWith { "fn_guidedProjectile should run on the server" call BIS_fnc_error; }; // Can only be run on scheduled env if (!canSuspend) exitWith { "fn_guidedProjectile should run on Scheduled Env" call BIS_fnc_error; }; // Parameters params [ ["_startPos", [0.0 , 0.0, 0.0], [[]]], ["_class", "M_Titan_AT", ["", objNull]], ["_target", objNull, [objNull]], ["_speed", 100.0, [0.0]], ["_destroyTarget", true, [true]], ["_localOffset", [0.0, 0.0, 0.0], [[]]], ["_minDistanceToTarget", 5.0, [0.0]], ["_function", "", [""]], ["_isGlobalFunction", false, [true]] ]; // Validate parameters if (count _startPos != 3 || {{typeName _x != typeName 0} count _startPos > 0}) exitWith {"fn_guidedProjectile invalid position, not a 3D vector" call BIS_fnc_error}; if (_startPos isEqualTo [0,0,0]) exitWith {"fn_guidedProjectile invalid position, at 0,0,0" call BIS_fnc_error}; if (typeName _class == typeName "" && {_class == ""}) exitWith {"fn_guidedProjectile invalid class provided" call BIS_fnc_error}; if (typeName _class == typeName objNull && {isNull _class}) exitWith {"fn_guidedProjectile invalid object provided" call BIS_fnc_error}; if (isNull _target) exitWith {"fn_guidedProjectile invalid target provided" call BIS_fnc_error}; // Create the projectile private _rocket = if (typeName _class == typeName "") then {createVehicle [_class, _startPos, [], 0, "CAN_COLLIDE"]} else {_class}; // Make sure creation was succeeded if (isNull _rocket) exitWith { ["fn_guidedProjectile could not spawn rocket of class %1 at %2", _class, _startPos] call BIS_fnc_error; }; // Call function if requested if (_function != "" && {call compile format["!isNil {%1}", _function]}) then { [_rocket] remoteExec [_function, if (_isGlobalFunction) then {0} else {2}]; }; // Set correct initial position _rocket setPosASL _startPos; // Loop while {!isNull _rocket && {!isNull _target}} do { private _currentPos = getPosASLVisual _rocket; private _targetPos = if !(_localOffset isEqualTo [0.0, 0.0, 0.0]) then {AGLToASL (_target modelToWorldVisual _localOffset)} else {getPosASLVisual _target}; private _forwardVector = vectorNormalized (_targetPos vectorDiff _currentPos); private _rightVector = (_forwardVector vectorCrossProduct [0,0,1]) vectorMultiply -1; private _upVector = _forwardVector vectorCrossProduct _rightVector; private _targetVelocity = _forwardVector vectorMultiply _speed; _rocket setVectorDirAndUp [_forwardVector, _upVector]; _rocket setVelocity _targetVelocity; if (isNull _rocket || {isNull _target} || {getPosASLVisual _rocket distance _targetPos <= _minDistanceToTarget}) exitWith { if (!isNull _rocket) then {_rocket setDamage 1; _rocket = objNull;}; if (_destroyTarget && {!isNull _target}) then {_target setDamage 1;}; }; sleep 0.01; };
  8. HazJ

    ListBox Help

    Oh, I guess I misunderstood too. Create another control type like you did before? Use RscText or RscStructuredText - Give it an IDC, adjust x/y/w/h values, etc... class whatever : RscStructuredText { // stuff... }; _text = _display displayCtrl <IDC>; // Replace <IDC> with actual number _text ctrlSetStructuredText parseText "You have selected Spawn A Vehicle.";
  9. HazJ

    ListBox Help

    I edited my post above. Forgot to add _display before.
  10. Ah, so manual process hehe. @dave_beastttt - This means there is no trains DLC now... 🤣😋
  11. HazJ

    ListBox Help

    private _display = findDisplay 2001; private _lb = _display displayCtrl 5545; { _x params ["_leftText", "_rightText"]; _lb lbAdd _leftText; _lb lbSetTextRight [_forEachIndex, _rightText]; } forEach [ ["Item 1", "£200"], ["Item 2", "£400"], ["Item 3", "£600"] ]; Not tested. I use this syntax. Not sure which you should really use, technical details, etc... I know that lbSetTextRight only has the one syntax. Maybe @Larrow will know which to use? Usually one is for dialogs and the other not. However never seen LB use for non dialog. Doesn't make sense to do so?
  12. @Larrow - I use your defines from your Dropbox. However, I had to manually add it.as I was using old version. How did you gather all those defines anyway since the BIS function is broken? At least last time I checked.
  13. HazJ

    ListBox Help

    Use _forEachIndex so it gets the current iteration. https://community.bistudio.com/wiki/Magic_Variables#forEachIndex
  14. HazJ

    ListBox Help

    Why not use: https://community.bistudio.com/wiki/lbSetTextRight ?
  15. Are you sure your defines doesn't have it already? This is for RscMapControl type.
  16. I had it to add it. Are you using ctrlCreate command?
  17. OH NO HE DIDN'T!!! 🤣🤣 Nothing like a good train pun to let off some steam!
  18. The thing that annoyed me about debug console was a change in some patch, wasn't recent patch but it was a patch. I have to click --- Exec since I can no longer just hit Enter on keyboard. Now that I think about it, maybe it is something in controls? Just me?
  19. HazJ

    1.90 update - Troubleshooting

    Was it really necessary? Or was there some other reason why random people got kicked when running vanilla server + modified content (mods such as RHS - spawned in, not in SQM). It was really weird and very random.
  20. HazJ

    1.90 update - Troubleshooting

    When I used to run servers a couple years ago we ran vanilla missions so that people could connect. However we did spawn custom content but it was never dependent. For reasons unknown to me, I had to have the following in the server config file to prevent random players getting kicked with "Session lost". // regularCheck = ""; regularCheck = "{}"; + v2 sigs.
  21. Hmm. I think the issue last time happened after release, at least according to a BI developer. Something breaks on release. I don't think they would intentionally release something untested/broken. It is annoying that it is an issue however especially for those heavily modded servers. I'm sure a BI representative will comment soon (I hope).
  22. Shh, they don't need to know the magic behind the beauty.
  23. Authority clear craters secondary! ❤️
  24. Why use words when you can... https://giphy.com/explore/facepalm 🤣🤣
×