undercoverbrother
Member-
Content Count
92 -
Joined
-
Last visited
-
Medals
Everything posted by undercoverbrother
-
"put this code in the init.sqf", means create a new file init.sqf? or put in init?
undercoverbrother posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
G'day guys, I see in a lot of threads where people have posted code, that they frequently mention things like, put this code, in the helicopter's init.sqf or in the soldiers init.sqf. Could someone please tell me (and I'm sorry if it's just bloody obvious) what this exactly means? Does it mean create a new folder in your ArmA2 missions folder, called init.sqf and execute it in a somethings init or in a trigger? - or - does it mean just chuck the code into the whatever's init line? Also is there a difference between doing it one way or the other. Thanks, -
How to keep MP missions with lots of music files, manageable in terms of size
undercoverbrother posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
wassup forum? I'm adding the final touches to a coop mission on Utes that I been working on now for a few days. I want to add music to this mission and I did however, as these music files are about 2 - 3 minutes long they are very large files (well in comparison) roughly about 3mb. This obviously makes the download time for each player when they join the mission online incredibly long. Is there maybe a way to compress these music files to make the download time more manageable? Thank you for your help and I have done my very best to search for previous topics on this but, I found nothing - I geuss everyone just uses the ingame music for MP missions. undercoverbrother -
How to keep MP missions with lots of music files, manageable in terms of size
undercoverbrother replied to undercoverbrother's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thank you everyone for your help I will check out all these solutions and I will definetly download audacity. Till now I have been compressing the ogg files to ogg vorbis which seems to have made a noticable difference - roughly from 2.2mb to 700kb. I also want to apologise for replying so late to this topic, I totally forgot I had begun this thread *idiot!* *idiot!* thanks again -
Problem with script for trigger activated IED (FOR BEGINNER)
undercoverbrother posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hi all, I've been experimenting with the OA mission editor and using a video tutorial from BI themselves, tried to create a mission with a trigger activated IED. Because I don't now how to put images in posts I'll describe whats in the mission (its pretty simple anyway). Theres a AI controlled vehicle that follows a waypoint through a triggerzone activating it. On activation this script executes: _shellArray = [ 'Bo_GBU12_lgb' ] which is placed in a text file (which I changed to sqf just like the tutorial said) in the according folder in the arma 2 oa missions file in my documents. The sqf file I created is called "IED.sqf" (just like the tutorial said). I have also added this: _nil = [] execVM "IED.sqf" into the activation field of the triggerzone (just like the tutorial said - ok I'll stop). And... nothing... The vehicle goes through the trigger and absolutley nothing happens, I've tried everything. Please I really need a hand with this. Cheers, -
Commiting a camera without losing control
undercoverbrother replied to scifer's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Gday scipher, First up, when you say commit the camera to a player I'm assuming you mean your using the camera.sqs thing. If this is true, then what your saying isn't possible because once your in the camera mode you lose control of your guy or anything else on the map - you become the camera i geuss ;p The only way to control your guy again is to exit the camera mode. I'm just speaking from my experience with camera.sqs - I mean I might be wrong. cheers, undercoverbrother -
Spawn Units at Crashed Helicopter?
undercoverbrother replied to htmlasp's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
g'day htmlasp, the following script will: - spawn a helo at a random crashsite - damage it enough to get the crew out - make the crew hold the there position - spawna a random 6 man team of enemies and make them move to the crashsite - then keep checking if the enemy team has been eliminated, in which case a message will pop up and the helo crew will join your crew for this to work you need to: - press (f7) - the one for modules - in the editor double-click on the map and select the functions module - place execatly 4 markers were you want the helo to spawn and call them crashSite1, crashSite2... - have fun here is the code: _pos1 = getMarkerPos "crashSite1"; _pos2 = getMarkerPos "crashSite2"; _pos3 = getMarkerPos "crashSite3"; _pos4 = getMarkerPos "crashSite4"; _posArray = [_pos1, _pos2, _pos3, _pos4]; _crashsite = _posArray select (round(random 3)); _helo = "UH60M_EP1"; _spawnvehicleArray = [[1,1,1], 90, _helo, WEST] call bis_fnc_spawnvehicle; _spawnvehicle = _spawnvehicleArray select 0; _spawngroup = _spawnvehicleArray select 2; _spawnvehicle setpos _crashsite; _spawnVehicle setVelocity [0, 0, 0]; _spawnvehicle setDamage 0.7; sleep 4; _spawngroup allowDamage false; _spawnvehicle setDamage 1; _wp = _spawngroup addWaypoint [_crashsite, 0]; _wp setWaypointBehaviour "COMBAT"; _wp setWaypointSpeed "FULL"; _wp setWaypointType "HOLD"; _enemyUnits1 = ["TK_GUE_Soldier_5_EP1","TK_GUE_Soldier_AR_EP1","TK_GUE_Warlord_EP1","TK_GUE_Soldier_TL_EP1", "TK_INS_Soldier_2_EP1", "TK_GUE_Warlord_EP1"]; _enemyUnits2 = ["TK_GUE_Soldier_MG_EP1","TK_INS_Soldier_4_EP1","TK_INS_Soldier_EP1","TK_INS_Soldier_Sniper_EP1", "TK_INS_Soldier_AA_EP1", "TK_INS_Soldier_TL_EP1"]; _enemyUnits3 = ["TK_Soldier_AR_EP1", "TK_Soldier_AA_EP1", "TK_Soldier_EP1", "TK_Soldier_B_EP1", "TK_Soldier_Sniper_EP1", "TK_Soldier_MG_EP1"]; _enemyUnitsArray = [_enemyUnits1, _enemyUnits2, _enemyUnits3]; _enemyUnits = _enemyUnitsArray select (round(random 2)); _spawngroupEnemies = [_crashsite, EAST, _enemyUnits, [],[],[0.4,0.6]] call BIS_fnc_spawnGroup; _wp = _spawngroupEnemies addWaypoint [_crashsite, 0]; _enemiesPresent = true; while {_enemiesPresent = true} do { _enemiesPresent = false; { if (alive _x) then { _enemiesPresent = true; }; } forEach units _spawngroupEnemies; if (_enemiesPresent = false) then { hint format "Congratulations, all enemies have been eliminated, crashsite secured"; {_x join (group player)} forEach units _spawngroupEnemies; }; sleep 5; }: it is untested, so if there are any problems message me or reply and I'll have a look. good luck, I hope this works for you, undercoverbrother -
trigger to trigger
undercoverbrother replied to grillob3's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
G'day Grillob, in the onAct field of the trigger on the first town put this: _nil = [] execVM "spawnChopper.sqf"; and in spawnChopper.sqf put: _vehicle = "AH64D_EP1"; _pos = getMarkerPos "chopperSpawn"; _pos = [getpos _pos select 0, getpos _pos select 1, 100]; _wppos = getMarkerPos "chopperMove"; _spawnvehicleArray = [_pos, 90, _vehicle, WEST] call bis_fnc_spawnvehicle; _spawnvehicle = _spawnvehicleArray select 0; _spawnvehicle engineOn true; _spawngroup = _spawnvehicleArray select 2; _wp = _spawngroup addWaypoint [_wppos, 0]; _wp setWaypointBehaviour "COMBAT"; _wp setWaypointSpeed "FULL"; make sure you place a marker on the map called "chopperSpawn" where you want the chopper to spawn and a marker called "chopperMove" were you want the chopper to move. you only need to move it near the enemies the AI will take care of the rest. if you want to group the chopper with your group add this at the bottom of spawnChopper.sqf: _playerGrp = group player; {_x join _playerGrp} forEach _spawngroup; hope this is helps and reply if there is anything your unsure about, undercoverbrother -
Light size and direction?
undercoverbrother replied to JacobJ's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
G'day Jacob, I also don't know how you could light to shine like a torch (like you said it shines like a little sun). However, If you are looking to light up places like the hangars which have no lights use this script: _light = "#lightpoint" createVehicleLocal ("hangar light pos"); _light setLightBrightness 1.0; _light setLightAmbient[0.0, 1.0, 0.0]; _light setLightColor[0.0, 1.0, 0.0]; Taken from here lightAttachObject and also for the searchlight, yes they do need to be manned - but - you can just assign an AI who is invincible and invisible using this: hideObject _lightGuy; _lightGuy allowDamage false; _lightGuy moveInGunner _spotLight1; this way it looks like its unmanned, which is what I think you want. - or - maybe you could look here ARMA2/OA CLASSNAMES find the classname, create the object and attach it to the searchlight something like: _awsomeLight = "SearchLight_TK_EP1" createVehicle [1,1,1]; _awsomeLight attachto [_searchlight1, [0,0,0]]; haven't tested this though. My advice, would be not to lose to much sleep on this as I think it is just built into the game and can't be fixed (without a patch or a mod or whatever). Good Luck and I hope this helps, undercoverbrother -
Mission Outro Section not working
undercoverbrother replied to santafee's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
G'day Himmelsfeuer, Why not just trigger your script from a trigger within the mission, instead of using the outro? Might be one way to work around this problem. cheers, undercoverbrother -
Enemy Artillery firing on a town
undercoverbrother replied to bigshotking's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hey no problem guys, anytime. :) -
Enemy Artillery firing on a town
undercoverbrother replied to bigshotking's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
G'day bigshotking, I have a solution for you! It involves a bit of scripting though - but I'm pretty sure this is what your looking for: (1) Call this file "Arty_Fire.sqf" (2) Put 3 static Arty on the map and call them, Arty1, Arty2 and Arty3 (3) Put 6 markers on the map called, target_1, target_2... etc. (4) - IMPORTANT - notice the line that says: _x fire "D30"; well this is the classname of the weapon. I don't know what static Arty you want to use, I used the D30 from ArmA 2 OA. You can find the weapon class name your looking for here: http://www.armatechsquad.com/ArmA2Class/ Find the static Arty you wish to use, click on it and copy the text next to "Weapon Class(1)". Then place the classname in the code so the line looks like this: _x fire "weapon classname"; (5) put this line in the onAct field of any trigger you want to start the Arty: _nil = [] execVM "Arty_Fire.sqf"; (6) enjoy If there is anything you want to ask me about the code feel free to ask but I probably won't be able to answer until tomorrow afternoon. Hope this helps, undercoverbrother -
Question on CAS
undercoverbrother replied to quachimba's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
G'day quachimba, Can you please post a download link for your mission? It would really help me understand the problem your having here. Thanks, undercoverbrother -
Simple question: How to make big smoke shell??
undercoverbrother replied to dragon zen's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
G'day Zen, Use this: _smoke1 = "ARTY_SmokeShellWhite" createVehicle [_px2,_py2,0]; and you should get a large wall of smoke. hope this helps, undercoverbrother -
Trigger setvelocity ?
undercoverbrother replied to Warts's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
No worries :) -
Smooth camera pan/tilt via mouse moving
undercoverbrother replied to Reezo's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
G'day Reezo, Could you explain to me what you mean by a Sniper Pod XR? It would help me think of possible solutions for your problem. thanks, undercoverbrother -
How to make an debreifing to show at the End
undercoverbrother replied to Vast's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
you learn something new everyday. thanks for clearing that up -
Functions and Destroy City
undercoverbrother replied to victim913's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
All I know is that the bis wiki says it was introduced in ArmA 2 OA version 1.56 so anything anything else other than ArmA 2 OA version 1.56 and above will not recognise the function. undercoverbrother -
How to make an debreifing to show at the End
undercoverbrother replied to Vast's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Sorry if that comment wasn't directed at me. Can you tell me what an OP is please? -
Two waypoints 50% chance each one?
undercoverbrother replied to a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
G'day Acelondoner, So what you want to do is. - create two positions (the two possible positions of the wp's) - assign them to an array - get a random number and get the element from the array with index of the random number - create a wp at that position _wp1Pos = ["first position"]; _wp2Pos = ["second position"]; _wpArray = [_wp1Pos, wp2Pos]; _rndNum = round(random 2); while {_rndNum = 0} do { _rndNum = round(random 2); }; _wpPos = _wpArray this select _rndNum; _wp1 = grp addWaypoint [_wpPos, 0]; Hope this helps, undercoverbrother -
Functions and Destroy City
undercoverbrother replied to victim913's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
G'day victim913, I still don't know much, even with almost 2 years of experience. Don't worry yourself, the key is to keep hammering away at it and believe me, you'll learn. However to answer your question, functions are like a machine that accept input(s) processes it/them and produces an output. Functions always produce one value. So in this case the inputs (which are called parameters) are given to the BIS_fnc_destroyCity function, the processing is the destruction of the target buildings and the produced output is a boolean (true or false) true when completed. If you want to learn more about functions have a look through the scripting guide by Taurus posted here: http://forums.bistudio.com/showthread.php?t=94015&highlight=taurus+scripting+guide Belive me, it is an excellent guide and will be of much use to you. My advice to you, if your new to scripting, would be to start with simple scripts like creating triggers and destroying vehicles with script commands, to give yourself some exposure to the scripting in ArmA 2. For example, my very first script was for an IED that was triggered by a vehicle passing by. Put a trigger down and put yourself in the trigger (you know what I mean ;P). Synchronise the trigger to you and in the onAct field of the trigger add: _nil = [] call BIS_fnc_help; Now run the mission when the help module comes up, look under BIS find PMC_Environment and you should find the BIS_fnc_destroyCity function. This will give some information on some of the parameters the function requires. Parameter(s): _this select 0: OBJECT - Destruction center _this select 1 (Optional): NUMBER - Destruction area diameter _this select 2 (Optional): NUMBER - Random seed _this select 3 (Optional): ARRAY - Array of blacklisted [position,areaSize,seed,blacklist] call BIS_fnc_destroyCity - position should be a marker that you put down on the map (in the wiki it was called destroyBase) and you write it into the function as a string like this "awsome_marker" - areaSize, is the diameter of the destruction - not quite sure what a seed is but use what it says on the bis wiki first then toy around with it a bit and see what happens/changes. - a blacklist is an Array of specific buildings that you don't want to be destroyed. Buildings like: ["KFC", "mcdonalds", "Bohemia Interactive hq"] to add this you will need to look up the classnames of the buildings - but don't worry about that now. So basically to get this to work do the same thing as above but: - put the trigger and yourself close to some buildings. - put a marker down called "KABOOM_marker" - and in the onAct of the trigger put this: _nil = ["KABOOM_marker",500,42, []] call bis_fnc_destroyCity; - press preview and enjoy I know I wrote a damn essay here but I really reckon this is all worth saying. Good Luck and never give up, undercoverbrother -
A custom template, or something like it!?
undercoverbrother replied to SysterYster's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
G'day SysterYster, Scripting or no scripting this is not something that could work. I'm not 100% sure but I think doing what your proposing would involve toying around a bit with the game itself. I know why your asking this and I have experienced the same thing with ArmA 2. Please don't take this badly, but you've probably haven't learnt to use the commands that well yet which means it would probably be more fun having the AI lead while you follow commands (This was basically how it was for me too). Don't worry about it and believe me once you get the hang of it, you will appreciate being the leader a lot more. If you really want to though, a neat trick I like to use is: - as soon as hq gives you the specop head over to the objective - be stealthy and spot a few enemies - then swap to one of your teammates and the AI will start giving orders As I said, please don't take what I said badly, this was just how it was for me when I started playing ArmA, and if I've made a bad judgement I apologise. Happy Hunting, undercoverbrother -
How to make an debreifing to show at the End
undercoverbrother replied to Vast's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
:D thanks glad I helped -
Trigger setvelocity ?
undercoverbrother replied to Warts's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
G'day Warts, I understand your new (I'm still kinda new too) but please remember to search before you post as this is a fairly generic question to ask. You can also check the Bis Wiki for help with scripting. Basically if you want to script a trigger, you need to create one and set the conditions for it. For example, if you put the following code in the init.sqf and placed a marker on the map wherever you wanted called: _speedUpPlane, it would create a trigger at the start of the mission that would fling a plane across the map at 1000 mp/h. _trg = createTrigger["EmptyDetector", getPos _speedUpPlane]; _trg setTriggerArea [100, 100, 0, false]; _trg setTriggerActivation["WEST", "PRESENT", false]; _trg setTriggerStatements["this", "_plane setVelocity 1000", ""]; look up the createTrigger for more information. Good Luck, undercoverbrother -
How to make an debreifing to show at the End
undercoverbrother replied to Vast's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
G'day Vast, If you want to have a debriefing at the end of the mission, what you need to do (well what I like to do) is to add a a normal trigger that activates whenever the condition you set happens and then play your cutscene within the mission. You can use the cutText command to smoothly fade out and into your cutscene and use selectNoPlayer and selectPlayer to switch to an entirely different place on a map. You can then execute the "outro_cutscene.sqf" and at the end of the file have a endMissioncommand. So basically, you would have a trigger that looks something like this: _trg = createTrigger["EmptyDetector", getMarkerPos _EnemyBase]; _trg setTriggerArea [1000, 1000, 100, false]; _trg setTriggerActivation ["EAST", "NOT PRESENT", true]; _trg setTriggerStatements ["this", "_nil = [] execVM 'debriefing.sqf'", ""]; And in "debriefing.sqf" you could have: cutText ["", "BLACK OUT", "5"]; sleep 5; selectNoPlayer; selectPlayer _newPlayer; _nil = [] execVM "outro_cutscene.sqf"; And "outro_cutscene.sqf" would look something like: cutText ["", "BLACK IN", 5]; lt_Dan switchMove "briefing animation"; pvt_West switchMove "sit down animation"; sgt_Johnson switchMove "smoke cigar animation"; cutText ["", "BLACK OUT", "5"]; sleep 5; endMission; I hope this helps, undercoverbrother -
playSound not working when inside a vehicle?
undercoverbrother replied to galzohar's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
There is a way to define a spot to say the sound. (You menitioned you used the the "say" command so sorry if you already know this, but...) If you use the say3D command you can play the sound from a defined point in a 3D space. Not sure about what you mean by: But I can tell you that the volume will vary depending on the distance of the hearer and whether or not they are currently in a vehicle. Hope this is useful, undercoverbrother