-
Content Count
205 -
Joined
-
Last visited
-
Medals
Everything posted by Kingsley1997
-
Radial Marker Creation - Math Problem
Kingsley1997 replied to Kingsley1997's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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; }; }; }; -
Radial Marker Creation - Math Problem
Kingsley1997 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
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]; }; -
Radial Marker Creation - Math Problem
Kingsley1997 replied to Kingsley1997's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Wow thank you very much! :D I'll see how this goes -
Spawning Vehicles on markers
Kingsley1997 replied to hellstorm77's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Or.... _index = _myArray call BIS_fnc_selectRandom; -
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.
-
WARSIM - Persistent Military Careers [ALPHA]
Kingsley1997 replied to Kingsley1997's topic in ARMA 3 - MISSION EDITING & SCRIPTING
All updates and changes will be on GitHub, not here! Just makes it easier for a developer... https://github.com/jameslkingsley/WARSIM.Altis -
ACE3 - A collaborative merger between AGM, CSE, and ACE
Kingsley1997 replied to acemod's topic in ARMA 3 - ADDONS & MODS: COMPLETE
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? -
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?
-
Insurgency Style Grid Markers
Kingsley1997 replied to Kingsley1997's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Perfect, thank you all! -
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.
-
How do I stop a certain weapons rearm capability?
Kingsley1997 replied to 49lone82's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Arma 3 Player Abilities
Kingsley1997 replied to Alex150201's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Pass Data to HTML Document with htmlLoad
Kingsley1997 replied to Kingsley1997's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ah interesting, thanks for this, opened my eyes to using a remote resource. -
Pass Data to HTML Document with htmlLoad
Kingsley1997 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
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? -
Item Taken Trigger
Kingsley1997 replied to driftingnitro's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Item Taken Trigger
Kingsley1997 replied to driftingnitro's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 -
Item Taken Trigger
Kingsley1997 replied to driftingnitro's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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; }]; -
Item Taken Trigger
Kingsley1997 replied to driftingnitro's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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; }; -
Simulating an extinguisher
Kingsley1997 replied to xjoker_'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Item Taken Trigger
Kingsley1997 replied to driftingnitro's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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; }; }]; -
George Boole, born 200 years ago.
Kingsley1997 replied to Tankbuster's topic in ARMA 3 - MISSION EDITING & SCRIPTING
true- 1 reply
-
- 4
-
WARSIM - Persistent Military Careers [ALPHA]
Kingsley1997 replied to Kingsley1997's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
WARSIM - Persistent Military Careers [ALPHA]
Kingsley1997 replied to Kingsley1997's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
WARSIM - Persistent Military Careers [ALPHA]
Kingsley1997 replied to Kingsley1997's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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.