Search the Community
Showing results for tags 'syntax'.
Found 10 results
-
(Solved) How to have multiple functions with addActions
RudyRedTop posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi there, I'm trying to set up a script that will both change the state of a task and also display a separate hint for the players. If it's possible to have an addAction activate two functions I'm unable to figure out the syntax. Here's what I'm working with so far; this addAction ["Try Elevator Controls",{["EscapeCargo", "FAILED", True] call BIS_fnc_taskSetState}]; This function seems to work just fine with the task modules I've already set down with 3den editor. However I also want the same addAction to activate this; [hint "The Elevator Controls don't seemn to have any power"] I'm still working to try to wrap my ADHD brain around the code syntax for all of this but would greatly appreciate anyone's help on this. Edit: got the syntax sorted out now and definitely going to be reading up more on SQF syntax now as this seems like an incredibly newb question. ended up going with this; this addAction[ "Try Elevator Controls", { [ "EscapeCargo", "FAILED", true ] call BIS_fnc_taskSetState; hint "The Elevator Controls don't seemn to have any power"; sleep 15; hintSilent ""; }]; Many thanks! -
Error when there is no player in squad lead spot
InsanityGamer posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Essentially i'm try to make my own take on an invade and annex server thats team oriented. currently im working on adding a flagpole teleportation mechanic that will teleport you to your squad leader if you have a squad leader and will get you in the fight faster. so ive spent the better part of the day doing this.... im sure some of you are gagging at that, sorry im not very proficient in eden editor....or anything particularily... nonetheless this works as intended except it'll throw an error if there is nobody playing the character with their specific variable attached IE; SquadLeader_1, SquadLeader_2, Pilot, COC, Recon. for what i intend that's fine but i'd like to clean it up and offer a "Teleportation is down right now" for the characters that can teleport atleast. i've been trying to find some way to integrate try throw catch, but cant seem to find a way to set it up proper. any tips? -
Race Circuit Script (aka learning to count)
wogz187 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
This topic is solved. Clear courses by reaching the next marker. If you're looking for the module it's available here: Drive Link This is the test rig in the demo. Adding new marks and whole new courses is easy. From here on is the original topic, I need to learn how to count. I posted this the other day, with a plea to understand why it works when, in my estimation, it shouldn't really. Regardless. I set about to simplify ring counting. I don't like having one .sqf file for each ring course. I feel like 1 or 2 scripts should be able to do this. One file if somebody helps me to learn how to count. Two if this works: Determine which course and define ring marks with generic titles, ringCOURSE.sqf-- this example shows 2 courses with 3 rings each if (ringCHALL==1) then { ring1=ringMARK1_1; ring2=ringMARK1_2; //first course second mark ring3=ringMARK1_3; rings= []execVM "ringCLEAR.sqf"; }; if (ringCHALL==2) then { ring1=ringMARK2_1; ring2=ringMARK2_2; //second course second mark ring3=ringMARK2_3; rings= []execVM "ringCLEAR.sqf"; }; and then build a switchdo case for each ring, or a waitUntil loop, or... I don't know and that's the question. Keep in mind there is only one ring with one trigger attached to drive the ring clearing script(s). This is what it needs to do, ["task1",[currentRING,true]] call BIS_fnc_taskSetDestination; ringGOAL_1 setpos (getpos currentRING); The real trick in this is how to go from: ring1, ring2, ring3, to set the variable "currentRING" in sequence. Oh, boy! I hope that makes sense! -
I want to make a ring course to fly through. The ring course will be defined by several markers (ringMARK1_1) and the ring itself has a trigger attached. Each time a ring is cleared I want it to snap to the next position. There is only one ring which moves from marker to marker. ringCHALLENGE.sqf ringChallenge = [] spawn { waitUntil { ring1==1 }; hint "Ring Challenge Activated"; currentRING= [ringMARK1_1,ringMARK1_2,ringMARK1_3] select 0; sleep 1; ["task1",[currentRING,true]] call BIS_fnc_taskSetDestination; ringGOAL setpos (getpos currentRING); }; What's the best way to update the ring position in a sequence? Can "select 0;" in the array be called something like "select next"? Is it better to use IF/WAIT for the next ring? Am I starting this all wrong?
-
script Can someone help me with this sound replacement script? for the mx
cheif22 posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Can someone help me with this. I'm Kinda new to the whole sound mod but am interested, I have no idea but gotten this far and im just Confused on how to proceed from this point on how i can even get sound through. if someone could help me Thank you. the export for the file is .wss mono out of a pcm 16bit mono wave file. the script is in a config.cpp file. class CfgPatches { class mx { units[]={}; weapons[]={}; requiredVersion=0.1; requiredAddons[]= { "A3_Data_F", "A3_Sounds_F", "A3_Weapons_F" }; version="1"; author="cheif22"; }; }; class CfgSoundShaders { class MX_Closure_SoundShader { samples[]= { { "\mx\shots\closure1", 1 }, { "\mx\shots\closure2", 1 } }; volume=0.17782794; range=5; }; class MX_closeShot_SoundShader { samples[]= { { "\mx\shot\closeshot1", 1 }, { "\mx\shot\closeshot2", 1 }, { "\mx\shot\closeshot3", 1 } }; volume=1; range=50; rangeCurve="closeShotCurve"; }; class MX_midShot_SoundShader { samples[]= { { "\mx\shot\midshot1", 1 }, { "\mx\shot\midshot2", 1 }, { "\mx\shot\midshot3", 1 } }; volume=0.79432821; range=1800; rangeCurve[]= { {0,0.2}, {50,1}, {300,0}, {1800,0} }; }; class MX_distShot_SoundShader { samples[]= { { "\mx\shot\distshot1", 1 }, { "\mx\shot\distshot3", 1 }, { "\mx\shot\distshot3", 1 } }; volume=1; range=1800; rangeCurve[]= { {0,0}, {50,0}, {300,1}, {1800,1} }; }; };- 1 reply
-
- sound enhancement
- mod
-
(and 3 more)
Tagged with:
-
sound can some one check my script for trying to get the mx sounds working?
cheif22 posted a topic in ARMA 3 - QUESTIONS & ANSWERS
Can someone help me with this. I'm Kinda new to the whole sound mod but am interested, I have no idea but gotten this far and im just Confused on how to proceed from this point on how i can even get sound through. if someone could help me Thank you. class CfgPatches { class mx { units[]={}; weapons[]={}; requiredVersion=0.1; requiredAddons[]= { "A3_Data_F", "A3_Sounds_F", "A3_Weapons_F" }; version="1"; author="cheif22"; }; }; class CfgSoundShaders { class MX_Closure_SoundShader { samples[]= { { "\mx\shots\closure1", 1 }, { "\mx\shots\closure2", 1 } }; volume=0.17782794; range=5; }; class MX_closeShot_SoundShader { samples[]= { { "\mx\shot\closeshot1", 1 }, { "\mx\shot\closeshot2", 1 }, { "\mx\shot\closeshot3", 1 } }; volume=1; range=50; rangeCurve="closeShotCurve"; }; class MX_midShot_SoundShader { samples[]= { { "\mx\shot\midshot1", 1 }, { "\mx\shot\midshot2", 1 }, { "\mx\shot\midshot3", 1 } }; volume=0.79432821; range=1800; rangeCurve[]= { {0,0.2}, {50,1}, {300,0}, {1800,0} }; }; class MX_distShot_SoundShader { samples[]= { { "\mx\shot\distshot1", 1 }, { "\mx\shot\distshot3", 1 }, { "\mx\shot\distshot3", 1 } }; volume=1; range=1800; rangeCurve[]= { {0,0}, {50,0}, {300,1}, {1800,1} }; }; }; -
Hello :) I used to have syntax that was placed in the players init that would place fog around the player with like a greenish tinge to it and wind and such, it would also be nice if the effect didn't clear up either. Cheers and thanx for any help.. Edit: I do know about 0 setFog [0.5,0.05,200]; by the way, it is not exactly what I'm looking for tho,, or I just don't understand it enough..
-
VIM-SQF: SQF syntax highlight for VIM
ussrlongbow posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello all, Just made a little cool thing for my self: a vim syntax for SQF, The repo now features the script I used to generate syntax sections, added support for functions from mods (following mods are considered: CBA, ACE, CUP, TFAR, ALIVE) grab here - https://github.com/ussrlongbow/vim-sqf/releases/tag/2017-03-17 report issues here - https://github.com/ussrlongbow/vim-sqf/issues Version: 2017-03-17 Changelog: enjoy ;) -
Better ingame/in-editor scripting capabilities?
tansvanio posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Greetings everyone, I am sorry if my question is not apropriated here but I have searched and I have not found that which I seek. Is there any plugin, mod or custom settings that improves Arma 3's ingame editor scripting capabilities (the code windows in init, triggers etc) ? It would be great if it was possible to make those text boxes behave more like a normal text editor, with line droping, bracket completion and other things. Does anyone know something of the sort? Cheers, Tansvanio -
Implementation of scripts doesn't seem to work out
Sakuie posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Hello everyone, it's me again, asking some silly questions. Well, let's jump right ahead, shall we? For some hours I've been researching on how to get scripts to start on themselves upon initialization. Nothing seem's to suit my problem well enough. To be clear: the scripts are stored in this folder structure: -@devAddon_sak - -Addons - - -dev - - - -AnoGearAddition_scripts - - - - -exec.sqf - - - - -a_h_useVisor.sqf Basically I tried running 2 if-statements, that'd determine, whether action1 or 2 is to be used. Initially it looked like this: (before anyone asks: since I started coding in gLua, I started to love if-statements for some reason...) // a_h_useVisor \\ if (headgear player isEqualTo "anoHelmet_opened") exitWith {player addAction ["Close Visor", {player addHeadgear "anoHelmet_closed"}]}; if (headgear player isEqualTo "anoHelmet_closed") exitWith {player addAction ["Open Visor", {player addHeadgear "anoHelmet_opened"}]}; After a bit testing I came to the conclusion:"Well, maybe we need something to trigger it, how about that?" So I created another script file, in which I wrote: // exec \\ _handle = [] execVM "\dev\AnoGearAddition_scripts\a_h_useVisor.sqf"; //note, that \dev\ is the .pbo file in which everything is stored, obviously Also didn't seem to work. So I kinda reviewed the code a bit and that happened: // a_h_useVisor \\ while (alive player) do { if (headgear player isEqualTo "anoHelmet_opened") exitWith {player addAction ["Close Visor", {player addHeadgear "anoHelmet_closed"}]}; if (headgear player isEqualTo "anoHelmet_closed") exitWith {player addAction ["Open Visor", {player addHeadgear "anoHelmet_opened"}]}; }; and // exec \\ //_handle = [] execVM "\dev\SpectergearAddition_scripts\a_h_useVisor.sqf"; _triggerExec = createTrigger ["EmptyDetector", getPos player]; _triggerExec setTriggerText "Activate Script"; _triggerExec setTriggerArea [0,0,0, false]; _triggerExec setTriggerActivation ["ALPHA", "PRESENT", false]; _triggerExec setTriggerStatements ["this", "_handle = [] execVM ""\dev\AnoGearAddition_scripts\a_h_useVisor.sqf"""]; Also didn't work out (in the sense, that the given command couldn't be found. Either I looked up the wrong radio thingy, or i screwed up). Now, what I also tried, was using an EvenHandler INIT on the 2 items in the CfgWeapons section themselves, but obviously it didn't work out, b/c according to what I've read so far: the INIT EventHandler only works in CfgVehicles. I've also tried calling a_h_useVisor through my dev console in the Editor, it didn't give me an error, but it did effectively nothing. :D So there I am, not really knowing what to implement in which way. I am also "a bit" tired of looking everything up, though I still have to, I know, but some help from over here would boost me, obviously. *BTW: yes I know: it could've also been done via animation on the model itself, yet then I would need to know how to properly implement the code for triggering the animation, but as of right now there's none given, and I got 2 models, one w/ the closed and one w/ opened visor.* I can bet my soul for sure I did a silly mistake, so feel free to give me the teach-slap/spank. :wub: Much greets, -Sakuie /* Edits: first: grammatical correction of the title second: grammatical correction of a phrase */