Jump to content

Kingsley1997

Member
  • Content Count

    205
  • Joined

  • Last visited

  • Medals

Everything posted by Kingsley1997

  1. Kingsley1997

    Radial Marker Creation - Math Problem

    Got it working, script below: private ["_center", "_radius","_steps", "_radStep", "_pos", "_text", "_block"]; _center = param [0, (position player)]; _radius = param [1, 500]; for [{_r = _radius}, {_r > 0}, {_r = _r - 100}] do { _steps = floor ((2 * pi * _r) / 50); // 40 _radStep = 360 / _steps; for [{_i = 0}, {_i < 360}, {_i = _i + _radStep}] do { for [{_x = 0}, {_x <= 0}, {_x = _x + 100}] do { _pos = [_center, _r, _i] call BIS_fnc_relPos; _px = floor ((_pos select 0) / 100); _py = floor ((_pos select 1) / 100); _text = format ["Grid_%1_%2", _px, _py]; _block = createMarker[_text, [(_px * 100) + 50, (_py * 100) + 50, 0]]; _block setMarkerShape "RECTANGLE"; _block setMarkerSize [50, 50]; _block setMarkerColor "ColorUNKNOWN"; // Need correct colour _block setMarkerAlpha 0.5; }; }; };
  2. So I'm building a function that generates grid markers around a center and radius. The script I have so far is the following, however it creates a cross on the map like "+" since I don't know how to do it in a circle. Any mathematicians know how to do this? private ["_center","_radius"]; _center = _this select 0; _radius = _this select 1; _gridSize = 50; for "_i" from 1 to (_radius / _gridSize) do { _top = [_center select 0, (_center select 1) + _gridSize * _i]; _bottom = [_center select 0, (_center select 1) - _gridSize * _i]; _left = [(_center select 0) - _gridSize * _i, _center select 1]; _right = [(_center select 0) + _gridSize * _i, _center select 1]; { _px = floor ((_x select 0) / 100); _py = floor ((_x select 1) / 100); _name = format ["grid_%1_%2", _px, _py]; createMarker[_name, [(_px * 100) + 50, (_py * 100) + 50, 0]]; _name setMarkerShape "RECTANGLE"; _name setMarkerSize [50,50]; _name setMarkerColor "ColorBlue"; // Need correct colour _name setMarkerAlpha 1; } forEach [_top, _bottom, _left, _right]; };
  3. Kingsley1997

    Radial Marker Creation - Math Problem

    Wow thank you very much! :D I'll see how this goes
  4. Kingsley1997

    Spawning Vehicles on markers

    Or.... _index = _myArray call BIS_fnc_selectRandom;
  5. Kingsley1997

    GUI Editor struggles

    Usually when I create a GUI I tend to use simple elements like a background element to visually size the GUI and basically just place placeholders and then change it in the config.
  6. All updates and changes will be on GitHub, not here! Just makes it easier for a developer... https://github.com/jameslkingsley/WARSIM.Altis
  7. I'm building a mission and I don't want to use the ACE medical system in it, however I still want to run ACE and have everything else ACE offers. Is there a way to completely disable the ACE medical system in the mission and let players use the default Arma 3 medical items in place?
  8. I'd like to build a system where if I place down a flag a script will generate grid markers (like Insurgency) around the flag in the specified radius, that shows territory. However I can't for the life of me figure out the math/scripting behind it. Anyone able to help?
  9. Kingsley1997

    Insurgency Style Grid Markers

    Perfect, thank you all!
  10. 5/10 times I close Arma 3, whether I am using mods or the complete vanilla game, it will blue screen with the same error (reference_by_pointer). I have tried cleaning my PC using CCleaner, completely removing Arma 3 and re-downloading it and re-configuring everything, even removing my existing profiles (RIP controls) and still it hasn't fixed the problem. The problem started since I installed Arma 3 Epoch server on my client PC to configure Epoch mod for a community server. My PC specs: Windows 10 64bit Intel i5 4690K 8GB Ram Sapphire HD6950 2GB Game runs on C drive, 1TB Western Digital Track IR running. Steam and TeamSpeak running (ACRE disabled/enabled, still same result). This doesn't happen in any other game. I strongly believe this to be an issue of Arma 3 related to Windows 10 somehow.
  11. You may be able to use setAmmoCargo. Maybe check if a mortar is nearby, if so then clear the ammo cargo on any re-supply vehicles near and then re-stock those vehicles once the mortar is far away.
  12. Kingsley1997

    Arma 3 Player Abilities

    For Unlockable: This may help. You could check the perks of the unit and then use deleteVehicle on the fired projectile to prevent the unit from being affected. For Cold Blooded: You could write a script that checks whether the unit is in the field of view of the shooter (with the thermal imaging), if they are then use disableTIEquipment locally on the shooter. Both of these aren't perfect, but they're all I can think of right now as a solution.
  13. Ah interesting, thanks for this, opened my eyes to using a remote resource.
  14. I'm fairly certain that this is not possible in Arma/Scripting, but just to be sure, is it possible to pass data into a HTML document from using htmlLoad? _control htmlLoad "myDocument.html?var1=a&var2=b&var3=c"; Or rather load data from within the HTML document using JavaScript. Like an XHR request to get a JSON script or something?
  15. Kingsley1997

    Item Taken Trigger

    Yep there's your error. Read my code closely below and you'll find that your code is missing the underscores inside the event handler code. The underscores are paramount and tell the engine which scope to use. (_this select 0) addEventhandler ["Take", { _unit = _this select 0; _container = _this select 1; _item = _this select 2; if (_item == "ACE_key_west") then { keys = true; }; }]; Also to make things easier to read try and format your code a bit. Not sure if it just messes up when copying to the forums, but in Notepad++ you can indent text using tab and generally make life so much easier for yourself.
  16. Kingsley1997

    Item Taken Trigger

    How very odd. You could always try a waitUntil but I think that's a bit messy especially since there's an event handler for this, but I don't know why it's not working. waitUntil { "ACE_key_west" in (items (_this select 0)) }; // Your code
  17. Kingsley1997

    Item Taken Trigger

    You might also want to hint the classname of the every item you pickup just to make sure you actually are using the correct classname... (_this select 0) addEventhandler ["Take", { _unit = _this select 0; _container = _this select 1; _item = _this select 2; systemChat _item; copyToClipboard _item; }];
  18. Kingsley1997

    Item Taken Trigger

    You could try the following if you want. But that should work, does it enter the script at all? Put a hint at the very top of the script and see if each unit actually calls it, then move the hint lower down until you don't see it anymore. Also try enabling -showScriptErrors in your launch options. if (_item == "ACE_key_west" && _container == ContainerName) then { keys = true; };
  19. Kingsley1997

    Simulating an extinguisher

    I'd quite like to build a blood splatter particle effect. Similar rules when it comes to scripting, so if I succeed I'll let you know how to achieve the particle effects.
  20. Kingsley1997

    Item Taken Trigger

    You put this in a script and then call it from the unit's init field. Create an SQF script in your mission folder (must be .sqf - not .txt) and inside paste the following code. Then in the init field of your unit place the following line: Init Field: null = [this] execVM "yourScriptName.sqf"; Script File: (_this select 0) addEventhandler ["Take", { _unit = _this select 0; _container = _this select 1; _item = _this select 2; if (_item == "ACE_key_west") then { keys = true; }; }];
  21. No. I'm making sure it all works completely vanilla (of course the server will have to run @iniDBI). But there is definitely going to be easy support for ACE/ACRE.
  22. I've decided to start from scratch since what I made before is quite ugly in terms of changing it in the future. I want to be able to implement things like ACE and ACRE and others mods easily without having to go into various different SQF files. There's now a config setup which simply uses classes to define things. I've also finished building the role manager dialog which loads all of the roles from the config and shows a HTML description of it, allows you to pick a loadout to go with it and then choose it. So by the end of it all, modders and server owners can remove/add/change roles, loadouts and pretty much everything else very easily, given they know the basics of SQF and HPP.
  23. Not dead yet guys! Sorry I often forget to post here, since the forum change I find the forums to look so damn ugly. I'm currently working on an AI script which I will use in WARSIM. Most of it is done, however a lot of it I haven't touched for a while so it'll take some time to re-adjust. I really want to get it finished and working to a decent level before I show anything. I'm aiming to make the progression very fun and lengthy in the sense that you don't get a high caliber sniper after a few hours. Working your way up the ranks should take time and when you get new weapons unlocked, you should cherish it.
×