-
Content Count
1224 -
Joined
-
Last visited
-
Medals
Everything posted by dreadedentity
-
Map doesn't works on multiplayer
dreadedentity replied to TimK's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Please explain your problem in more detail -
Dedicated Server Scripting - Onmapsingleclick
dreadedentity replied to sprags's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Not quite, you'd need to set the variable first: radiopack1 addAction ["<t color=""#8A3324"">" + ("Call for Evac") + "</t>", { openMap [true, false]; ["callEvac", "onMapSingleClick", { evacpad = _pos; //reset variable nul = //don't need script handle unless you want to save it somewhere. Handle only required in the editor on unit init field evacpad execVM "evac.sqf"; //if it's only 1 variable, you don't need to use an array. This will pass the data to the script as _this //inside the script: _this = evacpad //same thing //or you could just directly send _pos (it keeps track of where you clicked //_pos execVM "evac.sqf" openMap false; //be sure to close map after clicking }] call BIS_fnc_addStackedEventHandler; [] spawn { waitUntil {!visibleMap}; ["callEvac","onMapSingleClick"] call BIS_fnc_removeStackedEventHandler; }; }; Glad to help -
Grid Refrence to World Position
dreadedentity replied to big_wilk's topic in ARMA 3 - MISSION EDITING & SCRIPTING
So I wrote a grid converter just now, but here's the thing. When you input 5 character grid coordinates, the grid coordinates actually are the world coordinates DE_fnc_convertGridCoord = { //input: _myVar = [GridX, GridY] call DE_fnc_convertGridCoord; //return: ARRAY - (worldPos) private ["_gridX","_gridY","_input","_result","_size","_number","_char"]; _gridX = [_this, 0, "0", [""]] call BIS_fnc_param; _gridY = [_this, 1, "0", [""]] call BIS_fnc_param; _input = [_gridX,_gridY]; _gridX = nil; _gridY = nil; _result = []; { _size = 10000; _number = 0; for "_i" from 0 to ((count _x) - 1) do { _char = [_x, _i, _i] call BIS_fnc_trimString; _number = _number + ((parseNumber _char) * _size); _size = _size / 10; }; _result pushBack _number; }forEach _input; _result; }; //Didn't realize I was writing a string to number decimal converter until it was already done //example _coord = ["18045234","16293234"] call DE_fnc_convertGridCoord; _marker = createMarker ["test", _coord]; _marker setMarkerShape "ICON"; _marker setMarkerType "MIL_DOT"; -
Dedicated Server Scripting - Onmapsingleclick
dreadedentity replied to sprags's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I think your PVEH's are a little underpowered. When I script for dedicated server, I try to keep as much on the server side as possible. Give me a little while to rework these scripts and see what I come up with ---------- Post added at 15:46 ---------- Previous post was at 14:58 ---------- Okay, so I made a few changes, got rid of some traffic-generating commands and such. Basically, what I've done is instead of making the addActions run with BIS_fnc_MP, they are instead created locally, this will reduce a ton of traffic right at the beginning of the mission, and traffic generated on each JIP. Also, moved PVEH's to a separate script. Also, when a player uses one of those actions, the map should automatically open, and create a blank "onMapSingleClick" event. If the user closes their map without making a choice, the EH will be removed to prevent a buildup. DO NOTE: I've left the map click event handler's blank since I don't know the workings of your other scripts Here it is: init.sqf if (isDedicated) then { [] execVM "initPVs.sqf"; //only server will create PVEH's //make sure you use publicVariableServer instead of publicVariable, to send traffic directly to the server, further reducing traffic }else{ //clients create local actions radiopack1 addAction ["<t color=""#8A3324"">" + ("Call for Evac") + "</t>", { openMap [true, false]; ["callEvac", "onMapSingleClick", { }] call BIS_fnc_addStackedEventHandler; [] spawn { waitUntil {!visibleMap}; ["callEvac","onMapSingleClick"] call BIS_fnc_removeStackedEventHandler; }; }, nil, 6, false]; evac1 addAction ["<t color=""#8A3324"">" + ("Return to base") + "</t>", { openMap [true, false]; ["returnToBase", "onMapSingleClick", { }] call BIS_fnc_addStackedEventHandler; [] spawn { waitUntil {!visibleMap}; ["returnToBase","onMapSingleClick"] call BIS_fnc_removeStackedEventHandler; }; }, nil, 6, false]; evac1 addAction ["<t color=""#3A6629"">" + ("Select Destination") + "</t>", { openMap [true, false]; ["selectDesination", "onMapSingleClick", { }] call BIS_fnc_addStackedEventHandler; [] spawn { waitUntil {!visibleMap}; ["selectDestination","onMapSingleClick"] call BIS_fnc_removeStackedEventHandler; }; }, nil, 6, false]; }; initPVs.sqf //it's possible to make these PVEH's a lot more powerful by putting real code in them instead of just globalChat's "helidomove" addPublicVariableEventHandler { _heli = _this select 1 select 0; _pos = _this select 1 select 1; if (local _heli) then { _heli domove _pos;}; }; "helimoveonclick" addPublicVariableEventHandler { Evac1 GlobalChat "We've recieved your coordinates sir, We are dusting off and on route!"; }; "requestevac" addpublicvariableeventhandler { evac1 globalChat "Ground Team 1, We have recieved your coordinates, We are dusting off and on route. Hawk 1 Out."; }; "seesmoke" addpublicvariableeventhandler { evac1 globalChat "Ground Team 1, We see your smoke, We're bringing her in!"; }; "mapclickhint" addPublicVariableEventhandler { hint parseText format["<t size='1.2' /*font='LucidaConsoleB' color='#ff0000'*/> ClICK ON THE MAP TO RELAY COORDINATES TO THE PILOT </t>"]; }; "landin10" addPublicVariableEventhandler { evac1 GlobalChat "We are on the ground, 10 seconds till dustoff. Get out now!"; }; "dustoff" addPublicVariableEventhandler { evac1 GlobalChat "Ground Team 1, We are dusting off and RTB! Good Luck down there! Hawk 1 out."; }; "RTB" addPublicVariableEventhandler { evac1 GlobalChat "Ground Team 1, We are RTB! Good Luck down there! Hawk 1 out."; }; "popsmoke" addpublicvariableeventhandler { evac1 globalChat "Ground Team 1, We are at your coordinates, Pop green smoke on your LZ, Over!."; }; "landed" addpublicvariableeventhandler { evac1 globalChat "Ground Team 1, We are on the ground, Load up!"; }; -
Make multiple units playable at once, & other editor option/features
dreadedentity replied to Gunter Severloh's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Certainly, such a script is possible, but you'd have to do event more work that just double clicking the unit and then 2 clicks to change from non-playable to playable. Basically, the idea is that you would add a variable to that unit which the script will read, using setVariable. That's the only way I know how to do it, anyway. { if (_x getVariable ["makePlayableOnMissionStart", false]) then { setPlayable _x; //wiki says this command is currently nonfunctional }; }forEach allUnits; Unfortunately, until the mission actually started and the loop ran, there would only be one player slot in the server. There aren't any workarounds really because no scripts run until at least the briefing screen -
Grid Refrence to World Position
dreadedentity replied to big_wilk's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The problem with using this command is that you need to know the mystical "map control" the game uses' date=' which nobody that has found it has shared such information on the internet ---------- Post added at 14:53 ---------- Previous post was at 14:33 ---------- The problem with this is that I've found each map seems to have a different X/Y offset concerning their grid. Why this is, I have no idea. Copy this code and run it in the debug console on all 3 maps: [] spawn { _brushes = ["Solid","Horizontal","Vertical","Grid","FDiagonal","BDiagonal","DiagGrid"]; for "_i" from 0 to 81 do { for "_o" from 0 to 81 do { //if (!surfaceIsWater [(_o * 100) + 50, (_i * 100)]) then //{ _marker = createMarker [format["%1_%2",_o,_i], [(_o * 100), (_i * 100),0]]; _marker setMarkerText (format ["%1_%2 \ %3",_o,_i, getMarkerPos _marker]); _marker setMarkerShape "RECTANGLE"; //_marker setMarkerType "MIL_DOT"; _marker setMarkerSize [50,50]; _marker setMarkerBrush (_brushes select (floor random (count _brushes))); _marker setMarkerColor "ColorRed"; //}; }; }; }; This code puts a map marker on on some 100x100m squares. You should see that they do not align correctly with the grids. I've found 2 of the offsets (Altis & VR). Altis: x + 50, y + 50 VR: x + 0, y + 2 I haven't messed with Stratis. Again, I have no idea why they did this. If you ask me, the map should start at (0,0), along with the grids. I'm having trouble understanding what you mean, you do know that in Arma3 vanilla you can only have map coords of up to 6 figures, right? (XXXYYY) -
enableCollisionWith and setMass don't make the player block the football/soccerball
dreadedentity replied to 4's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You may be interested in an EpeContactStart Event Handler -
Dedicated Server Scripting - Onmapsingleclick
dreadedentity replied to sprags's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Where is all of this code running? I think this is a locality issue: if (local _heli) then { _heli doMove getpos _pos; }else{ helidomove = _this; publicVariable "helidomove"; }; "helidomove" addPublicVariableEventHandler { _heli = (_this select 1) select 0; //strange you don't have script error here _pos = (_this select 1) select 1; if (local _heli) then { _heli domove _pos; }; }; Also, there is no "player" on dedicated server so this will never run: if (!(isNull player)) then EDIT: and pls use standard formatting practices -
Make multiple units playable at once, & other editor option/features
dreadedentity replied to Gunter Severloh's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I went digging through the config viewer, then de-pbo's some of BIS's scripts and went for a poke. Using this code: _displays = uinamespace getvariable ["GUI_displays",[]]; _classes = uinamespace getvariable ["GUI_classes",[]]; hint str _displays; sleep 2; hint str _classes; I believe that display 26 is the "ArcadeMap" display (arcade likely meaning editor, this will probably change to "MainMap" if the mission is packed and played, probably changing the display also). Now if only there was a way to return all controls in a display, then we'd really be talking -
Trigger activation Anyone - object
dreadedentity replied to zorrobyte's topic in ARMA 3 - MISSION EDITING & SCRIPTING
What's wrong with this? It should work fine. I don't really see the point though, since ammo boxes have no animations except for death so they aren't simulated -
Trigger activation Anyone - object
dreadedentity replied to zorrobyte's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This is confusing. Do you want to trigger to activate if somebody interacts with the ammobox? -
Spawn Object on/in building, straight up and down.
dreadedentity replied to El Mariachi's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Sometimes objects have their "up vector" set to the surfaceNormal of the ground beneath -
waitUntil Distance <=10 question
dreadedentity replied to Radioactive's topic in ARMA 3 - MISSION EDITING & SCRIPTING
In that case, welcome to scripting! Starter pack: Arma Edit (what I use) my personal nearly-completely-updated command list (I haven't added the commands from the last 2 patches yet) OR Notepad++ (very reputable, I'm pretty sure 90% of the community uses this, and extremely flexible, allows users to create their own syntax highlighting. I even used this for a while, but not for arma projects) Killzone's Hybrid Syntax Highlighter for Arma 2/3 (for notepad++) -
Variables, _x, arrays
dreadedentity replied to fn_Quiksilver's topic in ARMA 3 - MISSION EDITING & SCRIPTING
No you're right, JShock was spot on in the way you'd need to do this. But honestly, if you're going to be working with multiple related values, you should be using an array from the start and modifying that. You can scrape the values and put them into separate local variables, and perform any math/commands, but you should always export back into your array at the end. Super honestly, the only real value that serves is readability and easy debugging, writing (array select 0),(array select 1),(array select 2) really isn't that much longer, and the difficulty in debugging is negligible if you place proper parenthesis. This is correct, the only way it would be possible is using call compile format. I guess my methods were leaking out in my last post :p -
Variables, _x, arrays
dreadedentity replied to fn_Quiksilver's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You aren't actually changing the variables myVar#. This is how count and forEach essentially work: for "_i" from 0 to ((count _array) - 1) do { _x = _array select _i; _forEachIndex = _i; //YOUR CODE }; _x is a new value that is defined by using an existing variable. You can change it at will and it will be redefined during the next iteration. Changing this will not change the variable it was referenced from. The only way to do what I think you want to do would be to define the new array, then use set to change the elements in it. myVar1 = TRUE; myVar2 = TRUE; myVar3 = TRUE; myArray = [myVar1, myVar2, myVar3]; { myArray set [_forEachIndex, false]; }forEach myArray; hintSilent str myArray; -
waitUntil Distance <=10 question
dreadedentity replied to Radioactive's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I've never seen these kinds of quotes before, how did you make them? -
Has anyone tried loading up their profile namespace with a ton of data?
dreadedentity posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
What happened? Where there any adverse affects to loading times from it? Are there any limits? I'm considering writing up some debug tools and saving them to my profile so I can have access to a range of tools with a simple call (profileNamespace getVariable "dread_debug"); EDIT: Quick update, I just saved a few addActions to my profile and it's magnificent. I'd still like to hear from others, however -
waitUntil Distance <=10 question
dreadedentity replied to Radioactive's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You never closed your while loop. You have the required semicolon, but no closing bracket. -
my JIP ONLY excute script doesnt work what is problem?
dreadedentity replied to ANSWER's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Just gonna leave these here for you (take out the periods) [.php][./php] -
Has anyone tried loading up their profile namespace with a ton of data?
dreadedentity replied to dreadedentity's topic in ARMA 3 - MISSION EDITING & SCRIPTING
It took me a minute to understand what you meant, but that makes sense. In my case, if I did something like that, instead of being called through scripts in MP, it would remain a debug console-execution only situation, probably -
Simple Patrol Script By: DreadedEntity Last night, I looked through my old scripts and completely rewrote this. None of the original remains. If you used this before, I guarantee you you want to download the updated version. Check the below post for the updated features/implementation Version: 2.0 Stable in: Current release of Arma 3 Hello all, I have just finished writing a simple script to help you create missions to play with your friends, faster and easier. This script allows you to quickly and easily create random groups on the map that patrol in a trigger area. The script takes 6 parameters. You must use a trigger with this script. Here are the parameters and usage: /* USAGE: _handle = [triggerObject, classnameArray, numberOfGroup, group, respawn, timeInMinutes] execVM "DE_simplePatrol.sqf"; triggerObject: OBJECT - Must be a trigger. If calling the script from an editor-placed trigger use "thisTrigger". classnameArray: ARRAY - An array of STRINGS, the classnames of the units you want to spawn. numberOfGroup: SCALAR (number) - The amount of units to spawn. group: SIDE - A group will be created for the side you specify. respawn: BOOLEAN - True enables infinite respawns, false will only create the units once. timeInMinutes: How many should pass until you want units to respawn. EXAMPLE: 0 = [thisTrigger, ["B_Soldier_F","B_Officer_F"], 5, west, true, 2] execVM "DE_simplePatrol.sqf"; */ Features: Choose units to spawn and randomly patrol an area. Now with vehicles. Helicopters, tanks, MRAPS, boats and more! (set a large trigger area) Implementation: Add the script to your mission folder and refer to above for implementation. Known Issues: Vehicles sometimes jam up and don't patrol properly if your trigger area is too small. Units prioritize side over group. Spawning units of a different side will cause them to fire on each other, despite being in the same group. Download (Dropbox) All persons are free to use and modify these scripts to fit their needs, provided the original credit remains intact or I am credited somewhere in the modified script. I hope some of you can find a use for this. Enjoy.
-
[CODE SNIPPET] Decimal to base any encoder and decoder && vehicle diagnostic tool
dreadedentity posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello everyone! It's been some time since I've done a code snippet, I've been busy with other projects and life stuff. But I'm here today and I have something really cool things to show off (in my opinion). This code snippet will be a little more intense than my other ones, which were mostly just fun little arma things or short tutorials. So without further delay, here I go: Well, you did read the title correctly. One of my favorite things to do with code is loops. They're a bitch, but I love them. Today I've got 2 really neat functions, one is for converting a decimal number to ANY base (binary (base2), ternary(base3), base 10 (decimal, not sure why you'd convert from decimal to decimal though), hexadecimal, octodecimal) and the other is to convert that data back into decimal. I don't personally have a use for them, I was just having a little fun with the engine (somehow I've turned this game into a glorified calculator). It all started with my other little script that I wanted to show off. I played the DayZ mod for a great long time (a really long time), I played it for about a year before I even noticed that there was still another entire game that I hadn't played. Anyway, Rocket had vehicles in there that you had to fix up, and actions were shown in different colors depending on how damaged they were. Well guess who was able to reproduce this? That's right, see my video just below this. Now, I do realize that this isn't quite the same setup Rocket had, but I think it's a really good starting point. For some reason, however, I had to code in some error handling because some hitpoints were not showing up properly, despite being ripped off directly from the configfile, how strange! You can see that when I look at the hatchback and the light blue "NOT FOUND", I had to do that because otherwise it messed up my structured text and was just all around not very pretty. Alright, so in both of these scripts there are a few problems. For the Vehicle Diagnostic Tool I already talked about that, something's wrong with scraping the config info. Now in the encode/decode script, I'm not sure how many people know about Arma's rounding issues, but it's pretty bad. I've complained enough about it for one lifetime, though, so I won't say anything more. While writing those 2 functions, I was trying to get around the rounding so there ended up being a lot of strings and things dealing with them, the problem is there's always a failure point though. To make a long story short I'll get to the point, there is a maximum amount of characters that can be input before BOTH the encoder and decoder become unreliable. To circumvent this, I recommend splitting up larger numbers and saving them separately, you can then decode them with no problem and just stick 'em back together, like reattaching a loaf of bread that's been cut in half. Well, I guess I'll be off now. Keep up the good work, and please, don't forget to have fun along the way. Download: Vehicle Diagnostic Tool | BaseAnyEncoderDecoder (both are dropbox links) -
Hey guys, I'm writing an example mission for my latest release (pre-release) and I need a few people's voices. I would play all the parts myself, but, it seems that I can't make my voice sound very different from itself, so 1 role is my maximum. I did take the longest role, though. Anyway here are the lines I would be needing: Person 1: Hey, get over here. We're moving out. Hey, private, get in the truck! Hey, get in! Come on, we gotta go! Private, let's go, get in the truck! Come on, let's go! Turn that shit off, we're basically there. Go question those civilians, we'll see what turns up. Well, I guess we just missed 'em. Let's get back to the outpost. Person 2: Hey, let's put on some tunes! Person 3,4,5 (1 line each): They were just here, but they ran off when they heard your truck. What took you guys so long? They're already gone. They're not here anymore. Thanks a lot, guys. This will really help me out. You can just reply to this post with your recordings. Raw audio might be the best option, but if you know a thing or two, you can groom your own audio and post it here as an .ogg (that would be the easiest for me, honestly) And of course, you will be credited for your roles By posting in this thread, you agree to forfeit any ownership of related files.
-
Is there an easier way to put objects on a 2nd floor building?
dreadedentity replied to Coolinator's topic in ARMA 3 - MISSION EDITING & SCRIPTING
modelToWorld or setPosATL -
[RELEASE] Advanced Conversation System (ACS)
dreadedentity posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Advanced Conversation System By: DreadedEntity Release for Arma 3 Stable in: 1.34.128075 (and probably on) Version: 1.0 Hello everyone, ACS is finally ready, well, it's actually been ready since before Thanksgiving, but I wanted to make a demo mission to show off how to use it. ACS is a powerful, simple-to-use system that aims to provide full conversations with Arma's AI. It can run scripts and code, and even play sound. Features: Ability to talk to AI Branching conversation/tree system Ability to run code or scripts with data passed to them Create dynamic conversations with built-in add/remove topic functions Play sounds to go along with your conversations Virtually unlimited topics/conversations System keeps track of conversation topics that have already been talked about Conversations made entirely by you Implementation: To use the built-in functions #include ACS_userFunctions.sqf to a place clients will run it, such as init.sqf #include "ACS\ACS_userFunctions.sqf" To use the dialog system (this is required), #include the files from the ACS\resources folder to your description.ext #include "ACS\resources\definitions.hpp" #include "ACS\resources\ACS_dialog.hpp" That's it! Here's a video of the system in-action: (Download the example mission here, contains ACS (obviously)) Download (dropbox) <---ACS only I'm going to write up a short .pdf tutorial highlighting specific use of this system. It will cover everything, and include tricks that I have found during development. When completed, I will replace these sentences with a dropbox link This system is being released under the Arma Public License Share Alike (APL-SA). Please observe and follow this license. In addition to APL-SA the author reserves the right to have his work, or any derivatives of, removed from any works in which he does not want to be associated with.