Jump to content

kylania

Member
  • Content Count

    9181
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by kylania

  1. http://community.bistudio.com/wiki/Description.ext It's not always absolutely required.
  2. As Pete said, your picture would have to be 256x256 to show up.
  3. kylania

    Helicopter Mission

    If it's a player piloting, just put the helo on the map and make give the player markers of where to go? I'm a little unclear about what you're after here I guess?
  4. Yeah, I too thought this was about not being able to steer properly on orbit. :)
  5. kylania

    Fix no tasks on respawn

    It works perfectly fine. The reason your TeamSwitch respawn doesn't work is because you're initilizing the tasks via the init.sqf which is run by every player connecting to the game. You already connected as a different unit, the AI you're jumping into didn't, so therefore never had it's briefings added. You can probably get around this issue by keeping track of what unit the player is and seeing if when they are alive again if they are in a different unit. If so, rerun briefing. But how you can view taking over someone's consciousness that was previously standing next to you as more "realistic" than rejoining the fight from base is beyond me. :) Reinforcements strikes me as more realistic than mind transfer. heh
  6. It's under EMPTY -> Objects -> H (Invisible) You place it like a unit or something
  7. To make it land either give it the helo land "LAND" command, or place a helipad (even invisible) for it to land on.
  8. That can still hurt them. :) I've seen entire squads die trying to get out of a hovering at safe altitude choppers.
  9. Usually it's a Team Leader telling the injured soldier to "Heal at MH60". They aren't repairing the chopper, just healing themselves at it. Are your soldiers getting damaged somehow?
  10. might try a sleep 1; before the weapons loadout. Could you post your mission or script for us to troubleshoot it perhaps?
  11. kylania

    Who shot him?

    Might be some locality thing maybe, was this on a server or local on your PC?
  12. kylania

    Location help

    thislist is simply a list of objects that satisfy the trigger. (player in thislist) means "Did the player set off this trigger?"
  13. I think one of the problems might be this line: _waypointStatements = format["nul = [""%1"", ""%2"", %3, %4, %5, %6] execVM ""HR_spawnGroup.sqf""",_missionName,_waypointPatro l,_fleet,_groupSpawnMethod,_groupCount,_waypointLZ]; I added in the trailing _waypointLZ late in development, and think I forgot to put "" "" around the %6, that might help, but not sure, i'll test tonight. Open the mission in the editor, to the right of the player is a trigger, in it's onAct is where you change the settings.
  14. No, you don't have to change the actual script at all. If you want to change how it works you just change the options when calling it from a trigger. All the green stuff at the top explains the options. The actual code to call the helos goes in your trigger. So change the trigger that's on the map for clearing the airfield to have ["HR1","HR2","HR3"] and it should work.
  15. It's possible the 3rd crashed. :) I had that happen a few times.
  16. Demo Mission Here's the code, some of this isn't perfect and the helos still act pretty stupid (first one seems to land at the Patrol Point rather than LZ??) but it should do all you'd requested. :) init.sqf remains the same. If anyone has some ideas for improving this, I'd appreciate the advice. :) HR.sqf: [color="SeaGreen"]////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: 1ID-CPL. Venori ////////////////////////////////////////////////////////////////// // Preplace 2 markers. // "HR_SPAWN" where you want the helos to start from and "reload" at. // "HR_LZ" where you want the helos to land. // (Optional) "HR_PP" where you want the ground troops to attack/patrol. /* Required Arguments: ["missionname",["HR_SPAWN","HR_LZ","HR_PP"],2,["HR1","HR2","HR3"],8,false,"MH60S",west] missionname (Datatype = string) This is the name of the mission. It will be used as a public variable to keep track of how many reinforecment waves are left. ["Spawn Marker Name","LZ Marker Name","Optional Patrol Point Name"] (Datatype = array of strings) The first element is the name of the spawn point marker. The second element is the name of the LZ point marker. The third element is optional and is the name of the patrol/attack point marker. 2 (Datatype = number) This argument is the number of waves to call, how many times the helicopters will bring in troops. ["HR1","HR2"] (Datatype = array of strings) The next argument is an array of strings, each will become the name of a vehicle used by the script. No limit, but anything more than 2-3 can result in midair collisons. :) Optional Arguments: 8 (Datatype = number) (Optional) Default is 0. This element controls the type of groups spawned. If set to 0 two random pre-built fireteams will be spawned (6-8 men per helo) if set to a number greater than 0 that many soldiers will be spawned as one group. false (datatype = boolean) (Optional) Default is true. If set to false the spawned infantry groups will patrol the LZ or optionally declared Patrol Point. If set to true they'll Search and Destroy at the location. "MH60S" (Datatype = string) (Optional) Default is "MH60S". This element is the class name of the vehicle spawned for this script. west (Datatype = side) (Optional) (Untested) Default is west. This element determines the side of the vehicle being spawned, and therefore the units as well. Examples: Default: nul = ["firstwave",["HR_SPAWN","HR_LZ"],5,["HR1","HR2"]] execVM "HR.sqf"; -- mission called "firstwave", 5 waves of 2 fireteams Search and Destroy at the LZ from 2 helos. Full options: nul = ["firstwave",["HR_SPAWN","HR_LZ","HR_PP"],2,["HR1","HR2","HR3"],10,false,"MV22"] execVM "HR.sqf"; -- mission called "firstwave", 2 waves of 10 units in each of 3 Ospreys which will Search and Destroy at marker HR_PP. */ // Required arguments[/color] _missionName = _this select 0; [color="SeaGreen"]// string, name for mission[/color] _waypoints = _this select 1; [color="SeaGreen"]// array, list of spawn, lz and attack waypoints.[/color] _waypointSpawn = _waypoints select 0; [color="SeaGreen"]// string, marker name, spawn point and reload point for helos[/color] _waypointLZ = _waypoints select 1; [color="SeaGreen"]// string, marker name, insertion point for helos[/color] _waypointPatrol = if (count _waypoints > 2) then {_waypoints select 2} else {_waypointLZ}; [color="SeaGreen"]// string, optional marker name, attack point for ground units, defaults to LZ[/color] _waveCount = _this select 2; [color="SeaGreen"]// number, how many waves to drop off.[/color] _vehicles = _this select 3; [color="SeaGreen"]// array, strings, object names for the helos.[/color] _numVehicles = count (_this select 3); [color="SeaGreen"]// number, simple count of how many names were entered. // Optional arguments[/color] _groupCount = if (count _this > 4) then {_this select 4} else {0};[color="SeaGreen"] // number, how many units per chopper, overrides fireteam assignment.[/color] _groupSpawnMethod = if (count _this > 5) then {_this select 5} else {true}; [color="SeaGreen"]// boolean, true = attack point, false = patrol point[/color] _typeVehicles = if (count _this > 6) then {_this select 6} else {"MH60S"}; [color="SeaGreen"]// string, vehicle class, default "MH60S"[/color] _vehicleSide = if (count _this > 7) then {_this select 7} else {west}; [color="SeaGreen"]// side, side of the groups created, default west.[/color] [color="SeaGreen"]// Only spawn once, on the server.[/color] if(!isServer) exitWith{}; [color="SeaGreen"]// Create the group. [/color] _grp = creategroup _vehicleSide; _fleet = []; [color="SeaGreen"]// For each vehicle name given, create a vehicle and assign it it's wave count.[/color] for "_x" from 1 to _numVehicles do { _veh = ([getMarkerPos _waypointSpawn, 45, _typeVehicles, _grp] call BIS_fnc_spawnVehicle) select 0; _unitName = _vehicles select (_x - 1); _veh setVehicleVarName _unitName; call compile format ["%1 = _veh; publicVariable '%1';", _unitName]; //_veh setVariable[_missionName, 5, true]; sleep 5; _fleet set [(_x - 1),_veh]; }; [color="SeaGreen"]// Make the group fly groupy.[/color] _grp setFormation "COLUMN"; _grp setBehaviour "CARELESS"; [color="SeaGreen"]// Set the wave count[/color] call compile format ["%1 = %2; publicVariable '%1';", _missionName, _waveCount,_waypointLZ]; [color="SeaGreen"]// Spawn the first wave.[/color] [_missionName,_waypointPatrol,_fleet,_groupSpawnMethod,_groupCount] execVM "HR_spawnGroup.sqf"; [color="SeaGreen"]// Set the waypoints for the helo group. Their origin point is waypoint 0.[/color] _wp = _grp addWaypoint [getMarkerpos _waypointLZ, 1]; [color="SeaGreen"]// waypoint at the LZ marker.[/color] _wp1 = _grp addWaypoint [getMarkerPos _waypointSpawn, 1]; [color="SeaGreen"]// waypoint back at the spawn marker.[/color] _wp2 = _grp addWaypoint [getMarkerPos _waypointSpawn, 1]; [color="SeaGreen"] // Cycle waypoint at spawn marker too.[/color] [_grp, 1] setWaypointType "TR UNLOAD"; [color="SeaGreen"]// Set the 1 (second actual waypoint, hence 1 instead of 0) to TRANSPORT UNLOAD.[/color] [_grp, 2] setWaypointType "MOVE"; [color="SeaGreen"]// set the 2 waypoint to MOVE with the following call to spawn another group:[/color] _waypointStatements = format["nul = [""%1"", ""%2"", %3, %4, %5, %6] execVM ""HR_spawnGroup.sqf""",_missionName,_waypointPatrol,_fleet,_groupSpawnMethod,_groupCount,_waypointLZ]; [_grp, 2] setWaypointStatements ["true", _waypointStatements]; [_grp, 3] setWaypointType "CYCLE"; [color="SeaGreen"]// set the 3 waypoint to CYCLE[/color] [color="SeaGreen"]// For some reason the first helo ends up heading to the HR_PP instead of the LZ... I have no idea why. :([/color] HR_spawngroup.sqf: [color="SeaGreen"]////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: 1ID-CPL. Venori ////////////////////////////////////////////////////////////////// // Called via waypoint with: // /* nul = [_missionName,_waypointPatrol,_vehicles,_groupSpawnMethod,_groupCount,_waypointLZ] execVM "HR_spawnGroup.sqf"; */ // Grab the input arguments[/color] _missionName = _this select 0; [color="SeaGreen"]// string, set as a public variable in HR.sqf, used to count waves[/color] _currentCount = call compile format ["%1", _missionName]; [color="SeaGreen"]// number, Pull the value from it.[/color] _waypointPatrol = _this select 1; [color="SeaGreen"]// string, marker name, waypoint to attack or patrol.[/color] _vehicles = _this select 2; [color="SeaGreen"]// array, vehicle objects of vehicles assigned to 'missionname'[/color] _groupSpawnMethod = _this select 3; [color="SeaGreen"]// boolean, attack (default/true) or patrol (false)[/color] _groupCount = _this select 4; [color="SeaGreen"]// false or number, decided if you spawn fireteams or # of units.[/color] _waypointLZ = _this select 5; [color="SeaGreen"]// string, marker name, waypoint to attack or patrol.[/color] [color="SeaGreen"]// Hard coded options.[/color] _max_dist_between_waypoints = 100; [color="SeaGreen"]// Distance between waypoints for the infantry's patrol waypoints.[/color] _grouptypes = ["USMC_FireTeam","USMC_FireTeam_MG","USMC_FireTeam_AT","USMC_FireTeam_Support","USMC_HeavyATTeam"]; [color="SeaGreen"]// Random types of groups to spawn. // Only do this if we're the server...[/color] if(!isServer) exitWith{}; [color="SeaGreen"]// As long as we haven't done all the waves, lets make new ones![/color] if (_currentCount > 0) then { { [color="SeaGreen"]// Since the helo names were passed as strings, convert them into objects.[/color] _helo = call compile format ["%1", _x]; _count = call compile format ["%1", _groupCount]; [color="SeaGreen"]// If the first bird is alive...[/color] if (alive _helo) then { [color="SeaGreen"]//hint format["Helo %1 is alive! count is %2",_helo,_count]; // If the group count is a number greater than 0, spawn that many units in a group.[/color] if (_count > 0) then { _grp1 = [[0,0,0], side _helo, _count] call BIS_fnc_spawnGroup; {_x assignAsCargo _helo;_x moveInCargo _helo} forEach units _grp1; [color="SeaGreen"]// This was an attempt to stop the lead chopper from flying to PP, didn't work. :([/color] _wp = _grp1 addWaypoint [getMarkerpos _waypointLZ, 1]; [_grp1, 1] setWaypointType "GETOUT"; [color="SeaGreen"]// If SAD option, make them SAD otherwise patrol.[/color] if (_groupSpawnMethod) then { _wp = _grp1 addWaypoint [getMarkerpos _waypointPatrol, 1]; [color="SeaGreen"]// waypoint at the LZ marker.[/color] [_grp1, 2] setWaypointType "SAD"; [color="SeaGreen"]// Search and Destroy.[/color] } else { [color="SeaGreen"]// Set group 1 and 2 up to patrol at the LZ.[/color] [_grp1, (getMarkerpos _waypointPatrol), _max_dist_between_waypoints] call BIS_fnc_taskPatrol; }; [color="SeaGreen"]// We didn't want x num of men, so spawn two fireteams.[/color] } else { [color="SeaGreen"]// Get a random group type and spawn it. Do this twice.[/color] _grouptype = floor (random count _grouptypes); _grp1 = [[0,0,0], side _helo, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Infantry" >> _grouptypes select _grouptype)] call BIS_fnc_spawnGroup; _grouptype = floor (random count _grouptypes); _grp2 = [[0,0,0], side _helo, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Infantry" >> _grouptypes select _grouptype)] call BIS_fnc_spawnGroup; [color="SeaGreen"]// Assign them and move them to cargo so the helos know they have cargo.[/color] {_x assignAsCargo _helo;_x moveInCargo _helo} forEach units _grp1; {_x assignAsCargo _helo;_x moveInCargo _helo} forEach units _grp2; _wp = _grp1 addWaypoint [getMarkerpos _waypointLZ, 1]; [_grp1, 1] setWaypointType "GETOUT"; _wp2 = _grp2 addWaypoint [getMarkerpos _waypointLZ, 1]; [_grp1, 1] setWaypointType "GETOUT"; if (_groupSpawnMethod) then { _wp3 = _grp1 addWaypoint [getMarkerpos _waypointPatrol, 1]; [color="SeaGreen"]// waypoint at the LZ marker.[/color] [_grp1, 2] setWaypointType "SAD"; [color="SeaGreen"]// Search and Destroy.[/color] _wp4 = _grp2 addWaypoint [getMarkerpos _waypointPatrol, 1]; // waypoint at the LZ marker. [_grp2, 2] setWaypointType "SAD"; [color="SeaGreen"]// Search and Destroy. [/color] } else { [color="SeaGreen"]// Set group 1 and 2 up to patrol at the LZ.[/color] [_grp1, (getMarkerpos _waypointPatrol), _max_dist_between_waypoints] call BIS_fnc_taskPatrol; [_grp2, (getMarkerpos _waypointPatrol), _max_dist_between_waypoints] call BIS_fnc_taskPatrol; }; }; }; } foreach _vehicles; [color="SeaGreen"]// Alert the player that reinforcements are coming. // _msg = format["Wave %1 spawned",_currentCount]; // _nic = [nil,nil,rHINT,_msg] call RE; // Reduce the wave count by saving the count number back into the mission name variable[/color] _currentCount = _currentCount - 1; call compile format ["%1 = %2; publicVariable '%1';", _missionName, _currentCount]; } else { [color="SeaGreen"]// Once we've done all the waves, delete the flight group.[/color] _nic = [nil,nil,rHINT,"Reinforcements no longer available!"] call RE; {{deleteVehicle _x} forEach crew _x;} foreach _vehicles; {deleteVehicle _x} foreach _vehicles; };
  17. I've modified the scripts so that they do, or can do, most everything you want now. The scripts are all dynamic, so you can use two of them at a time for two different locations if you want. There's a flag for patrol vs Search and Destroy. There's a flag for either 2 random fireteams or X number of units. There's a flag for what type of helo you wanted to use, or side even, so the Chinook or Russians should work (untested...) Desert soldiers didn't work since that unit pack doesn't include cfgGroups. Here's a taste, I'll post the whole thing tomorrow, it's 3am I need to pass out. :) Default: nul = ["firstwave",["HR_SPAWN","HR_LZ"],5,["HR1","HR2"]] execVM "HR.sqf"; -- mission called "firstwave", 5 waves of 2 fireteams patrolling the LZ from 2 helos. Full options: nul = ["firstwave",["HR_SPAWN","HR_LZ","HR_PP"],2,["HR1","HR2","HR3"],10,false,"MH60S",west] execVM "HR.sqf"; -- mission called "firstwave", 2 waves of 10 units in each of 3 helos which will Search and Destroy at marker HR_PP.
  18. kylania

    Scripting question

    4 hours ago: http://forums.bistudio.com/showpost.php?p=1425566&postcount=13 :p
  19. In your server's default.arma2profile under whatever difficulty level you want to disable it under set NetStats to 0. NetStats=0;
  20. Since you made them in Notepad, make sure they aren't stuck with a text extension. When you look at the file in Windows, is the the Notepad Icon next to the file or a "blank file" one? As shown here: If you're seeing the bottom version of that, "init.sqf" with the Notepad file icon, you need to turn off "Hide Known File Extensions" and delete the .txt suffix. You can see how to do that from this page.
  21. If you don't know what an init.sqf is you should start with a more low level tutorial and leave briefings for later to be honest. :) init.sqf is a file you create on your own, in the same folder as the mission.sqm file the editor created. Inside that file simply put this line of text: [] execVM "briefing.sqf"; As long as your briefing.sqf is in the same folder as the other two files, and properly created, you'll see the Tasks/Notes on the briefing screen. It's probably safer to take mike's briefing template from the thread I linked and use that.
  22. http://forums.bistudio.com/showthread.php?t=73424
  23. kylania

    Vehicle Rearming Script

    So, kinda like the already-in-game Vehicle Repair Point? :)
  24. Ahh feature creep... All the things you want are possible, but would require extensive restructuring of the code as presented (which was exactly what the original design was right? :) Hence "feature creep", the addition of features to a program after the original design requirements are set, often constant and late coming). To make these changes though it's not as easy as just changing a few variables. Like for the "full speed attack" thing, we'd have to add in another marker or something to mark where they'll attack to as well as having to manually create a waypoint or series of them instead of the elegant 1 line of code to make them patrol. It's almost starting to get to the point where if you want multiple groups of infantry to appear and attack multiple targets this whole thing of flying them in waves is more complicated than it needs to be. Just spawn the soldiers near their objectives and let them go, sure it's neat to have helicopters fly them in, but will the player actually see this happening, each and every time? If not, this becomes a lot of overheard for nothing. You'd have to replace the TaskPatrol functions with SAD waypoints probably. Currently each bird gets two pre-formed 3-4 man fire teams, chosen randomly from the list of BIS groups at the top of HR_spawnGroup.sqf. You could easily change that to x number of units, or even specify the very units you wanted, but the design request said "BIS Function would be ideal specially that it can delete units I believe and I would use pre made infantry squads". :) You could even dump that whole section and create the units in a different way. Assuming they had a mod running, sure. Any of these changes though ups the complexity of the script and how to call it. Instead of just needing 2 markers you'll need 3 markers, per helo group, instead of no arguments you'll need class of helo, if addons aren't available you'll need it to default to normal classes, type of group structure to be used, the type of spawn system to be used, the number of units or classes of units to be used, whether or not to use patrol or waypoints, if patrol is do you patrol near the LZ or a specific location, if specific is it per group or everyone, how far away to you want waypoints, if waypoint option is used then you need the destination marker listed... and so on. Basically all the options you want are in the code already in one form or another. Instead of the whole >> groups >> thing, replace it with a number and that's how many random units you'll get. If you wanted custom units, use units that have group configs preset. Instead of the MH60S, just replace that with whatever classname for your custom vehicle. Adapt the helo's waypoint code to work for your spawned groups. Ideally it would be one system that could be called many ways via arguments, but it'll take time to develop and have it work correctly. :) A bunch of hard coded versions of the above would work too, but that's just messy but doable.
×