-
Content Count
2658 -
Joined
-
Last visited
-
Medals
Everything posted by demonized
-
Group In Vehicle - Check
demonized replied to SD_BOB's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
this will cause a delay until AI team leader or yourself notices that unit is dead if so. better use OR !alive _x instead of && alive _x in above condition. above condition will fail every time since && means and, wich is translated to: vehicle unit is veh1 and vehicle unit is veh2, wich never happens ofc, only one vehicle at a time, unless you are a wizard ofc ;) it should be OR or the sqs equivalent || && wiki -
Group In Vehicle - Check
demonized replied to SD_BOB's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
({[b]_x [url="http://community.bistudio.com/wiki/in"]in[/url] vehiclename1 [url="http://community.bistudio.com/wiki/or"]OR[/url] _x in vehiclename2[/b]} count units mygroup == {alive _x} count units mygroup); edit: and for more vehicles instead of long condition line you can use array of vehicles: ({[url="http://community.bistudio.com/wiki/vehicle"]vehicle[/url] _x [url="http://community.bistudio.com/wiki/in"]in[/url] [b][vehiclename1,vehiclename2,vehiclename3][/b]} count units mygroup == {alive _x} count units mygroup) -
Group ID in MP lobby - can it be changed?
demonized replied to ZNorQ's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
i think that is the description in the unit window line. or try opening up mission.sqm and manually edit, at least you can edit order there. -
Reserved Variables
demonized replied to viperSniper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
i think from here: http://www.arma2.com/comref/comref.html -
Bus script, letting off AI.
demonized replied to DeclaredEvol's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
name your passengers and use [url="http://community.bistudio.com/wiki/unassignVehicle"]unassignVehicle[/url] unitname; in bus driver waypoints. you can also just pick random number or random passengers and unassign them from the crew array and make sure they are not driver instead of naming them if its no particular need for full control, creates some randomness. place this code in bus waypoints and it will dropof 1-3 random selected units. _null = this spawn { _veh = vehicle _this; _crew = (crew _veh) - [(driver _veh)]; _getout = ceil(random 3); while {_getout > 0 AND (count _crew) >= _getout} do { _passenger = _crew select (random(floor(count _crew))); unassignVehicle _passenger; _crew = _crew - [_passenger]; sleep 1; }; }; -
Check for distance between flying plane and marker
demonized replied to wiggum2's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
distance reads direct line from position to position, if a plane is 150 up there is a big chance of the check never activates since plane needs to be in perfect position above marker to be within. Just a little too the left or right or up and it never activates, try exstending range and check again. No need to add in z value in getMArkerPos. object distance markerPosition works just fine, at least in A2 CO 1.59 no betas. -
Reserved Variables
demonized replied to viperSniper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
if you use the latest version of arma edit with update it shows all variables and commands highlighted when you type them. -
Please help with script - changing object (and doWatch) position slightly
demonized replied to zodd's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
No, i dont think so, i just asumed it to be artillery you meant, mg nests makes more sence now. Afaik arty module is for arty only, though ive never tested with mg etc... -
Syncronize After Respawn
demonized replied to ajyoung6's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
not sure exactly how your modules work, but most modules need to be initiated at mission start. solution: delete the old module and create and synch it via script to respawned player on eventhandler. -
Please help with script - changing object (and doWatch) position slightly
demonized replied to zodd's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
use artilery module and BIS_ARTY_F_SetDispersion -
Helicopter support question
demonized replied to Angus S's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
hold waypoint of heli synchronized (F5 or 6) with switch type trigger, a couple of move or sad wps with a cycle wp, and another trigger grouped to the heli in the path with switch synched to cycle wp with delay in seconds min/med/max. -
Changing a units rank
demonized replied to Angus S's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
unitName [url="http://community.bistudio.com/wiki/setRank"]setRank[/url] "COLONEL"; -
Request: Tournament Scoring Script
demonized replied to lightspeed_aust's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
its just a simple adding numbers. what you need to concern yourself with is what is the objectives, and how to check that. first setup the initial score "0" in init.sqf. scoreForTheGrunts = 0; now the objectives, for example obj1: task is to kill general named biatch. have a trigger or script check if biatch is alive if so add a number. (we only need it to check on server side unless biatch is in player led group). trigger condition: isServer AND !alive biatch trigger on act: scoreForTheGrunts = scoreForTheGrunts + 30; publicVariable "scoreForTheGrunts"; now when biatch is dead, score is added 30 points, and broadcasted to all players, you can repeat this as much as you want adding score upon score. When the player group reaches the extract or end area have a trigger display the hint in format. trigger condition synched to group or all players present or whatever suits your mission. trigger on act: hintC format["You guys scored %1",scoreForTheGrunts]; now hint will display with score in center of screen and players need to click continue for it to go away, use hint or hintsilent for others, fancyer way, go with dialogs (advanced) or add it to MP score debrief screen, (not sure how). -
only tested in SP editor, should be MP compatible. its simple and not very adjusted, unit bow head into vehicel when repairing, better animation (shorter) can be used instead. will run for each player, each 5 seconds it will automatically add the repair action to any vehicle, wich wil show for TK militia faction only and only when damaged, remove the two // infront of the setFuel line in top if you want refuel to happen with repairs aswell.
-
create vehicle with name
demonized replied to lockjaw-65-'s topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
1 way of doing it, run my DMZ Delete script in your mission (will clean the mission for you aswell, fully customizable btw) and use the DMZ_include option on each of the spawned objects. or another way, create a global array: objectiveObjects = []; // global array that can be acessed from anywhere. // now add all objects spawned into the array. _obj = createVehicle ["some_object", some_position, [], 0, "NONE"]; objectiveObjects = objectiveObjects + [_obj]; // add the object to the array. reason for using a global array is that you can use it from triggers etc later on, for example on task complete or no opfor present etc... {deleteVehicle _x} foreach objectiveObjects; // all objects deleting from array. Or you can create a local array in the spawning script and just wait or transfer the array to a objective complete part and then delete it at will. -
you need to either create a custom addon or use scripts, a quick search yielded this post: http://forums.bistudio.com/showpost.php?p=2024267&postcount=6 maybe it can help you out.
-
Function for free landing zone?
demonized replied to gc8's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
i used this in my prareinforce v 1.2 script, works everytime, need function module: _hPad = editorplaced_hPad_name; // object we place at the found LZ. _findGoodSpot = true; _maxdist = 100; // max initial range from below position to search for LZ. _LZpos = getPos player; // position where a safe LZ should be found. while {_findGoodSpot} do { _posTemp = [_LZpos, 0, _maxdist, 10, 0, 0.5, 0] call BIS_fnc_findSafePos; _maxdist = _maxdist + 10; // add to the range to check if no LZ found. sleep 2; _string = format _posTemp; sleep 1; if (!isNil ("_string")) then { _hPad setPos _posTemp; // place the hPad at the found LZ and exit while loop. _findGoodSpot = false; }; }; -
Use ALICE to spawn BLUFOR or OPFOR?
demonized replied to tpw's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
maybe this thread might shed some light on this for you. http://forums.bistudio.com/showthread.php?t=119184 but i suspect you need this one, if this is at all possible with non civs. "BIS_BAF_MTP" -
Mission 'glitching' when i approach an area
demonized replied to borg117's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
http://community.bistudio.com/wiki/First_Aid#Setup do not synch modules with eachother, only synch each module to each player. -
Trigger: If present, then do this.
demonized replied to neven's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
in the trigger, under type, select switch, press ok., then in editor, press F6 or 5 (Synchronize) and drag a line from the trigger to the wp of the heli and voila, heli will only continue to next wp when trigger is activated. -
How to make ejected units follow a waypoint?
demonized replied to Carfunf's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
also give the read by Mr Murray in my signature a read, great for new aspiring editors. -
Setting Playable units (once)
demonized replied to iceman77's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
if the purpose is to have them be available in single player just run this code from a init line of one of the units. in this case it makes all West units playable: _null = [] spawn { sleep 1; { if (side _x == west) then {addSwitchableUnit _x}; } foreach allUnits; }; you can also do it with MP missions using "addPlayable _x" instead of "addSwitchableUnit _x", though i dont think they will be available in the MP briefing screen even if you run code from init.sqf. Most likely you need to remove the sleep 1 line for MP in any case. -
spawn a missile/rocket without motors running
demonized replied to f2k sel's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
just out of couriosity, have you tried with: rocket setFuel 0; or maybe run a action engineoff or something.. -
how to find name of weapon in hand using a trigger
demonized replied to swot's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
http://community.bistudio.com/wiki/typeOf http://community.bistudio.com/wiki/currentWeapon -
Triggers and using Synchronize
demonized replied to iceman11a's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Allright, there is a solution to everything :) About the guide, yeah i meant Mr Murrays, the same one you already had. it works for A2 aswell, thats where i first started my scripting learning, that and other peoples scripts.