Jump to content

twirly

Member
  • Content Count

    1304
  • Joined

  • Last visited

  • Medals

Everything posted by twirly

  1. Try this it might be what you are after.... The music must be in "oog" format. You can use a freeware program called "Audacity" to make oogs from wavs or whatever. Google it. In "description.ext" put this code:- class CfgSounds { sounds[]= {song1}; class song1 { name = "song1"; sound[] = {\sounds\song1.ogg, [color="Red"]db-0[/color] ,1.0}; titles[] = {}; }; }; In your trigger or whatever you are using to start the music use "say"....like this:- radio say "song1"; I just tried this and it works.....but I can still hear the music 500m away....although the volume is softer than when I trigger it at 30m. Maybe playing with the volume in red....but as far as I know volume is broken in the .ext and does not work. Your mileage might vary. I am testing it now and really I am not quite sure if it is decreasing. Volume is wonky in this game anyway. Sound pressure level doubles every 3db in real life....but not here! :)
  2. Try pressing the "L" key...that switches on and off the laser for the player. I'm using it as we speak.
  3. This is one way....put whichever one you want in the leader of the groups Inititialization. For flashlights:- {_x enableGunLights true} forEach units group this; For IR Lasers:- {_x enableIRLasers true} forEach units group this; If you want both lights and lasers enabled you can use this..... {_x enableGunLights true;_x enableIRLasers true} forEach units group this; Actually it can be in any unit of the groups Initialization!
  4. Good stuff! Know nothing of FSM's so will have to delve sometime. Yeah...I would like to see my FO actually using his binocs!
  5. @Evil....Thank you for posting this. Very cool!
  6. You might also need to enable them before they actually work! For flashlights:- {_x enableGunLights true} forEach units _group; For IR Lasers:- {_x enableIRLasers true} forEach units _group;
  7. Hi Logitrust. I will try to help you if I can. I have added a few lines to your code. Create a script called "do_marker.sqf" or something similar. Put it in your mission folder. "do_marker.sqf" private ["_plane"]; _plane = _this select 0; createMarker["marker01",getPos _plane]; "marker01" setMarkerShape "ICON"; "marker01" setMarkerType "AIR"; "marker01" setMarkerText ""; "marker01" setMarkerColor "ColorYellow"; while {alive _plane} do { "marker01" setMarkerPos getpos _plane; sleep 2; }; deletemarker "marker01"; ...and Tophe's script. This is the one I found "SimpleVehicleRespawn_v1.7.7 Just add the lines in red. "vehicle.sqf" /* ========================================================= Simple Vehicle Respawn Script v1.7 by Tophe of Östgöta Ops [OOPS] Put this in the vehicles init line: veh = [this] execVM "vehicle.sqf" Options: There are some optional settings. The format for these are: veh = [this, Delay, Deserted timer, Respawns, Effect, Static] execVM "vehicle.sqf" Default respawn delay is 30 seconds, to set a custom respawn delay time, put that in the init as well. Like this: veh = [this, 15] execVM "vehicle.sqf" Default respawn time when vehicle is deserted, but not destroyed is 120 seconds. To set a custom timer for this first put the respawn delay, then the deserted vehicle timer. (0 = disabled) Like this: veh = [this, 15, 10] execVM "vehicle.sqf" By default the number of respawns is infinite. To set a limit First set the other values then the number of respawns you want (0 = infinite). Like this: veh = [this, 15, 10, 5] execVM "vehicle.sqf" Set this value to TRUE to add a special explosion effect to the wreck when respawning. Default value is FALSE, which will simply have the wreck disappear. Like this: veh = [this, 15, 10, 5, TRUE] execVM "vehicle.sqf" By default the vehicle will respawn to the point where it first was when the mission started (static). This can be changed to dynamic. Then the vehicle will respawn to the position where it was destroyed. First set all the other values then set TRUE for dynamic or FALSE for static. Like this: veh = [this, 15, 10, 5, TRUE, TRUE] execVM "vehicle.sqf" If you you want to set the INIT field of the respawned vehicle, first set all other values, then set init commands. Those must be inside quotations. Like this: veh = [this, 15, 10, 5, TRUE, FALSE, "this setDammage 0.5"] execVM "vehicle.sqf" Default values of all settings are: veh = [this, 30, 120, 0, FALSE, FALSE] execVM "vehicle.sqf" Contact & Bugreport: harlechin@hotmail.com ========================================================= */ if (!isServer) exitWith {}; // Define variables _unit = _this select 0; _delay = if (count _this > 1) then {_this select 1} else {30}; _deserted = if (count _this > 2) then {_this select 2} else {120}; _respawns = if (count _this > 3) then {_this select 3} else {0}; _explode = if (count _this > 4) then {_this select 4} else {false}; _dynamic = if (count _this > 5) then {_this select 5} else {false}; _unitinit = if (count _this > 6) then {_this select 6} else {}; _haveinit = if (count _this > 6) then {true} else {false}; _hasname = false; _unitname = vehicleVarName _unit; if (isNil _unitname) then {_hasname = false;} else {_hasname = true;}; _noend = true; _run = true; _rounds = 0; if (_delay < 0) then {_delay = 0}; if (_deserted < 0) then {_deserted = 0}; if (_respawns <= 0) then {_respawns= 0; _noend = true;}; if (_respawns > 0) then {_noend = false}; _dir = getDir _unit; _position = getPosASL _unit; _type = typeOf _unit; _dead = false; _nodelay = false; [color="Red"]nul = [_unit] execVM "do_marker.sqf";[/color] // Start monitoring the vehicle while {_run} do { sleep (2 + random 10); if ((getDammage _unit > 0.8) and ({alive _x} count crew _unit == 0)) then {_dead = true}; // Check if the vehicle is deserted. if (_deserted > 0) then { if ((getPosASL _unit distance _position > 10) and ({alive _x} count crew _unit == 0) and (getDammage _unit < 0.8)) then { _timeout = time + _deserted; sleep 0.1; waitUntil {_timeout < time or !alive _unit or {alive _x} count crew _unit > 0}; if ({alive _x} count crew _unit > 0) then {_dead = false}; if ({alive _x} count crew _unit == 0) then {_dead = true; _nodelay =true}; if !(alive _unit) then {_dead = true; _nodelay = false}; }; }; // Respawn vehicle if (_dead) then { if (_nodelay) then {sleep 0.1; _nodelay = false;} else {sleep _delay;}; if (_dynamic) then {_position = getPosASL _unit; _dir = getDir _unit;}; if (_explode) then {_effect = "M_TOW_AT" createVehicle getPosASL _unit; _effect setPosASL getPosASL _unit;}; sleep 0.1; deleteVehicle _unit; sleep 2; _unit = _type createVehicle _position; _unit setPosASL _position; _unit setDir _dir; if (_haveinit) then {_unit setVehicleInit format ["%1;", _unitinit]; processInitCommands;}; if (_hasname) then {_unit setVehicleInit format ["%1 = this; this setVehicleVarName ""%1""",_unitname]; processInitCommands;}; _dead = false; // Check respawn amount if !(_noend) then {_rounds = _rounds + 1}; if ((_rounds == _respawns) and !(_noend)) then {_run = false;}; }; [color="Red"]nul = [_unit] execVM "do_marker.sqf";[/color] }; This will always create an "AIR" marker....but this can be used on any vehicle.....so there's more that can be done to display the correct marker. Fiddle with it and see what you can do. This is the way to learn. If you get into trouble...just post again. Glad to help. There are other ways to do this....but this is the path I wandered down today! :) Kudos to Tophe. Great respawn script!
  8. First off ~90 ms ping is not crappy!!! ....but I simply cannot understand when people say they play this online without warping! This just totally blows my mind.We must be talking about two different things!! I have spent weeks on this on several different occasions with my own dedicated server running on a 3.0 Ghtz Dual Core on a LAN and still get the warping with only me and one AI.....and from the amount of complaints here....I am not alone. Can someone please post a multiplayer video on You-Tube without warping or "beaming" as I have also seen it refferred to. I think a lot of us would just love to see this. I had a look just now on You-Tube and there are none that I can find. There are many with complaints about warping/beaming....but none without! I personally simply cannot believe it until I see it!
  9. Hi...sorry I didn't get the gist of what you wanted. I thought you wanted them to follow you out of an aircraft. If I've got it wrong this time....well I just don't know what to say. I still have not read the scripts. You say they look fairly simple. I don't think they are simple at all. If you think they look simple how come you are struggling? ;) Anyhow....maybe I can make it up to you! This is how to call a hot off the press modified version of "HALO_init.sqs".....it seems they must first have a waypoint. It appears to work just fine in OA/CO...if you only have Arma 2.....then they get to about 5m and just start hovering around. This is not my doing...I have not modified that script. That is BIS's grand plan at work there!! @kylania ..you'll be proud of me mate....a foreach statement complete with sleep and all! :) deleteWaypoint [thegroup, 1]; _wp = thegroup addWaypoint [_pos, 1]; _pos = getPos player; {[_x,500,_pos] exec "HALO_init.sqs"; sleep 1} foreach units thegroup; and.... This is BIS's "HALO_init.sqs". I modified it to handle position. Put this in your mission folder. "HALO_init.sqs" _isEP1 = isclass(configfile >> "cfgvehicles" >> "Steerable_Parachute_EP1"); if (!_isEP1) then {goto "A2"}; ;--- Improved HALO script _HALOunit = _this select 0; _HALOunitaltitude = _this select 1; _HALOunitPos = _this select 2; ;// Set the unit pos in the air _HALOunit setpos [_HALOunitPos select 0, _HALOunitPos select 1, _HALOunitAltitude]; if (isnil "bis_fnc_init") then {createcenter sidelogic; _grp = creategroup sidelogic; _logicFnc = _grp createunit ["FunctionsManager",position player,[],0,"none"];}; @!isnil "bis_fnc_init" _nil = [_HALOunit,_HALOunitaltitude] spawn bis_fnc_halo; exit; ;----------------------- #A2 _HALOunit = _this select 0 _HALOunitaltitude = _this select 1 _HALOunitPos = _this select 2 ;// Set the unit pos in the air _HALOunit setpos [_HALOunitPos select 0, _HALOunitPos select 1, _HALOunitAltitude] ;// Run player or AI script ~0.05 ? (_HALOunit == player) : playsound "BIS_HALO_Flapping"; setAperture 0.05; setAperture -1; _HALOunit switchMove "para_pilot"; [_HALOunit] exec "ca\air2\halo\data\Scripts\HALO.sqs" ? ! (isplayer _HALOunit) : [_HALOunit] exec "ca\air2\halo\data\Scripts\HALO_AI.sqs" exit :)
  10. OK...I missed that or would have tried my best to make it make more sense! All good now?
  11. _ride = createVehicle [_veh, _vehpos, [], 0, "FLY"]; _crew = createGroup EAST; _driver = _crew createUnit ["RU_Soldier_Pilot",[0,0,30], [], 0, "NONE"]; _speed = speed _ride; _ride setVelocity [sin(_dir1)*_speed/3.6,cos(_dir1)*_speed/3.6,0]; _driver assignAsDriver _ride; _driver moveInDriver _ride; This works a charm for me! Always! I think I remember having trouble with the order of the commands.....that's why the order is strange.
  12. Please try it.....it works in many many scenarios I have made. It nearly drove me nuts trying to find a solution.
  13. Thanks AZ & kylania. Guess I did not see the sleep in there. My bad. I guess I will use it ...as it is a one liner and nice.
  14. I've been with this game and it's predecessors for ten years and have spent an enormous amount of time learning about it. Too much actually! About a year ago I thought right...I know enough to be able to script some cool multiplayer stuff for me and my two buddies to have some fun. You can imagine the horror...when after nine years of dedication I discovered that multiplayer is simply not going to happen with this netcode. I tested and tested and tested. Got down to 1 (one) AI and me on a dedicated server and the AI still f*cking warped!! Talk about "feel like a fool".......after spending all those years digging and learning scripting and reading the hype about how big the multiplayer battles can be. It can't even do a multiplayer with one dude without problems! LOL! I stick with it because I love scripting....and maybe because I don't want to think about the countless hours which will have been lost if I never get to play properly online with my mates. I can't say all "lost" because like I said ....I enjoy writing code. Just wish I could play. So to those of you that think the netcode is going to get better....don't hold your breath!
  15. twirly

    Proving ground

    Just want to say that this is good programming. Excellent work man....keep it up.
  16. twirly

    Speed up the planes a bit

    The issue is not with me flying. I don't fly in Arma 2. If I want to fly I use Rise Of Flight or IL-2.....real simulators! The issue is with the AI. When they come in low...the aircraft looks like a boat on water that's struggling to get up on the plane. It simply does not look realistic. That goes for all AI piloted fixed wing aircraft. I do no know about the "feel" for human pilots....would not have a clue!
  17. Sorry...I did search but obviously did not find that thread!
  18. twirly

    Twitchy action menu

    I hear you and agree big time.....been with this series since OFP and hate the clumsiness of the input system. After ten years I'm still having problems. LOL!! I'm 53! ...you older than me?
  19. They go into your: 1. MyDocuments\Arma 2\missions\YourMissionNameHere\init.sqf 2. MyDocuments\Arma 2\missions\YourMissionNameHere\description.ext There is no "mission.sqf".... there's a "mission.sqm". Leave that file alone.
  20. The machine is fine...I have 3 computers here over 3.0 Ghtz! Two quads and a Dual core. The funny thing is the dual core runs the game best! My prefernce is to use my coding and not BIS's.....it's just a personal preference that's all. I learn more this way. Haven't tried....but can you add a sleep to a foreach?...so that you can eject one troop every 2 seconds if you wanted too? That would be a good reason to use a loop.....which a "foreach" is anyway!. In fact I'll bet the foreach uses the exact same loop. It's just coded into a function called "foreach"!!
  21. Anything....unless they do something totally strange....would certainly be an improvement over the current setup. Currently the situation is:- "Sorry guys....sorry I fragged you all......I was just trying to put my weapon into Auto!!"
  22. twirly

    Multiplayer

    What multiplayer??? Can people actually play online with this game! Everytime I've looked at multiplayer all I see is the AI here....then there.....then there....then over there. You can't get a bead on the little f*ckers when they are warping all over like that. Unuseable in my opinion.
  23. twirly

    Graphics engine improvement

    Re-work the graphics engine from the ground up! It needs it big time!
  24. twirly

    Hot keys for the action menu

    Good ideas guys. This is good...good ....good. And please move the HE, grenades and smoke to where they should be. That is...with other weapons.
  25. Buttons to directly select weapons would be the way to go.....quick and direct.....Less mistakes and farking around! A clickable mouse wheel is perfect for the fire selector....but move the weapons so that they are all togeher somewhere.
×