Jump to content

Luft08

Member
  • Content Count

    204
  • Joined

  • Last visited

  • Medals

Everything posted by Luft08

  1. Luft08

    Task not completing

    It Worked. I changed my bridge array to remove all of the object IDs and railroad bridges that are indestructable. No sense it keeping them. eastGermanBridges = [ [10577.8,17680.2],[10889.8,17545.4],[12102.7,17199.6],[13399.5,15948],[14312.1,15123], [13630.1,12722.1],[14927.9,15361.6],[14943.2,15220.9],[15658.5,14663.3],[15663.2,14166.2], [16256.9,12515.4],[17365.1,11464.7],[18684.4,11083.3],[14927.8,15360.4],[16192.9,15358], [18230.3,15977.5],[19959.8,4850.35],[18082.2,5211.08],[16399.4,6661.06],[16143.3,6951.2], [15553.2,8796.89],[14255.2,11924.2],[13137.8,8403.86],[12917.6,8265.83],[12582.7,7924.79], [13666.6,4606.77],[13870.7,4370.2],[15269.4,2432.02],[16340.1,178.734] ]; Then I use the following code to set the bridge variable: if(!isServer) exitWith {}; private _bridgePos = selectRandom eastGermanBridges; // Get a list of road segments within 10 meters of the position in the bridge array. private _roadSegArray = _bridgePos nearRoads 10; // Iterate though the list looking for a road type of bridge. { // forEach _roadSegArray private _roadInfo = getRoadInfo _x; if(_roadInfo select 8) then { bridge = _x; }; } forEach _roadSegArray;
  2. Luft08

    Task not completing

    Thanks pierremgi, I just woke up out of a sound sleep when what I believe to be the answer popped into my head. Much like what you suggest! I think what is happening is the nearest object at my positions are things UNDER the bridge. Maybe what I should do it get a list of road segments within a radius of my position and iterate through them looking for a road type of bridge. Hopefully the road segment IS the bridge and can be destroyed. I want to thank you and everyone in the Arma community that makes working on these projects so enjoyable. It would take so much longer without your support. Thanks!
  3. Luft08

    Task not completing

    oops... I just read that object IDs are unreliable and could change at each map update. Well, this should simplify my bridge array but now I'm really stuck. Can't I set a variable to the value returned by nearestObject? Does nearestObject return a copy or a reference?
  4. Luft08

    Task not completing

    Thanks, I though about that but I just made another test. I went to the bridge to get a snapshot of it blowing up. I set the damage to 1 and the task completed but the actual bridge was untouched! I'm thinking I need to do something with the bridge IDs. I collected this data a long time ago but forgot what I was going to do with the ID.
  5. I used BIS_fnc_taskDefend to get a group to defend a location but after a period of time I want the group to move to a new location and defend that position. I tried issuing another BIS_fnc_taskDefend but they ignore it. I also tried to set a waypoint but again they ignore it. How do I cancel the BIS_fnc_taskDefend so that I can issue new commands? Thanks.
  6. Thanks pierremgi. Wow that script does a lot. I will write my own using the guard waypoint and createGuardedPoint as you suggest. Thanks again for your info and advice.
  7. I was testing one of my coop missions on a dedicated server with a few friends. I died quickly so I was watching the other's play. One player was repeatedly hit by gun fire but just kept going. It happened so many times that I though maybe I had disabled damage for the unit. He did finally die and later checks showed that damage was enabled. So I looked through the difficulty settings and found a "reduced damage" setting. That appears to be what was happening but only to him. My question is: If a player sets reduced damage on HIS Arma does the dedicated server change it back or does he play with an unfair advantage? If so how do I enforce my server's difficulty settings on player's PCs? Thanks.
  8. In one of my missions I place a supply crate on the map: weaponsCache = "O_supplyCrate_F" createVehicle _cachePos; I wish to empty the default contents and stuff it full of explosive satchels so that the player could remove them and use but haven't any luck doing so.
  9. The new vehicles are very exciting! I want to make a coop mission where the players need to take out a 2P16 short-range ballistic missile launcher before it fires its missile but I don't know what code will make it fire. I wish to give it a position to hit and have it raise the missile and fire if the players fail. I think watching a missile lifting off at twilight would be awesome!
  10. Does anyone know how to script the AI to aim and fire the new Russian 2P16 ballistic missile launcher in the Global Mobilization DLC?
  11. I have a coop mission that runs on a dedicated server and noticed that if I crash a helicopter some distance from the spawn point so that I get put back into the lobby, when I start a new mission I hear the explosion from the crash that occurred on the last mission. Is there a way to flush the dedicated server between mission runs? Thanks.
  12. I'm trying to learn how to create a coop mission. Currently my efforts result in missions that have anomalous behavior. I believe this is due to the fact that I am not initializing the server completely before the clients get initialized. I'm studying the code from people who really know how to do things right but because of the nature of Arma it is difficult figuring out what is happening and in what order even with the help of the initialization order web page. I was wondering if there is an easy way to trace the flow of a mission and log it to a file without inserting statements into every function and method? Thanks.
  13. Nope. Actually I am a retired computer programmer with lots of time on his hands. I understand how difficult coding can be on various platforms. They all have their idiosyncrasies and SQF is no exception. It will just take time and a lot of work to come up to speed. I've been dinking around with Arma and SQF for a while but only now getting serious about making quality missions. If I stick with it maybe I can produce something worth playing in about a year.
  14. Thanks strider42. I have downloaded your mission and will study it. When I have a feel for what you did I may take you up on your offer for a walk through. I appreciate any help I can get.
  15. I am trying to figure out a way to trace the execution of functions and methods in a coop mission so that I can learn the right way to code them. I posted earlier about this and came away with the impression that this would not be an easy task but further digging came up with debug modes under the Advanced Knowledge section. Wouldn't setting the debug mode to 1 or above do what I want or am I misunderstanding something?
  16. I looked this command up in the wiki and it gave two examples. I don't understand the second example: _inGame = getClientStateNumber > 8; I thought it simply returns a value. I understand _ingame = getClientStateNumber but what does the "> 8" do?
  17. Sorry but maybe I'm just slow. I still don't understand. So if it determines that the value is less than 8 what does it return? i.e. does it wait until the return value WILL BE greater than 8 before returning?
  18. That was a head scratcher for me also but I finally came to that conclusion. I wish that there was a definitive book outlining all of the intricacies of mission programming for Arma but thank god there are so many people willing to share their knowledge or I would be sunk.
  19. In the mission I'm working on I spawn a zippo and AI unit for each player. When I run the mission on my PC it's all good but when tested on a dedicated server the AI that I group to each player turns out as a floating disembodied head with floating arms. BTW I spawn many units but only the ones I group to the players come out without legs and torso. One more thing and I don't know if it's important but the head and arms are bare. (No helmet and no shirt/armor) I'm at a loss and am almost ready to give up on multiplayer missions. It's always something... Always... Any Ideas what could cause this. I really have no clue where to even start looking. Here is the code that spawns the opening scene: if(!isServer) exitWith {}; private _playerCount = count activePlayers; for "_c" from 1 to _playerCount do { private _pos = []; private _dir = 0; private _unitPos = []; switch (_c) do { case 1: { _pos = [9090.05,7411.64,0]; _dir = 268.824; _unitPos = [9091.51,7409.89,0]; // direction for all units is: 181.759 }; case 2: { _pos = [9102.89,7409.81,0]; _dir = 279.820; _unitPos = [9103.71,7408.25,0]; }; case 3: { _pos = [9110.54,7407.27,0]; _dir = 279.820; _unitPos = [9111.25,7405.63,0]; }; case 4: { _pos = [9118.3,7405.51,0]; _dir = 279.820; _unitPos = [9118.9,7403.93,0]; }; }; private _zippo = "uns_M132" createVehicle _pos; _zippo setDir _dir; _zippo addMagazineCargoGlobal ["APERSBoundingMine_Range_Mag",30]; zippoArray pushBack _zippo; private _group = createGroup[west,true]; private _unit = _group createUnit["uns_US_2MI_DRV", _unitPos, [], 0, "FORM"]; private _index = _c - 1; private _player = activePlayers select _index; [_unit] joinSilent _player; }; private _handle = [] execVM "scripts\common\getBldgList.sqf"; waitUntil{scriptDone _handle}; [] execVM "scripts\setupRiverAmbushes.sqf"; private _mortarCount = (floor random 6) + 3; _handle = [_mortarCount] execVM "scripts\spawnEnemyMortar.sqf"; waitUntil{scriptDone _handle}; [] execVM "scripts\spawn25thInf.sqf";
  20. I used createVehicle to place a uns_tripwire_punj2 (Unsung Mod). It created the trap but when I walked over it, it did not trigger. Do I need to place and then somehow arm traps? Thanks
  21. Thanks, I'll give it a shot. UPDATE: It worked! Thanks. (So much to learn...)
  22. activePlayers is a global variable. I should have mentioned that. activePlayers = [] call BIS_fnc_listPlayers;
  23. On my next mission I wish to have the players lay down a mine field as a task. Specifically, I have loaded 30 APERSBoundingMine_Range_Mag into a vehicle and I want the players to place at least 20 mines within a 50 meter area that I marked on the map. How do I get a count of the mines that have been deployed within that area. obviously I don't want to count the mines that have not been deployed. Thanks.
  24. UPDATE: I changed from using the createUnit to using the BIS_fnc_spawnGroup function but no joy. Then I thought maybe I was setting the scene before the Arma mission could properly initialize so as a test I put a 10 sec delay before spawning the unit. That worked but obviously not a good solution. At the beginning of my init.sqf file I do have: waituntil {!isnil "bis_fnc_init"}; Is there a proper way to wait for all the mission stuff to initialize when running on a dedicated server? Why doesn't this problem pop up when I run the mission from my PC?
×