-
Content Count
9181 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by kylania
-
Scripting for Helicopters and their pilots
kylania replied to ratdog445's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Can you post some of the code you're currently using? Might help you see where your errors were more than just saying "type this in". -
Maybe try this?
-
[PROBLEM] ButtonSetAction not working in a dialog
kylania replied to miguel93041's topic in ARMA 3 - MISSION EDITING & SCRIPTING
And that ladies and gentleman is why I hate dialogs. :) Where's my Visual SQF or xSQF markup language instead of over 2000 lines of fiddly configs? Might wanna spoiler tag or pastebin that btw. -
Mission title in scenarios
kylania replied to Broseph_Stalin90's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Does this happen with a brand new mission? Like start Eden. Put a guy on a the map. Give it a title. Save, export and play? It might be an Eden Enhanced issue, but unlikely. Here's the thread to use to ask though. A quick search didn't find any title posts in there though. -
Goodness gracious this is gorgeous!
-
Mission title in scenarios
kylania replied to Broseph_Stalin90's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Working fine for me in Dev Build and Stable both. Eden -> Attributes -> General. Type in a Title. Save. Export to Single Player. Title I typed in shows up under Scenarios. Export to Multiplayer and the name I typed in is listed under Missions: -
Sorry for what's probably a stupid question, but when would you be using setDamage to kill a unit where a player would be doing the killing?
- 1481 replies
-
- branch
- development
-
(and 2 more)
Tagged with:
-
You should add author either in the Eden Editor Mission Attributes or in the description.ext as: author="Author Name"; If you have existing missions giving this error, make sure they are not binarized (in Eden Editor Mission Attributes uncheck [ ] Binarize mission file) then edit the mission.sqm looking for author[]=["Author Name"]; line under the ScenarioData class and replace it with the above. You might need to open it in the 2D editor and save first in some cases? I can't find any missions old enough on my new system to check though. Could you maybe upload one of your missions with this problem so we can see? Preferably one not needing 20GB of mods. :P
-
Script not working on multiplayer dedicated server, works fine on editor
kylania replied to Martinez.E's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Sounds like the mission is maybe just lagging and commands are getting lost or slowing down. We could probably just replace most of those remoteExec's with simply local calls, but there's not a lot that that particular script is doing. Maybe change the call to spawn? -
Script not working on multiplayer dedicated server, works fine on editor
kylania replied to Martinez.E's topic in ARMA 3 - MISSION EDITING & SCRIPTING
How are you running the script? I tested with three people on a hosted and dedicated server and didn't see that happening. -
Quick static weapon question
kylania replied to madrussian's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Transporting a loaded weapon isn't really wise. :) -
Awesome work! :)
-
Simple Suicide & Dead Man's Switch script
kylania replied to pcgamers123's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Business Andrew agrees with your assessment. :P -
_x is a "magic variable". You'll see it within things like count and forEach. It's basically the "current value" being inspected. So for example with the zones: _zones = [moab_zoneOne, moab_zoneTwo, moab_zoneThree, "moab_zoneFour"]; Here we create an array with 4 zones to check. Three triggers and a marker. Next we're going to step through that array to check if the player is in any of them by using count. Count will ask, "Is the player in this area?" and get a true or false answer. We're basically checking to see if the count of areas checked which were true is greater than 0. {player inArea _x} count _zones > 0 As we step through the array the value of _x is automatically set to the current value of the index. So first step is checking the trigger moab_zoneOne. _x will equal that. Next step is checking moab_zoneTwo so this time _x will equal that, and so on. howManyTrueResults = {evaluation} count [array];
-
Looking for a very simple, single use check/delete script for empty vehicles
kylania replied to pd3's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The diag_log command writes to your RPT file, not the screen, which is why you wouldn't have seen anything. This line was kind of neat, I hadn't realized it works this way: cleanup = cleanup - [objNull]; array = array1 - array2 gives you array including only items that were in array1 and NOT in array 2. I'd thought it would just delete one instance of [objNull] instead of all of them. -
Blackfish Doesn't Allow Passengers to Eject?
kylania replied to theend3r's topic in ARMA 3 - MISSION EDITING & SCRIPTING
What version of the game are you running? That was fixed in dev branch long ago (more than a week, which is super long dev branch wise :P) -
Trying to get simple action adding and remover via Trigger
kylania replied to vastiny's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The point of my example was that you didn't have to use removeAction or a trigger at all for what you were doing. The condition field on addAction could handle that effect. -
If it's once infected you're always infected you can swap your while for an if: while {alive player} do { if (player getVariable ["moab_isInfected", false]) then { player setDamage ((damage player) + 0.1); enableCamShake true; addCamShake [8, 5, 10]; } else { if ({player inArea _x} count _zones > 0) then { if (player getVariable ["moab_hasHelmet", false]) then { // Helmet is on hint "Glück gehabt!" } else { // Helmet isn't on hint "Du bist infiziert!"; player setVariable ["moab_isInfected",true]; }; }; }; sleep 10; }; The first thing the script does is set that variable, so I skipped that defaulting since I assume it already has a value. Mostly since seeing "false" every time you're testing for "true" is jarring. :)
-
Trying to get simple action adding and remover via Trigger
kylania replied to vastiny's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This will give everyone an action to run action.sqf only if they are in the area of a trigger named nameOfTrigger. [ player, ["Action Name","action.sqf", [], 0, false, false, "", "_this inArea nameOfTrigger"] ] remoteExec ["addAction"]; What is script.sqf supposed to do? -
I know i've seen posts about this before, it was usually something about the server didn't have the right map version or some mod based issue? Can't seem to find it now though.
-
Drug Cooking Script Help
kylania replied to Haymaker's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You probably shouldn't call the variable "_cooking", since that's very easy to confuse with a local variable. You can also set it directly to true/false. /* this setVariable["hay_stoveCooking", false, true]; this addAction["Cook Meth","meth.sqf", [], 0, true, false, "", "(count nearestObjects [_target, ['House'], 8] > 0) && (count nearestObjects [_target, ['Land_MetalBarrel_F'], 8] > 0) && !(_target getVariable 'hay_stoveCooking')"]; */ params["_object", "_caller", "id", "_args"]; _args params[ ["_cooktime", 60], ["_batchsize", 10] ]; _storage = nearestObject [_object,"Box_NATO_AmmoVeh_F"]; _chemicals = nearestObject [_object, "Land_MetalBarrel_F"]; _meth = "arifle_Mk20_F"; _object setVariable ["hay_stoveCooking", true, true]; Hint "Meth is cooking"; sleep _cooktime; hint "Meth has been cooked"; _storage addWeaponcargo [_meth, _batchsize]; deleteVehicle _chemicals; _object setVariable ["hay_stoveCooking", false, true]; -
Were you not able to edit the files to fix it from author[]=["bob"]; to author="bob"; ?
-
New method, even easier! Just place down triggers or area markers wherever you want the zones and name each one. No need for settings or anything. Then fill in those names in the _zones array at the top of this script: player setVariable ["moab_hasHelmet", false]; _zones = [moab_zoneOne, moab_zoneTwo, moab_zoneThree, "moab_zoneFour"]; player addEventHandler ["InventoryClosed", { if (headgear player == "H_PilotHelmetFighter_B") then { player setVariable ["moab_hasHelmet", true]; } else { player setVariable ["moab_hasHelmet", false]; }; }]; while {alive player} do { if ({player inArea _x} count _zones > 0) then { if (player getVariable "moab_hasHelmet") then { // Helmet is on hint "Glück gehabt!" } else { // Helmet isn't on hint "Du bist infiziert!"; player setDamage ((damage player) + 0.5); enableCamShake true; addCamShake [8, 5, 10]; }; }; sleep 10; }; In this example, moab_zoneOne, Two and Three are Triggers while "moab_zoneFour" was a Marker. Markers need to be Strings (with " ") while Triggers are Objects so no " ".
-
Looking for a very simple, single use check/delete script for empty vehicles
kylania replied to pd3's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Untested is my only excuse! pd3 started it! Wasn't me! *runs and hides* -
Script not working on multiplayer dedicated server, works fine on editor
kylania replied to Martinez.E's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Tested as working on hosted and dedicated server: /* Assuming this is run from an addAction on an object or RangeMaster2's init field: Defaults: this setVariable["heinz_range2_inUse", false]; this addAction["Start Range", {_this call heinz_fnc_range2}, [], 0, true, false, "", "!(_target getVariable 'heinz_range2_inUse')"]; or customized... this setVariable["heinz_range2_inUse", false]; this addAction["Start Range Zombies", {_this call heinz_fnc_range2}, [40, 3, rangeMaster1, [ptz, ptz_1, ptz_2, ptz_3, ptz_4], 0, true, false, "", "!(_target getVariable 'heinz_range2_inUse')"]; */ // Function declared in your init.sqf or Functions library heinz_fnc_range2 = { // Grab params from default addAction input and declare _targetsHit to 0 params["_object", "_caller", "_id","_args", ["_targetsHit", 0]]; // Optional arguments for setting # targets, skill level, rangemaster speaker and targets array. _args params [ ["_maxtarg", 5], ["_skill", 2], ["_rangeMaster", rangeMaster2], ["_targets", [pt2,pt2_1, pt2_2, pt2_3, pt2_4, pt2_5, pt2_6, pt2_7, pt2_8, pt2_9]] ]; // Range in use! _rangeMaster setVariable["heinz_range2_inUse", true, true]; //puts the targets down before the start {_x animate["terc",1]} forEach _targets; // sets them to stay down until triggered to popup nopop=true; // Range setup hints to player who called the action. "Setting up the Range" remoteExec ["hint", _caller]; sleep 2; "Get Ready..." remoteExec ["hint", _caller]; sleep 2; "" remoteExec ["hint", _caller]; // We are live! Lets line up _maxtarg worth of random targets. for [{_i=1},{_i<=_maxtarg},{_i=_i+1}] do { // Select a random target from the _targets pool. _currentTarget = selectRandom _targets; // and pop it up _currentTarget animate["terc", 0]; // Sleep based on _skill timer sleep _skill; // You've had your time, did you hit it? if (_currentTarget animationPhase "terc" > 0.1) then { // Yay you did! _targetsHit = _targetsHit+1; }; // Ensure it's set down again. _currentTarget animate["terc", 1]; // Sleep for the next target (2 sec seemed a bit long?) sleep 1; }; // We're out of targets, so let the shooter know. "Session Complete" remoteExec ["hint", _caller]; // Put all the targets up again. {_x animate["terc",0]} forEach _targets; // Rangemaster is tallying your score... sleep 2; // replace 0 with _caller if only the shooter should see. [_rangeMaster, format["Range 2 Targets :%1 Hit :%2",_maxtarg,_targetsHit]] remoteExec ["sideChat", 0]; // Open for business again! _rangeMaster setVariable["heinz_range2_inUse", false, true]; // Clear the "Course Complete" hint. "" remoteExec ["hint", _caller]; }; Actually, other than the setVariable to stop others from using the range, I guess it's all local anyway. Oh well :)