fight9
Member-
Content Count
382 -
Joined
-
Last visited
-
Medals
Everything posted by fight9
-
How to disable street lights?
fight9 replied to roguetrooper's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'll make an example mission with a few different options. -
How to disable street lights?
fight9 replied to roguetrooper's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Use it as a parameter when calling the script. The script works for both off and on. off: 0 = [0.95] execVM "lights.sqf"; on: 0 = [0] execVM "lights.sqf"; -
How to disable street lights?
fight9 replied to roguetrooper's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The post by me in the other thread has the working script. I turns off all lights with only a few exceptions (runway markers, gas station). Also, use 0.95 because the destroys the light, and not the whole post. 1 will completely destroy the whole thing. http://forums.bistudio.com/showthread.php?172320-I-am-one-type-of-lights-ClassName-short-of-success-help!!-P&p=2620825&viewfull=1#post2620825 -
Having the "null =" won't make a difference here. It's good practice though since the editor won't let you run execVM unless you have a return value, even if it's null. I know EOS lets you edit the init of a unit, I'll look into locking for it later.
-
I am one type of lights ClassName short of success, help!! :P
fight9 replied to dark_spectre's topic in ARMA 3 - MISSION EDITING & SCRIPTING
// off: 0 = [0.95] execVM "lights.sqf"; // on: 0 = [0] execVM "lights.sqf"; _types = ["Lamps_Base_F", "PowerLines_base_F","Land_LampDecor_F","Land_LampHalogen_F","Land_LampHarbour_F","Land_LampShabby_F","Land_NavigLight","Land_runway_edgelight","Land_PowerPoleWooden_L_F"]; _onoff = _this select 0; for [{_i=0},{_i < (count _types)},{_i=_i+1}] do { // lightsmarker is a marker I placed. 1000 is the distance around the marker _lamps = getMarkerPos "lightsmarker" nearObjects [_types select _i, 1000]; sleep 1; {_x setDamage _onoff} forEach _lamps; }; OP: This might just be one of those things you cant turn off without destroying the whole thing. Kind of like the runway lights that have no damage model. -
Since you are using the INIT.sqf, it should run for all players, I think. Did it just stop working or did you happen to travel somewhere quickly and find an unlocked vehicle before the 3 min loop restarted? There's probably a simpler solution to doing this than using the loop above. How are you spawning vehicles during the mission?
-
Also, it locks every vehicle for 1km every 3 minutes. If your are traveling faster than that, then you have a chance of finding an unlocked vehicle. Adjust the distance and sleep values and add more vehicle classnames in same format.
-
The script above is being applied to units named BIS_leader and BIS_inf. The script would need to be adjusted to be applied universally. In its current state, units would need to be alive with those names. What you are really looking for is the effects within this script. 1 fadeMusic 0; 0.5 fadeSound 0.2; playSound ["combat_deafness", true]; and [] spawn { // scriptName "missionFlow.fsm: combat deafness"; addCamShake [2, 5, 20]; private ["_blur"]; _blur = ppEffectCreate ["DynamicBlur", 474]; _blur ppEffectEnable true; _blur ppEffectAdjust [0]; _blur ppEffectCommit 0; waitUntil {ppEffectCommitted _blur}; _blur ppEffectAdjust [10]; _blur ppEffectCommit 0; titleCut ["", "WHITE IN", 5]; _blur ppEffectAdjust [0]; _blur ppEffectCommit 5; waitUntil {ppEffectCommitted _blur}; _blur ppEffectEnable false; ppEffectDestroy _blur; }; The rest of the script has to do with the dead leader, conversations, and the land mines.
-
Change spawned AI loadout by class
fight9 replied to Solidsnacks's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_x is used in the foreach loop command. So here, the foreach loops runs on each soldier, and each time _x is a soldier defined after the foreach command. {_x addWeapon "weapon"} foreach (units contact1) The loop runs for each unit in contact1. Each time, _x is one unit in the group. And then the next, and the next, and so on. The loop ends when it has been run for each unit. Without foreach, and before and after the loop, _x is undefined and returns nothing. -
Addaction--> Distance from object
fight9 replied to bigshot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Try "(Player distance buildingName) <= 30" If that doesn't work, then keep the above and change the action to be added to the player and not the fob -
Getting in Vehicle with a big delay
fight9 replied to Moon_chilD's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Is this just one mission? If so, its probably something mission related. Do you have any scripts that loop and collect or create data every second or so? -
Issues with establishingshot, tasks/waypoints
fight9 replied to COL.C.T's topic in ARMA 3 - MISSION EDITING & SCRIPTING
If BIS_fnc_establishingShot_playing returns TRUE after the briefing ends, then adding the "!" In front would mean, wait until its false, which it starts off as. Try removing the ! and (). -
Quick question for my understanding
fight9 replied to fusion13's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Wow, good explanation. Thank you. -
I doubt anyone here is going to hold your hand because you don't want to take the time to learn a little.
-
Either - or... (with "probability of presence) how?
fight9 replied to tortuosit's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You can do the unit spawning through scripting pretty easily If {random 100 <= 50.00} then { "soldierWB" createUnit [getMarkerPos "barracks", group player]; } else { "soldierWB" createUnit [getMarkerPos "house", group player]; }; http://community.bistudio.com/wiki/createUnit A random number out of 100 will be picked, if its less than 50, then the first soldier will spawn, if its over 50 then the second unit will be spawned. -
How to remove Shift click waypoints completely
fight9 replied to Firestorm_01's topic in ARMA 3 - MISSION EDITING & SCRIPTING
It's something done by the client or servers difficulty settings. I'm not sure if that is something that can be changed through mission script commands. I've never seen it. -
createVehicle with init field
fight9 replied to fusion13's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I dont think you can. But you dont really need to. The object name you use in createVehicle can be used in script or command you want to apply to it afterwards. You just wont be able to use "this". _heli = "AH1Z" createVehicle (getMarkerPos "hspawn"); You would then use "_heli" in any command or script you want to apply to the vehicle. If an execVM script doesn't have you using "[this]" to apply it, then just add it as [_heli]. -
Most scripts come with an installation instructions. Ie put the script in the folder, add lines to INIT.sqf and/or description.ext. But you should start reading those guide linked above. You'll understand a lot more if you get the basics down.
-
Particle Effect Attached to Player Through Respawns?
fight9 replied to meatball's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Have you tried removing the above function completely in the respawn eventhandler and going straight to the script start? If you know the emitter doesnt exist on respawn, then there is no reason to check for it. But the reason you are probably crashing is because you are calling the function you are running. I've never seen a function call itself. Add that addeventhandler somewhere outside of the function, like in the main script, or somewhere else. Or change it to call the getEmitter function. -
Help needed on making a script for random loadouts for SP.
fight9 replied to twiddlingthumbs's topic in ARMA 3 - MISSION EDITING & SCRIPTING
It's a way to do a random percentage chance. If a random number 100 (0-100) is less than (<) 75 then do script ( {...}; ). So the condition has a 74.99 percent chance of being TRUE. If the random number falls between 75.00 and 100.00, then the condition returns FALSE and that section is skipped and the random items not added. (random 100 < 75.00) = 74.99% chance (random 100 <= 75.00) = 75.00% chance -
No worries. I was just little confused. I do agree though that locking from the vehicle INIT is the best solution. Use the above if that isn't an option for what ever reason, or you don't want to try to edit whatever spawn script you are using.
-
Selecting objects within an array
fight9 replied to twiddlingthumbs's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You could also condense it to one foreach loop _people = [bob, John]; { removeUniform _x; _x addUniform "U_mas_afr_O_rebel3"; } forEach _people; Less is always better. Instead of 4 loops, this only runs 2. -
Particle Effect Attached to Player Through Respawns?
fight9 replied to meatball's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You'll probably have to use an MPeventhandler for respawning. _index = player addMPEventHandler ["mprespawn", {Null = _this execVM "particlesScript.sqf";}]; http://community.bistudio.com/wiki/Arma_3:_Event_Handlers#MPRespawn -
-
trigger for SetTaskState "Failed" on multiple tasks?
fight9 replied to doubledizz's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You need to use && (AND) not || (OR). The above would make it so only one trigger would need to be completed for the condition to return false. Also, a forth separate condition would need to be added or it will return true from the game start. Say the extraction point had a 10x10 BLUFOR present condition for this trigger. If you went to extraction without completing all the tasks, this trigger would return true and set all tasks as failed. This && !triggerActivated trig1 || !triggerActivated trig2 || !triggerActivated trig3