-
Content Count
3059 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by jshock
-
publicVariable Client/Server
jshock replied to Lorenz94's topic in ARMA 3 - MISSION EDITING & SCRIPTING
A PVEH is only ever triggered when the assigned variable is broadcasted via the publicVariableXXX command family. If you need to ping pong info back and forth there needs to be a separate PVEH on the server and the client where the client requests the info and the server sends it. Basically the client PVs to the server saying “hey I need this info and here is my unique ID” server queries it and sends it back to the requesting client via publicVariableClient. On my phone or I would throw an example up. -
Generate Random Markers with Trigger Areas
jshock replied to Undeadenemy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
format [“%1_%2”,_prefixName,_i] And after you assign the marker into your _x variable, which I would recommend changing to something more specific, you shouldn’t do ‘_x = setMarkerXXX Y;’ just do ‘_x setMarkerXXX Y;’ And you may find some use in this newer function: https://community.bistudio.com/wiki/BIS_fnc_stringToMarker -
Packing/Uploading mods for mission (Issue)
jshock replied to madrussian's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You put the private key path then it compiles the public key bisign when you build it. -
eventhandlers What exactly are scriptedEventHandlers? [ANSWERED but still very instructive]
jshock replied to ZaellixA's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Well, technically everything is apart of the main game loop in the end, which I'd assume is the case with the conditions of the regular EHs, which is what I believe you meant. Dedmen may have misunderstood the scope of your statement.- 60 replies
-
- 1
-
- script
- scriptedeventhandler
-
(and 1 more)
Tagged with:
-
eventhandlers What exactly are scriptedEventHandlers? [ANSWERED but still very instructive]
jshock replied to ZaellixA's topic in ARMA 3 - MISSION EDITING & SCRIPTING
There is no difference when calling, however, you can add any number of scriptedEH of the same name (each with their own behavior) and subsequently call all of them at the same time. So say OP here had an addon that added a scripted EH for localized messages to a player (let’s name it sendMsg). Now say you have a function that i want to use in my mission that adds sendMsg and your message says “Hello!”. And now I’ve also added a sendMsg of my own with a message that says “To infinity and...well that’s about it”. Now when sendMsg is called the player would see both our messages. Think about Respawn EHs, every mission maker out there probably does their own thing for respawn as well as every outside script that accounts for respawn in their mission. When the player respawns the EH fires and all of that code gets called, the mission maker, outside scripts, etc. You can essentially “stack” executions of different code on one event and when that event fires (i.e. called) the entire stack is called.- 60 replies
-
- 4
-
- script
- scriptedeventhandler
-
(and 1 more)
Tagged with:
-
Uploaded to GitHub, OP updated. So I can be publicly shamed for terrible coding practices . Any contributions are welcome (still trying to figure out all the GitHub stuff too). However, I do have limits on the scope of this mod because I would prefer to not compete with Ravage or other similar addons.
- 152 replies
-
- 3
-
- contamination
- gas mask
-
(and 8 more)
Tagged with:
-
eventhandlers What exactly are scriptedEventHandlers? [ANSWERED but still very instructive]
jshock replied to ZaellixA's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Figured out the long hand for my concept (using OEF)....probably a little messy and could use some fine tuning here and there, especially when accounting for more than just one player in SP. At least some sort of reference for what you would have to do. But open the editor, place a unit, any number of markers, follow the example function calls at the bottom, copy all and paste into debug and exec: Then move in and out of the marker areas as desired to see results. And yes I know my “hash” function isn’t really quite that....- 60 replies
-
- 3
-
- script
- scriptedeventhandler
-
(and 1 more)
Tagged with:
-
eventhandlers What exactly are scriptedEventHandlers? [ANSWERED but still very instructive]
jshock replied to ZaellixA's topic in ARMA 3 - MISSION EDITING & SCRIPTING
OEF (onEachFrame) aka PFH (per frame handler, CBA version)- 60 replies
-
- 2
-
- script
- scriptedeventhandler
-
(and 1 more)
Tagged with:
-
eventhandlers What exactly are scriptedEventHandlers? [ANSWERED but still very instructive]
jshock replied to ZaellixA's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Now I haven't dug too deep into understanding the extent of CBA's system but my question is with either system is it possible to make a custom event handler for say, entering and leaving the area of a marker, without having to create any sort of while loop or OEF handler? In basic vanilla EH terms (I know there are some major assumptions here): player addEventHandler [ "EnterMarkerArea", { params ["_marker"]; if (_marker isEqualTo "mySpecialMarker") then { hint "You made it!"; }; } ]; player addEventHandler [ "ExitMarkerArea", { params ["_marker"]; if (_marker isEqualTo "mySpecialMarker") then { hint "You left the marker area!"; }; } ]; Because with how I understand either system atm it seems like there would still need to be some sort of loop or similar handling to call the "event" code?- 60 replies
-
- 2
-
- script
- scriptedeventhandler
-
(and 1 more)
Tagged with:
-
eventhandlers What exactly are scriptedEventHandlers? [ANSWERED but still very instructive]
jshock replied to ZaellixA's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Eh, one could argue that without fundamentally understanding event handlers in general you can't truly understand the difference between the base EHs and scripted ones . I for one have had the similar questions too.- 60 replies
-
- 2
-
- script
- scriptedeventhandler
-
(and 1 more)
Tagged with:
-
Spawning a vehicle at a specific height
jshock replied to lawndartleo's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Make sure that the marker is set properly in 3D space in the editor (as in the proper height on the ship) and make this small change to your code. If the first option doesn't work, try the second and change the marked value. Info: getMarkerPos set _slingammo = "B_Slingload_01_Ammo_F" createvehicle (getmarkerpos ["huron_pickup",true]); //getMarkerPos ["myMrk",true] returns a position array with [x,y,z] /////OR _slingammo = "B_Slingload_01_Ammo_F" createvehicle (getmarkerpos "huron_pickup") set [2,*properHeightOfShipSurface*]; //getMarkerPos "myMrk" returns a position array as [x,y,0] //subsequently using 'set [2,someNumber]' overwrites that zero to whatever value you input EDIT: After seeing that you actually can't easily set the marker height via editor and noticing the return of getMarkerPos [array] is positionAGL you may run into problems since you're on a ship. Second option is your best option. -
Weapons Addon works only in SP
jshock replied to maxjoiner's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Well either you or the server isn’t loading with the mod, that’s why that error is present that’s pretty cut and dry. Now in the midst of making changes to your mod if you altered the CfgPatches classname there is a chance that the mission doesn’t recognize the new class and is still looking for the old one. That’s the only other possibility I can think of. -
Weapons Addon works only in SP
jshock replied to maxjoiner's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
-
Squad and Player get out of heli once landed
jshock replied to ScytheOfLife's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You would put it in the onAct (on Activation) of the waypoint for the player group. -
Squad and Player get out of heli once landed
jshock replied to ScytheOfLife's topic in ARMA 3 - MISSION EDITING & SCRIPTING
{_x action [“Eject”,vehicle _x]} forEach units group player; -
Looking to do cust. loadouts with sqf's
jshock replied to eviljack109's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yea, people are a$$holes, but there really isn't anyway to prevent this unless you disable their ability to drop things from their inventory entirely or have some sort of "clean up" script that keeps objects from being present on the ground too long. Ok, well, wayyyy easier to do than initially expected: player addEventHandler [ "InventoryClosed", { params ["_unit","_container"]; deleteVehicle _container; } ]; -
Well, if you've used my mod, you should know that the functionality is already there (at least for the masks/uniforms/etc). Just add the classnames! Now, I may add some "auto include" options to the gear/mask modules to make it easier, less hunting for classnames. I will surely have to take into consideration the new backpacks, but I will avoid making any specific plans until the DLC is released. But of course one could speculate the possibility of air tank capacity and use over time effects with supplemental refill handling.....but one could only speculate .
- 152 replies
-
- 2
-
- contamination
- gas mask
-
(and 8 more)
Tagged with:
-
Well, sure the gear won't have much to do aside from being there. But I read about a detector of sorts (like reading EM fields or something) too. I'm just joking anyhow . But it will certainly be nice to have some vanilla options for everyone on that front.
- 152 replies
-
- contamination
- gas mask
-
(and 8 more)
Tagged with:
-
UPDATE: v0.5.5 is LIVE OP mirror links updated. My brain remember that the wonderful TADST tool existed so I was able to figure out some stuff that was going on dedicated MP.....which was honestly way too much. Hopefully now, even though I obviously suck at my one job, I was able to hash out most of the issues that have been reported (along with a few others that I found along the way). I apologize for my lack of organization, especially when it comes to thoroughly testing shit before going public with it (really bad habit). Again, I especially urge those of you that play MP (both player-hosted and dedicated server) to report back with any problems because now with TADST I may be able to replicate instead of just guessing... Changelog: Random aside: Seems like BI is coming around and supplying some vanilla gear and stuff here soon! Maybe I'll be useless after Contact is released .
- 152 replies
-
- 2
-
- contamination
- gas mask
-
(and 8 more)
Tagged with:
-
Restricting action to when a character has a certain magazine in its inventory
jshock replied to CuddleTank001's topic in ARMA 3 - MISSION EDITING & SCRIPTING
What part didn't work? The action didn't show up? Do your other actions show up? Or did the action show up but the code didn't execute when you used the action? The problem is that we don't know what the problem is unless you are more specific as to what doesn't work. The actions are not showing up at all; the actions are present but do nothing; these specific actions work without issue but these others do not; etc. Getting things to work through the use of the debug console doesn't necessary mean anything since you can execute that code in whatever way is needed. Did you execute globally or locally? Did you only do the one action that we've been using in this thread consistently? Did you just copy and paste the entire onPlayerRespawn.sqf in there and click execute? This is all critical information on what we need to help. When we don't have specifics we tend to make grandiose assumptions as to where, how and why certain stuff is executed (based on our experiences). While I'm sure we can make an educated guess as to what could be happening, the fact is that is that is wildly inefficient and just keeps all of us moving in circles. And for some of us, myself included, we have other projects, work, college, etc. that keep us from dedicating a lot of time to walking people step-by-step through the debugging process for every single hiccup. I love to help (obviously) but help us help you. Because I'm sure if we came in here just to post "Oh, well I couldn't get your code to work either, sucks to suck 😢" it wouldn't be of much help. Sorry if that comes off as harsh but to put it simply; give us specifics for every issue you encounter (the who, what, when, where, why, and how). -
Restricting action to when a character has a certain magazine in its inventory
jshock replied to CuddleTank001's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Where are you putting the addAction code? I recommend putting in the initPlayerLocal.sqf in your mission folder (if you don't have one already, make one). -
Restricting action to when a character has a certain magazine in its inventory
jshock replied to CuddleTank001's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Just to clarify, these parsing concepts apply in every usage of strings, not just conditions. I was just keeping my explanation focused specifically on this example. hint "My hint that still shows a ""string"""; //displays as: My hint that still shows a "string" That's what the forums are for. I for one just like to tackle issues with people even if I'm not entirely sure how to approach it, especially in the cases where better/more experienced coders (cough, Dedmen ) come in and poke holes in my stuff, helps me learn too. Even though half the time I screw up is either because I'm sleep deprived or post without testing -
Restricting action to when a character has a certain magazine in its inventory
jshock replied to CuddleTank001's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Sorry missed that you were still doing "typeOf currentWeapon player", see @sarogahtyp post above this. And to answer this simply, no they are not the same, because the condition is evaluated as a string anything within two ". So in your original condition, it is evaluting only: "toLower (typeOf currentWeapon player) isEqualTo " So it will throw an error no only because the condition itself is incomplete code (and it expects the closing addAction bracket) but also because there is incomplete code outside of that condition string, e.g. the rest of the condition itself. -
Restricting action to when a character has a certain magazine in its inventory
jshock replied to CuddleTank001's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Lol, understandable. When there are other strings present within the condition string they must be enclosed in either single quotes ('mystuff') or double quotes (""my stuff""). See below for your fixed condition: "toLower (typeOf currentWeapon player) isEqualTo 'hgun_p07_f'" //OR "toLower (typeOf currentWeapon player) isEqualTo ""hgun_p07_f""" -
Return variables to class format
jshock replied to gc8's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Indeed. General question though, if I did want to filter for more than just spaces (e.g. dashes and underscores) I would assume iterating with each special character using find would still be better than counting the return of splitString? Not at my computer to run the numbers atm.