=Odin=
Member-
Content Count
108 -
Joined
-
Last visited
-
Medals
Everything posted by =Odin=
-
Scripting waypoints
=Odin= replied to Impact's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hello, This is a city to city patrol script I made a few years back that you can use, as it has waypoints spawn bis groups in it allready, or just read it and copy what bits work for you :) ////////////////////////////////////////////////////////////////// // Function file for [ARMA2/Combined Ops] // Created by: [(AEF) Odin] ////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// // Function file for ARMA2 // Created by: Odin aka (AEF)Odin // Visit http://www.aef-hq.com.au/aef3 // USAGE ==> // // Create a rectangle marker and name it what you like. // Add a function module. // Add a "CityCenter" Logic. // Be sure to add a Russian rifleman somewhere on the map (set probabilaty of presence to 0), // Or change the units side to represent the patrol groups side. // YOU MUST have at these lines in you init.sqf // // if (!isServer) exitWith{}; // waitUntil {!isNil "bis_fnc_init"}; // // To call this script you must include the "MarkerName" and one of the 6 different groups. // "INF" // "MOTO" // "MECH" // "TANK" // "AIR" // "2GROUPS" // Now add this line to your init // call{["MarkerName","YourChoiceOfGroup"] execVM "CityToCityPatrol.sqf"}; // EXAMPLE ==> // call{["pat","AIR"] execVM "CityFlatPatrol.sqf"}; // // This script has been set up to spawn East groups, if you want another group uncomment the desired // side and re add comment "//" to previous Group // To change from East to West EXAMPLE==> // _InfGrp = [_zone_pos, east, (configFile >> "CfgGroups" >> "East" >> "RU" >> "Infantry" >> "RU_InfSquad")] call BIS_fnc_spawnGroup; // //_InfGrp = [_zone_pos, east, (configFile >> "CfgGroups" >> "East" >> "INS" >> "Infantry" >> "INS_InfSquad")] call BIS_fnc_spawnGroup; // //_InfGrp = [_zone_pos, west, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Infantry" >> "USMC_InfSquad")] call BIS_fnc_spawnGroup; // //_InfGrp = [getMarkerPos _zone, west, (configFile >> "CfgGroups" >> "West" >> "CDF" >> "Infantry" >> "CDF_InfSquad")] call BIS_fnc_spawnGroup; // //_InfGrp = [_zone_pos, resistance, (configFile >> "CfgGroups" >> "Guerrila" >> "GUE" >> "Infantry" >> "GUE_InfSquad")] call BIS_fnc_spawnGroup; // //_InfGrp = [_zone_pos, civilian, (configFile >> "CfgGroups" >> "Civilian" >> "CIV" >> "Infantry" >> "CIV_Crowd")] call BIS_fnc_spawnGroup; // // Would look like this // // //_InfGrp = [_zone_pos, east, (configFile >> "CfgGroups" >> "East" >> "RU" >> "Infantry" >> "RU_InfSquad")] call BIS_fnc_spawnGroup; // //_InfGrp = [_zone_pos, east, (configFile >> "CfgGroups" >> "East" >> "INS" >> "Infantry" >> "INS_InfSquad")] call BIS_fnc_spawnGroup; // _InfGrp = [_zone_pos, west, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Infantry" >> "USMC_InfSquad")] call BIS_fnc_spawnGroup; // //_InfGrp = [getMarkerPos _zone, west, (configFile >> "CfgGroups" >> "West" >> "CDF" >> "Infantry" >> "CDF_InfSquad")] call BIS_fnc_spawnGroup; // //_InfGrp = [_zone_pos, resistance, (configFile >> "CfgGroups" >> "Guerrila" >> "GUE" >> "Infantry" >> "GUE_InfSquad")] call BIS_fnc_spawnGroup; // //_InfGrp = [_zone_pos, civilian, (configFile >> "CfgGroups" >> "Civilian" >> "CIV" >> "Infantry" >> "CIV_Crowd")] call BIS_fnc_spawnGroup; // // Use the Included ClassName refernce list "GroupClasses.txt" to change the GroupClasses. // ////////////////////////////////////////////////////////////////// if (!isServer) exitWith{}; Private ["_start","_zone","_zone_size","_zone_size_x","_zone_size_y","_type"]; _start = false; _zone = _this select 0; //_zone_pos = getMarkerPos _zone; _zone_size = MarkerSize _zone; _zone_size_x = (_zone_size select 0); _zone_size_y = (_zone_size select 1); sleep 0.05; _start = true; _type = _this select 1; if (_start) then { Private ["_init","_search","_zone_pos","_InfGrp","_MotoGrp","_MechGrp","_TankGrp","_AirGrp","_Grp1","_Grp2","_UnitLeader","_list","_typeVar","_neighbors","_name","_x","_wp1","_wp2","_wp3","_wp4","_wp5","_wp6","_wp7","_cond1","_cond2"]; _init = switch (_type) do { case "INF": { _search = createMarker ["_spawn",getMarkerPos _zone]; _search setMarkerType "Empty"; _search setMarkerColor "Default"; _search setMarkerSize [0.5, 0.5]; sleep 0.001; _search setMarkerPos [(getMarkerPos _search select 0)+ Random _zone_size_x,(getMarkerPos _search select 1)- Random _zone_size_x]; _zone_pos = getMarkerPos _search; _InfGrp = [_zone_pos, east, (configFile >> "CfgGroups" >> "East" >> "RU" >> "Infantry" >> "RU_InfSquad")] call BIS_fnc_spawnGroup; //_InfGrp = [_zone_pos, east, (configFile >> "CfgGroups" >> "East" >> "INS" >> "Infantry" >> "INS_InfSquad")] call BIS_fnc_spawnGroup; //_InfGrp = [_zone_pos, west, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Infantry" >> "USMC_InfSquad")] call BIS_fnc_spawnGroup; //_InfGrp = [_zone_pos, west, (configFile >> "CfgGroups" >> "West" >> "CDF" >> "Infantry" >> "CDF_InfSquad")] call BIS_fnc_spawnGroup; //_InfGrp = [_zone_pos, resistance, (configFile >> "CfgGroups" >> "Guerrila" >> "GUE" >> "Infantry" >> "GUE_InfSquad")] call BIS_fnc_spawnGroup; //_InfGrp = [_zone_pos, civilian, (configFile >> "CfgGroups" >> "Civilian" >> "CIV" >> "Infantry" >> "CIV_Crowd")] call BIS_fnc_spawnGroup; _UnitLeader = leader _InfGrp; _UnitLeader = leader _InfGrp; _list = ["CityCenter",[getMarkerPos _zone,_zone_size_y],true] call bis_fnc_locations; while {true} do { { sleep 0.02; _typeVar = _x getVariable "type"; _neighbors = _x getVariable "neighbors"; _name = _x getVariable "name"; sleep 0.02; _wp1 = _InfGrp addWaypoint [getpos _x, 0]; [_InfGrp, 1] setWaypointBehaviour "COMBAT"; [_InfGrp, 1] setWaypointSpeed "FULL"; [_InfGrp, 1] setWaypointType "MOVE"; waitUntil{currentWaypoint _InfGrp != 1}; sleep 0.2; deleteWaypoint _wp1; } forEach _list; }; }; case "MOTO": { _search = createMarker ["_spawn1",getMarkerPos _zone]; _search setMarkerType "Empty"; _search setMarkerColor "Default"; _search setMarkerSize [0.5, 0.5]; sleep 0.001; _search setMarkerPos [(getMarkerPos _search select 0)+ Random _zone_size_x,(getMarkerPos _search select 1)- Random _zone_size_x]; _zone_pos = getMarkerPos _search; _MotoGrp = [_zone_pos, east, (configFile >> "CfgGroups" >> "East" >> "RU" >> "Motorized" >> "RU_MotInfSquad")] call BIS_fnc_spawnGroup; //_MotoGrp = [_zone_pos, east, (configFile >> "CfgGroups" >> "East" >> "INS" >> "Motorized" >> "INS_MotInfSquad")] call BIS_fnc_spawnGroup; //_MotoGrp = [_zone_pos, west, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Motorized" >> "USMC_MotInfSection")] call BIS_fnc_spawnGroup; //_MotoGrp = [_zone_pos, west, (configFile >> "CfgGroups" >> "West" >> "CDF" >> "Motorized" >> "CDF_MotInfSquad")] call BIS_fnc_spawnGroup; //_MotoGrp = [_zone_pos, resistance, (configFile >> "CfgGroups" >> "Guerrila" >> "GUE" >> "Motorized" >> "GUE_MotInfSection")] call BIS_fnc_spawnGroup; _UnitLeader = leader _MotoGrp; _list = ["CityCenter",[getMarkerPos _zone,_zone_size_y],true] call bis_fnc_locations; while {true} do { { sleep 0.02; _typeVar = _x getVariable "type"; _neighbors = _x getVariable "neighbors"; _name = _x getVariable "name"; sleep 0.02; _wp2 = _MotoGrp addWaypoint [getpos _x, 0]; [_MotoGrp, 1] setWaypointBehaviour "COMBAT"; [_MotoGrp, 1] setWaypointSpeed "FULL"; [_MotoGrp, 1] setWaypointType "MOVE"; waitUntil{currentWaypoint _MotoGrp != 1}; sleep 0.2; deleteWaypoint _wp2; } forEach _list; }; }; case "MECH": { _search = createMarker ["_spawn2",getMarkerPos _zone]; _search setMarkerType "Empty"; _search setMarkerColor "Default"; _search setMarkerSize [0.5, 0.5]; sleep 0.001; _search setMarkerPos [(getMarkerPos _search select 0)+ Random _zone_size_x,(getMarkerPos _search select 1)- Random _zone_size_x]; _zone_pos = getMarkerPos _search; _MechGrp = [_zone_pos, east, (configFile >> "CfgGroups" >> "East" >> "RU" >> "Mechanized" >> "RU_MechInfSquad_1")] call BIS_fnc_spawnGroup; //_MechGrp = [_zone_pos, east, (configFile >> "CfgGroups" >> "East" >> "INS" >> "Mechanized" >> "INS_MechInfSquad")] call BIS_fnc_spawnGroup; //_MechGrp = [_zone_pos, west, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Mechanized" >> "USMC_MechInfSquad")] call BIS_fnc_spawnGroup; //_MechGrp = [_zone_pos, west, (configFile >> "CfgGroups" >> "West" >> "CDF" >> "Mechanized" >> "CDF_MechInfSquad")] call BIS_fnc_spawnGroup; //_MechGrp = [_zone_pos, resistance, (configFile >> "CfgGroups" >> "Guerrila" >> "GUE" >> "Mechanized" >> "GUE_MechInfSection")] call BIS_fnc_spawnGroup; _UnitLeader = leader _MechGrp; _list = ["CityCenter",[getMarkerPos _zone,_zone_size_y],true] call bis_fnc_locations; while {true} do { { sleep 0.02; _typeVar = _x getVariable "type"; _neighbors = _x getVariable "neighbors"; _name = _x getVariable "name"; sleep 0.02; _wp3 = _MechGrp addWaypoint [getpos _x, 0]; [_MechGrp, 1] setWaypointBehaviour "COMBAT"; [_MechGrp, 1] setWaypointSpeed "FULL"; [_MechGrp, 1] setWaypointType "MOVE"; waitUntil{currentWaypoint _MechGrp != 1}; sleep 0.2; deleteWaypoint _wp3; } forEach _list; }; }; case "TANK": { _search = createMarker ["_spawn3",getMarkerPos _zone]; _search setMarkerType "Empty"; _search setMarkerColor "Default"; _search setMarkerSize [0.5, 0.5]; sleep 0.001; _search setMarkerPos [(getMarkerPos _search select 0)+ Random _zone_size_x,(getMarkerPos _search select 1)- Random _zone_size_x]; _zone_pos = getMarkerPos _search; _TankGrp = [_zone_pos, east, (configFile >> "CfgGroups" >> "East" >> "RU" >> "Armored" >> "RU_TankPlatoon")] call BIS_fnc_spawnGroup; //_TankGrp = [_zone_pos, east, (configFile >> "CfgGroups" >> "East" >> "INS" >> "Armored" >> "INS_TankSection")] call BIS_fnc_spawnGroup; //_TankGrp = [_zone_pos, west, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Armored" >> "USMC_TankPlatoon")] call BIS_fnc_spawnGroup; //_TankGrp = [_zone_pos, west, (configFile >> "CfgGroups" >> "West" >> "CDF" >> "Armored" >> "CDF_TankPlatoon")] call BIS_fnc_spawnGroup; //_TankGrp = [_zone_pos, resistance, (configFile >> "CfgGroups" >> "Guerrila" >> "GUE" >> "Armored" >> "GUE_TankSection")] call BIS_fnc_spawnGroup; _UnitLeader = leader _TankGrp; _list = ["CityCenter",[getMarkerPos _zone,_zone_size_y],true] call bis_fnc_locations; while {true} do { { sleep 0.02; _typeVar = _x getVariable "type"; _neighbors = _x getVariable "neighbors"; _name = _x getVariable "name"; sleep 0.02; _wp4 = _TankGrp addWaypoint [getpos _x, 0]; [_TankGrp, 1] setWaypointBehaviour "COMBAT"; [_TankGrp, 1] setWaypointSpeed "FULL"; [_TankGrp, 1] setWaypointType "MOVE"; waitUntil{currentWaypoint _TankGrp != 1}; sleep 0.2; deleteWaypoint _wp4; } forEach _list; }; }; case "AIR": { _search = createMarker ["_spawn4",getMarkerPos _zone]; _search setMarkerType "Empty"; _search setMarkerColor "Default"; _search setMarkerSize [0.5, 0.5]; sleep 0.001; _search setMarkerPos [(getMarkerPos _search select 0)+ Random _zone_size_x,(getMarkerPos _search select 1)- Random _zone_size_x]; _zone_pos = getMarkerPos _search; _AirGrp = [_zone_pos, east, (configFile >> "CfgGroups" >> "East" >> "RU" >> "Air" >> "RU_Mi24VSquadron")] call BIS_fnc_spawnGroup; //_AirGrp = [_zone_pos, east, (configFile >> "CfgGroups" >> "East" >> "INS" >> "Air" >> "INS_Mi8Squadron")] call BIS_fnc_spawnGroup; //_AirGrp = [_zone_pos, west, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Air" >> "USMC_UH1YSquadron")] call BIS_fnc_spawnGroup; //_AirGrp = [_zone_pos, west, (configFile >> "CfgGroups" >> "West" >> "CDF" >> "Air" >> "CDF_Mi24DSquadron")] call BIS_fnc_spawnGroup; _UnitLeader = leader _AirGrp; _list = ["CityCenter",[getMarkerPos _zone,_zone_size_y],true] call bis_fnc_locations; while {true} do { { sleep 0.02; _typeVar = _x getVariable "type"; _neighbors = _x getVariable "neighbors"; _name = _x getVariable "name"; sleep 0.02; _wp5 = _AirGrp addWaypoint [getpos _x, 0]; [_AirGrp, 1] setWaypointBehaviour "COMBAT"; [_AirGrp, 1] setWaypointSpeed "FULL"; [_AirGrp, 1] setWaypointType "MOVE"; waitUntil{currentWaypoint _AirGrp != 1}; sleep 0.2; deleteWaypoint _wp5; } forEach _list; }; }; case "2GROUPS": { _search = createMarker ["_spawn5",getMarkerPos _zone]; _search setMarkerType "Empty"; _search setMarkerColor "Default"; _search setMarkerSize [0.5, 0.5]; sleep 0.001; _search setMarkerPos [(getMarkerPos _search select 0)+ Random _zone_size_x,(getMarkerPos _search select 1)- Random _zone_size_x]; _zone_pos = getMarkerPos _search; _Grp1 = [_zone_pos, east, (configFile >> "CfgGroups" >> "East" >> "RU" >> "Motorized" >> "RU_MotInfSquad")] call BIS_fnc_spawnGroup; sleep 1; _Grp2 = [_zone_pos, east, (configFile >> "CfgGroups" >> "East" >> "RU" >> "Infantry" >> "RU_InfSquad")] call BIS_fnc_spawnGroup; _UnitLeader = leader _Grp1; _list = ["CityCenter",[getMarkerPos _zone,_zone_size_y],true] call bis_fnc_locations; while {true} do { { sleep 0.02; _typeVar = _x getVariable "type"; _neighbors = _x getVariable "neighbors"; _name = _x getVariable "name"; sleep 0.02; _wp6 = _Grp1 addWaypoint [getpos _x, 0]; [_Grp1, 1] setWaypointBehaviour "COMBAT"; [_Grp1, 1] setWaypointSpeed "FULL"; [_Grp1, 1] setWaypointType "MOVE"; _wp7 = _Grp2 addWaypoint [getpos _x, 0]; [_Grp2, 1] setWaypointBehaviour "COMBAT"; [_Grp2, 1] setWaypointSpeed "FULL"; [_Grp2, 1] setWaypointType "MOVE"; waitUntil{ _cond1 =currentWaypoint _Grp1 != 1; _cond2 =currentWaypoint _Grp2 != 0; _cond1 && _cond2 }; sleep 0.2; deleteWaypoint _wp6; deleteWaypoint _wp7; } forEach _list; }; }; }; }; Sleep 0.1; Or this is the link to a newer version that supports ACE with a demo mission http://www.armaholic.com/page.php?id=10292 Hope that helps. Odin -
Heya Sarge, I may be a bit rusty at scripting, but in your 1st line of the siren.sqf _this = _this select 3; you are using one of the Magic Variables ==>http://community.bistudio.com/wiki/Magic_Variables, Maybe change that and all corrisponding references to a new name e.g. _sarge = _this select 3;[//CODE]Also a [color=#0000FF]select 3 [/color]should follow [color=#0000FF]select 0;[/color] it may not be law but I think it helps. Like I say I am a bit rusty but try that and see if it helps. Odin
-
Show Classnames, Weapons, Magazines etc.
=Odin= replied to Cyborg11's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Awesome I love this, Helped me find the Class names of enterable buildings :D -
Random spawn positions for AI???
=Odin= replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Heya lucky, maybe take a look at these scripts they do what you ask but spawn entire groups of units or vehicles at random locations. You can open them up and have a look to see how it was acheived, or use the included readme to help implement them into your own mission. hope it helps. http://creobellum.org/node/24 -
How to script aircraft to attack?
=Odin= replied to thaFunkster's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
This Airsupport script may help you out as a starter http://creobellum.org/node/110 Search for camSetRelPos or this topic on the OFPEC should help out with the set up of a camera chase Hope that helps http://www.ofpec.com/forum/index.php?topic=34324.0 -
What am I missing? Briefing.sqf
=Odin= replied to SpyderPB6's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Maybe try it like this, this is based on a working version I have used for switching betwwen players squads, waitUntil {!(isNull player)}; waitUntil {player==player}; switch ((side player)) do { case WEST: { player createDiaryRecord ["Diary",["Extraction","You will be made aware of your extraction location apon completion of your first task."]]; player createDiaryRecord ["Diary",["Info 2","Multiple hostiles, several light vehicles spotted by CDF. The shipment of Tunguskas was at the docks of Bereznio. They are thought to be awaiting transport and not expected to be manned."]]; player createDiaryRecord ["Diary",["Info 1","Mission is failed pending any player's death."]]; MAG_tskObj1=player createSimpleTask ["Extraction"]; MAG_tskObj1 setSimpleTaskDescription ["Move to the extraction point","Extraction","Extraction"]; MAG_tskObj1 setSimpleTaskDestination (getMarkerPos "extraction"); MAG_tskObj0=player createSimpleTask ["Destroy Tunguskas"]; MAG_tskObj0 setSimpleTaskDescription ["Destroy the three Tunguskas that arrived on a recient shipment to Bereznio","Destroy Tunguskas","Destroy Tunguskas"]; }; case EAST: { }; case RESISTANCE: { }; case CIVILIAN: { }; }; Also as far as I know you can't use the old html coding within a .sqf ie: <marker name='extraction'>extraction</marker> I am not sure on this but I think you should probably remove the "setCurrentTask" line out of the briefing and add it to your init.sqf. I assume it may cause problems where it is -
Randomly Spawning Group In Three Different Positions
=Odin= replied to HateDread's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Try it this way SpawnNum = random 3; If (SpawnNum == 1) then { East = 1; West = 0; North = 0; }; If (SpawnNum == 2) then { East = 0; West = 1; North = 0; }; If (SpawnNum == 3) then { East = 1; West = 0; North = 0; }; globalVariable "SpawnNum"; globalVariable "East"; globalVariable "West"; globalVariable "North"; player sidechat "Check"; -
Force Animation to end
=Odin= replied to Nephris1's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Maybe try this switchmove ""; think that is how I have done that in the past, long time ago now but :) -
How to create a trigger wich can ONLY be activated by one unit?
=Odin= replied to SGJackson's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
In the condition field put this this &&(player in thislist) That should work -
I just wanted to say "Thanks"
=Odin= replied to keimosabe's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
yep aggreed 100%, all my Knowledge of scripting has come from here, the Wiki and of course all the affiliated Community forums and sites. thank-you indeed -
crB Zone Alarm Demo - v0.1 This mission is to demonstrate the use of the Zone Alarm script, upon activation an alarm will sound with a hint message as well as a marker that will blink on and off. this script can be used by multiple triggers and markers, refer to the Parameter guide. Use the radio for teleport and camera functions. Usage; Description.ext is required for the crB_Zone_Alarm script! Create a trigger that encompasses the area you need for the Alarm to cover, the demo missions area is a 30x30 rectangle. AxisA ==> 30 (Change the size to the area you need for the Alarm to cover) AxisB ==> 30 (Change the side to the area you need for the Alarm to cover) Shape ==> Rectangle (Change the shape to suit your mission, I find Rectangle is the best for this set up) activation ==> Opfor-Repeatedly (Change the side to suit your mission but leave it set at Repeatedly) type ==> none name ==> Condition ==> this On Act. ==> Opfgo = true;call {["zone", 30, 30, "Rectangle", "ColorRed"] execVM "crB_scripts\crB_Zone_Alarm.sqf";}; <<REFER TO THE PARAMETER GUIDE IF YOU NEED TO CHANGE THE SIZE< SHAPE<OR COLOR OF THE ALARM MARKER>> On Dea ==> Opfgo = False; Parameter Guide: - the name of the marker that will act as the Flashing marker - eg a Marker called zone - the x axis size for the marker - eg 30 - the Y axis size for the marker - eg 30 - the shape of the marker - eg "Rectangle"- NOTE: "Rectangle" or "ellipse" are the only shapes you can use - the color of the marker - eg "ColorRed" - refer to http://community.bistudio.com/wiki/setMarkerColor for a compete list of colors You will also need to add an empty marker called zone and place it on top of the centre of the trigger COMPONENT CHECKLIST: One Trigger one marker called zone Initial release v0.1 Created by: (AEF)Odin [2CAV] Developer notes ==> Also included is one extra alarm sound in the sounds folder. If you add your own sound, try and make sure any custom sounds are of the same time length as the ones provided. DOWNLOAD HERE - http://creobellum.org/sites/creobellum.org/files/crB_Zone_Alarm.zip Visit us at http://creoBellum.org
-
Zone Alarm Demo mission
=Odin= replied to =Odin='s topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanx Splicer. As far as I know the Gametype = blah; only affects MP games so no change will be needed for a single player mission. if you are still unsure visit this page, http://community.bistudio.com/wiki/Description.ext#Multiplayer -
Zone Alarm Demo mission
=Odin= replied to =Odin='s topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Sure can :) -
How to make a person go to a precise location
=Odin= replied to RazorX's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Well he could either just DeleteVehicle unitname; or unitname setPos (getPos SomeobjectFarAway); Both ways work in that fashion just deleteVehicle means he is gone forever Sorry just saw you don't want them teleported. -
How to make a person go to a precise location
=Odin= replied to RazorX's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
What about just "move" him where you want? in conjunction with buildingPos this move (building buildingPos 1) -
How to make CDF faction hostile
=Odin= replied to McArcher's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
The method I suggested is not a script. It is done in the editor, Probabilaty of presence is a slider box located at the bottom of each unit properties box. The group function is acessed by using the f2 key, and drag a line between the CDF units to the east officer. -
Spawn AI script?
=Odin= replied to thedudesam's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
G'day visit us at http://creobellum.org/forum/7 we have premade random group, random enemy camps, reinforcments, Airsupport, homicide bomber and many more scripts. Each script comes with a Demo mission and a guide on how to impliment them into your missions. Also we are looking for people with mission making ideas and skills to help out around the place -
How to make CDF faction hostile
=Odin= replied to McArcher's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Well seeing as the CDF faction's side is West, an old method was to group[F2]your CDF squad leader, with say an East's officer, so that the entire squad groups to the East officer. Set the East officers probability of presence to 0, now when you start the mission the East officer won't appear but the CDF squad will still be thinking they are from the east. -
Adding crew to vehicles
=Odin= replied to McArcher's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
G'day you could use these scripts instead or have a look http://forums.bistudio.com/showthread.php?t=92851&highlight=wolffy.au This is version 0.5 and do'es what you ask whith the crB-spawnCrew.sqf Version 0.6 is nearly ready for release and will support all sides and factions. -
Detecting the roads via code
=Odin= replied to madrussian's topic in ARMA - MISSION EDITING & SCRIPTING
G'day, I have tried to do this for trees (no luck), but in my searches I found this topic which may help you -
Or add this EH to the vehicle init this addEventHandler ["fired", "hint format['%1',_this select 1]"] _this select 1 will return the launcher/weapon of vehicle _this select 4 will return the ball/shell type
-
G'day, Not sure if this will help you but it is basicaly what you asked for. I addapted my old teammate SurdistPriest's nearExplosion.sqf, which gave a few effects and played a sound. I have added/removed a bit from his original work to do the same thing your after, its a function file so is called by the init.sqf and dosent need a damaged,hit or fired EH. But for some reason once the player is dead it wont start again on Respawn, so I had to add a Killed EH on the player to recall the function. So if any one can fix this problem it could be Better. Any way add this to your init <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player addEventHandler ["killed", {handle = [(_this select 0)] execVM "readdfunction.sqf"}]; if (alive player and (canStand player)) then { [20] call compile (preprocessFileLineNumbers "hit.sqf") }; The [20] part is the distance the projectile is from player, for the script to run. hit.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_d = _this select 0; Hit_list = //this function detects explosions near the player of certain ammo  //and starts the effect script { private["_shell"]; _shell = _this select 0; //_shell is a string containing the ammo name _projectile = nearestObject [player, _shell]; while {(_projectile distance player) < _d} do { sleep 0.01; //_projectile = nearestObject [player, _shell]; if (isnull _projectile) then { if (alive player) then { sleep 0.1;   player sideChat format["Wounded by a, %1",_shell];   player say "wheeze";  }; if (not(alive player)) then { sleep 0.1;   player sideChat format["Killed by a, %1",_shell];  }; }; //if }; //while }; //function Hit_list while {alive player} do { sleep 0.01; //call the function ones for each type of ammo ["RocketCore"] call Hit_list; ["MissileCore"] call Hit_list; ["ShellCore"] call Hit_list; ["MineCore"] call Hit_list; ["TimeBombCore"] call Hit_list; ["G_40mm_HE"] call Hit_list; ["G_30mm_HE"] call Hit_list; ["G_40mm_HE_6G30"] call Hit_list; ["GrenadeHandTimed"] call Hit_list; ["GrenadeHand"] call Hit_list; ["B_556x45_Ball"] call Hit_list; ["B_556x45_SD "] call Hit_list; ["B_9x19_Ball"] call Hit_list; ["B_9x19_SD"] call Hit_list; ["B_762x51_Ball"] call Hit_list; ["B_127x99_Ball_noTracer"] call Hit_list; ["B_545x39_Ball"] call Hit_list; ["B_545x39_SD"] call Hit_list; ["B_762x54_Ball"] call Hit_list; ["B_762x54_noTracer"] call Hit_list; ["B_127x108_Ball"] call Hit_list; ["B_9x18_Ball"] call Hit_list; ["B_9x18_SD"] call Hit_list; ["B_127x107_Ball"] call Hit_list; ["B_127x99_Ball"] call Hit_list; ["FuelExplosion"] call Hit_list; }; //while alive player exit; I still have a few bullet types to add ie;- twin vikers and a few vehicle mounted MG. you need this to restart the function. readdfunction.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">waitUntil {alive player}; if (alive player and (canStand player)) then { [20] call compile (preprocessFileLineNumbers "hit.sqf"); }; Now you just need to create a folder called sounds and create a .ogg soundfile and save as wheeze.ogg and add it to your new folder, then define the sound and source in your description file Description.ext <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgSounds { // List of sounds (.ogg files without the .ogg extension) sounds[] = {wheeze}; // Definition for each sound class wheeze { name = "wheeze"; sound[] = {"\sounds\wheeze.ogg", db-5, 1.0}; titles[] = {}; }; }; Hope this helps. Odin
-
Or this it works <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_exp = "SH_125_HE" createvehicle getpos (kr1),"SH_125_HE" createvehicle getpos(kr2),"SH_125_HE" createvehicle getpos(kr23); _exp setdamage 1; Odin
-
Flare TrapTrip wire effect
=Odin= replied to Knight Trane's topic in ARMA - MISSION EDITING & SCRIPTING
G'day, give this a go , its a crudley fasioned .sqs loop that works flare.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_cnt = 0; flare1 = "F_40mm_Red" createVehicle [getPos tresflare1 select 0, getPos tresflare1 select 1, 35]; ~3.5 #loop ; _cnt == "amount of times loop is run befor it ends" ?(_cnt == 400) : goto "end"; flare1 setPosASL [ (getPosASL tresflare1 select 0) + 0.199, (getPosASL tresflare1 select 1) - 0.199, (getPosASL tresflare1 select 2) + 2]; ~0.001 _cnt = _cnt + 1; goto "loop" ~1 #end exit the (_cnt == 400) part lasts around 20 secs GL Odin -
G'day Try this post by ManDay it has a HALO script ready to download AAHALO it may be the same as you allready have? There are a few other scripts out there aswell "Fallschirm.sqs" by Mr-Murray being one.