Jump to content

Kingsley1997

Member
  • Content Count

    205
  • Joined

  • Last visited

  • Medals

Everything posted by Kingsley1997

  1. Kingsley1997

    Blue Screen On Close: REFERENCE_BY_POINTER

    Still happening...
  2. Kingsley1997

    Scripting help

    I think you need to read more into SQF and the syntax used. Copy and pasting code does not help you in any way, read it, try to understand it and what each command/line does and then you'll know where the error is.
  3. Kingsley1997

    initSever or init?

    I think it matters if you need to make sure certain files execute before/after each other. So splitting them up between the two could be problematic and harder to debug.
  4. I'm using... _nObjects = nearestObjects [player, ["Building","House"], 250]; Whilst it does return some good buildings, it also returns things like fences, open areas with a bush, H-Barriers etc. What can I do to make sure it only returns objects that are deemed by a human being as a building?
  5. Kingsley1997

    Find All Enterable Buildings

    Ah awesome cheers
  6. Kingsley1997

    drawIcon3D not working

    Alright cheers, that's fixed it
  7. I'm running this code but nothing is happening, no script errors, no crashes, just nothing. Kinda puzzled since it looks fine... I've outputted _useUnits before it gets to the addMissionEventHandler and it displays it correctly, but it just doesn't seem to even get into the event handler after that. private ["_unitCounter","_mrkName","_inModelPos","_inWorldPos","_icon","_unit","_useUnits","_colorRGBA","_mrkColor","_mrkType"]; _useUnits = []; _unitCounter = 0; { if ( !(isPlayer _x) ) then { _unit = _x; _mrkName = format ["%1_AI_%2", (side _unit), _unitCounter]; if (getMarkerColor _mrkName != "") then { _mrkType = markerType _mrkName; _mrkColor = getMarkerColor _mrkName; _inModelPos = _unit selectionPosition "head_axis"; _inWorldPos = _unit modelToWorld _inModelPos; _icon = getText (configFile >> "CfgMarkers" >> _mrkType >> "icon"); _colorRGBA = (configfile >> "CfgMarkerColors" >> _mrkColor >> "color") call BIS_fnc_colorConfigToRGBA; _useUnits pushBack [_icon, _colorRGBA, [ (_inWorldPos select 0), (_inWorldPos select 1), ((_inWorldPos select 2) + 0.5) ], 1, 1, 1, _mrkName, 0]; }; _unitCounter = _unitCounter + 1; }; } foreach allUnits; addMissionEventHandler ["Draw3D", { { drawIcon3D _x; } foreach _useUnits; }];
  8. Thanks for all the comments! I'm supposed to get an email every time someone posts here but it's not working.. I will try to do weekly updates. I'm currently working on changing the main part of the missions' AI system. I'm trying to get a more insurgency feeling rather than domination zones. My aim is to create a system similar to the stock market where different stocks go up and down all the time, so in the mission, territory always changes and it should keep the mission fresh and infinite.
  9. Not too sure on an ETA. I'm currently busy developing a website for a client so I haven't had much time to spend on WARSIM. I'll post back here with any updates.
  10. Yeah sorry guys, I took it down after finding some bugs myself. I think I'm gonna finish the mission and then just let the public use it on their own servers.
  11. WARSIM ALPHA - 10/08/2015 I'll be testing WARSIM from now till whenever so please join if you would like to try something new out. Everyone is welcome to join the Teamspeak server if they wish. There is a chance that your player data will be deleted once the test is over so don't expect your rank/role to still be there a few weeks down the line. ArmA 3 Server: IP - 109.109.247.218 Name - WARSIM OFFICIAL - EU - ALTIS Teamspeak 3 Server: ts.warsim.co.uk
  12. Kingsley1997

    Multiple Maps in one mission?

    Actually that'll be harder I think because you don't have a server there to switch missions for you.
  13. I've just got a VPS which is currently being setup so once that's all good to go I'm going to be hosting WARSIM for public testing. I'll give details of the server, allowed mods and a TS3 server for optional comms once it's ready to go.
  14. Kingsley1997

    Multiple Maps in one mission?

    Yeah it is some what possible by completing an objective on one mission, that then ends the mission and the server then loads the next mission on a different map but it's all a bit much
  15. Here's what your dialog should look like and the dialogInit.sqf is where you use lbAdd. class RscXListBox { access = 0; idc = CT_XLISTBOX; type = CT_XLISTBOX; style = SL_HORZ + ST_CENTER + LB_TEXTURES; default = 0; blinkingPeriod = 0; x = 12 * GUI_GRID_CENTER_W + GUI_GRID_CENTER_X; y = 17 * GUI_GRID_CENTER_H + GUI_GRID_CENTER_Y; w = 10 * GUI_GRID_CENTER_W; h = 1 * GUI_GRID_CENTER_H; color[] = {1,1,1,1}; colorActive[] = {1,1,1,1}; sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; font = "PuristaMedium"; shadow = 0; colorText[] = {1,1,1,1}; // Text color colorSelect[] = {1,1,1,1}; // Selected text color colorDisabled[] = {1,1,1,0.5}; // Disabled text color tooltip = ""; // Tooltip text tooltipColorShade[] = {0,0,0,0}; // Tooltip background color tooltipColorText[] = {1,1,1,0}; // Tooltip text color tooltipColorBox[] = {1,1,1,0}; // Tooltip frame color arrowEmpty = "\A3\ui_f\data\gui\cfg\slider\arrowEmpty_ca.paa"; // Arrow arrowFull = "\A3\ui_f\data\gui\cfg\slider\arrowFull_ca.paa"; // Arrow when clicked on border = "\A3\ui_f\data\gui\cfg\slider\border_ca.paa"; // Fill texture soundSelect[] = {"\A3\ui_f\data\sound\RscListbox\soundSelect",0.09,1}; }; class mydialog { idd = -1; onLoad = "[_this] execVM 'dialogInit.sqf'"; // set to -1, because we don't require a unique ID movingEnable = false; // the dialog can be moved with the mouse (see "moving" below) enableSimulation = false; // freeze the game controlsBackground[] = { }; // no background controls needed objects[] = { }; // no objects needed // our "Hello world" text as seen below: class controls { class _CT_XLISTBOX: RscXListBox { idc = 300; x = 0.2; y = 0.44; w = 0.575; h = 0.08; }; }; }; Here's the dialogInit.sqf example: disableSerialization; _display = _this select 0 select 0; // Controls _pageSel = _display displayCtrl 300; // 0 _index = _pageSel lbAdd "Loadouts"; // 1 _index = _pageSel lbAdd "Attachments";
  16. Kingsley1997

    Taser/Stun Script

    Well I'm not too sure on the code as I'm at work but you can do a player fired event handler, check what weapon they fired and if it matches the P07 classname you can delete the projectile vehicle and then get the unit which the player is targetting and then call your script over BIS_fnc_MP to execute on the targets machine.
  17. I'll paste my code for this type of ListBox. It works exactly like your image so it should be good: Dialog.hpp: class WSGUIArmory_Controls: RscXListBox { idc = 1500; onLBSelChanged = "_this call ui_pageChange;"; x = 0.5 * GUI_GRID_W + GUI_GRID_X; y = 1.5 * GUI_GRID_H + GUI_GRID_Y; w = 37.5 * GUI_GRID_W; h = 1 * GUI_GRID_H; }; Defines.hpp: class RscXListBox { access = 0; idc = CT_XLISTBOX; type = CT_XLISTBOX; style = SL_HORZ + ST_CENTER + LB_TEXTURES; default = 0; blinkingPeriod = 0; x = 12 * GUI_GRID_CENTER_W + GUI_GRID_CENTER_X; y = 17 * GUI_GRID_CENTER_H + GUI_GRID_CENTER_Y; w = 10 * GUI_GRID_CENTER_W; h = 1 * GUI_GRID_CENTER_H; color[] = {1,1,1,1}; colorActive[] = {1,1,1,1}; sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; font = "PuristaMedium"; shadow = 0; colorText[] = {1,1,1,1}; // Text color colorSelect[] = {1,1,1,1}; // Selected text color colorDisabled[] = {1,1,1,0.5}; // Disabled text color tooltip = ""; // Tooltip text tooltipColorShade[] = {0,0,0,0}; // Tooltip background color tooltipColorText[] = {1,1,1,0}; // Tooltip text color tooltipColorBox[] = {1,1,1,0}; // Tooltip frame color arrowEmpty = "\A3\ui_f\data\gui\cfg\slider\arrowEmpty_ca.paa"; // Arrow arrowFull = "\A3\ui_f\data\gui\cfg\slider\arrowFull_ca.paa"; // Arrow when clicked on border = "\A3\ui_f\data\gui\cfg\slider\border_ca.paa"; // Fill texture soundSelect[] = {"\A3\ui_f\data\sound\RscListbox\soundSelect",0.09,1}; };
  18. I wrote a little script to help with base building. This is meant for people who want to build static bases on a map with absolute position (not a composition) and just get the simple createVehicle code back. This is essentially what the broken 3D editor does except this uses Zeus so you get all the objects and stuff. Here's the script: private ["_pos","_radius","_collection","_startingInt","_c","_final"]; _pos = param [0, (position player)]; _radius = param [1, 250]; _startingInt = param [2, 0]; _collection = nearestObjects [_pos, ["All"], _radius]; if (count _collection > 0) then { _c = _startingInt; _final = ""; { private ["_obj","_class","_sim"]; _obj = _x; _class = typeOf _obj; _sim = getText (configFile >> "CfgVehicles" >> _class >> "simulation"); if !(_sim in ["soldier","invisible","curator"]) then { private ["_pos","_dir","_fuel","_damage"]; _pos = position _obj; _dir = getDir _obj; _fuel = fuel _obj; _damage = damage _obj; _br = toString [13,10]; _buildStr = format ["_vehicle_%1 = objNull; if (true) then { _this = createVehicle ['%2', %3, [], 0, 'CAN_COLLIDE']; _vehicle_%1 = _this; _this setDir %4; _this setPos %3; };", _c, _class, _pos, _dir]; _final = _final + _br + _buildStr; _c = _c + 1; }; } forEach _collection; copyToClipboard _final; hint "Copied to Clipboard"; }; There are 3 parameters: 0: ARRAY - Position at which the anchor the grabber 1: SCALAR - (Optional, defaults to 250) Radius to use when searching for objects 2: SCALAR - (Optional, defaults to 0) Starting interval number (use this if you want to add on to your base without having to rename variables from 0 to X etc.) All you need to do is put this sort of thing in your init.sqf and then place the Zeus modules on the map in order to enter Zeus (the script will not grab any module objects). player addAction ["Save Composition", { [position player, 200] execvm "zeusGrabber.sqf" }]; player addAction ["Load Composition", "myBase.sqf"]; Output will be something like this. Then to load your objects just call a script with the generated code inside it. _vehicle_0 = objNull; if (true) then { _this = createVehicle ['Land_Communication_F', [3997.9,4011.65,0], [], 0, 'CAN_COLLIDE']; _vehicle_0 = _this; _this setDir 0; _this setPos [3997.9,4011.65,0]; }; _vehicle_1 = objNull; if (true) then { _this = createVehicle ['Land_BagBunker_Large_F', [3990.86,3984.25,0], [], 0, 'CAN_COLLIDE']; _vehicle_1 = _this; _this setDir 0; _this setPos [3990.86,3984.25,0]; }; _vehicle_2 = objNull; if (true) then { _this = createVehicle ['Land_ReservoirTank_Rust_F', [4018.19,3981.11,0], [], 0, 'CAN_COLLIDE']; _vehicle_2 = _this; _this setDir 0; _this setPos [4018.19,3981.11,0]; }; _vehicle_3 = objNull; if (true) then { _this = createVehicle ['Land_IndPipe2_Small_ground2_F', [4025.75,3983,0], [], 0, 'CAN_COLLIDE']; _vehicle_3 = _this; _this setDir 0; _this setPos [4025.75,3983,0]; }; _vehicle_4 = objNull; if (true) then { _this = createVehicle ['Land_Factory_Main_F', [4011.58,4021.95,0], [], 0, 'CAN_COLLIDE']; _vehicle_4 = _this; _this setDir 0; _this setPos [4011.58,4021.95,0]; }; _vehicle_5 = objNull; if (true) then { _this = createVehicle ['Land_BagBunker_Large_F', [3978.38,3996.92,0], [], 0, 'CAN_COLLIDE']; _vehicle_5 = _this; _this setDir 0; _this setPos [3978.38,3996.92,0]; }; _vehicle_6 = objNull; if (true) then { _this = createVehicle ['Land_BagBunker_Tower_F', [4009.92,3967.57,0], [], 0, 'CAN_COLLIDE']; _vehicle_6 = _this; _this setDir 0; _this setPos [4009.92,3967.57,0]; }; _vehicle_7 = objNull; if (true) then { _this = createVehicle ['Land_Shed_Small_F', [4036.71,3988.52,0], [], 0, 'CAN_COLLIDE']; _vehicle_7 = _this; _this setDir 0; _this setPos [4036.71,3988.52,0]; };
  19. Kingsley1997

    Help: Basics of GUI building

    Yes you're exactly right. Think of the defines as the defaults and anything in your dialog overwrites the defaults.
  20. Kingsley1997

    Zeus Object Grabber [SCRIPT]

    Ah okay thank you :D
  21. Kingsley1997

    Uploading Mission to Server

    This might help you out http://forums.gameservers.com/viewtopic.php?f=15&t=50817
  22. Kingsley1997

    Uploading Mission to Server

    Well it depends on what control you have. If it's that weird control panel website then I think there's a page that lets you specify what mods to load or if this is on a custom server that you're running, use TADST. It's been a while since I've managed servers so I can't remember the details but I remember having this issue and I'm sure it was related to mods.
  23. Kingsley1997

    Uploading Mission to Server

    And are you making sure those mods on the server are actually being run for your mission?
  24. Kingsley1997

    Creating a basic kill feed

    Well at the end of the day it's all just maths. Here's how I'd do it: You have 5 text boxes on the screen. For simpleness let's just say the top of the killfeed will be box 1 and the bottom will be box 5. When someone dies you'd do the following: Check text value for box 1 to 5. Fill in text on lowest empty position. If all positions are filled then cascade the text downwards and fill in the top position with the new text. As for animating it you could do a sleep or something? Every X milliseconds move it a little bit further down... But I haven't done any GUI animating myself so I dunno.
  25. Kingsley1997

    Uploading Mission to Server

    Do the missions require any mods?
×