Metal Heart
Member-
Content Count
1019 -
Joined
-
Last visited
-
Medals
Everything posted by Metal Heart
-
http://community.bistudio.com/wiki/Multiplayer_Custom_Sounds_Tutorial
-
http://community.bistudio.com/wiki/Multiplayer_Custom_Sounds_Tutorial
-
Setvelocity can be used on bullets, I just tested it. Vehicles too of course if you want wind on choppers and planes. To make matters even simpler, there's a new command in ArmA which returns the wind vector: http://community.bistudio.com/wiki/wind Adding wind to rounds is easy. Making it realistic according to the type of projectile however, is not, unless you happen to be a ballistics expert with tons of data on all kinds of rifle rounds, rockets, tank shells etc. Then again, the flight paths are probably incorrect to begin with. Example: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">// w_rifle.sqf _r = _this; _w = wind; while {!isNull _r} do { _v = velocity _r; _v set[0, (_v select 0)+((_w select 0)*0.2)]; _v set[1, (_v select 1)+((_w select 1)*0.2)]; _r setVelocity _v; sleep 0.05; }; Sniper's init line: this addEventHandler ["Fired", {getPos(_this select 0) nearestObject (_this select 4) execVM "w_rifle.sqf"}]; Adjust the 0.2 to get more or less effect.
-
how? to add an "if this/than that" to a script?
Metal Heart replied to kuwahara<ANZAC>'s topic in OFP : MISSION EDITING & SCRIPTING
Usually when the precision isn't neccessary, you should use a loop instead of @ because @ checks the condition as fast as it can, like every frame or maybe even faster. With slow loops the condition will use much less cpu as in: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_object = _this select 0 #wait ~2 ?(_object distance player) > 100: goto "wait" player setDamage 1 -
Medic/Treat Wounds script help!
Metal Heart replied to kuwahara<ANZAC>'s topic in OFP : MISSION EDITING & SCRIPTING
Well go ahead and try. Perhaps it was a dream You could make a setHealth function though but then the syntax would be different: setHealth = {(_this select 0) setDammage (_this select 1)} [player, 0.901] call setHealth -
It must be in directory ChernMOD, if you rename it, it crashes.
-
IMO, there's no need for over-complication like less winds behind obstacles, different elevations etc. Taking wind into account could simply be a single vector addition per cycle per flying projectile more, which is not much, and it could be a difficulty option. There's already wind in the game that affects particle effects and parachutes. Wind could even be added by a mod using "fired" evenhandlers, if you can use setvelocity on bullets. But a hard-coded solution would be more efficient and accurate on low-fps (I presume the engine runs physics cycles at a set rate which is not affected by low fps unlike scripts. Although, tanks launching into orbit etc might suggest otherwise).
-
Medic/Treat Wounds script help!
Metal Heart replied to kuwahara<ANZAC>'s topic in OFP : MISSION EDITING & SCRIPTING
Nope, sethealth will only produce an error message. If you use that script you might want to add a check that prevents healing at dead medics such as: ?!(alive _medic): _medic removeAction _actionID; exit -
For reals? That was just mean, not to mention super-lame
-
You can find out the coordinates or you can place an invisible marker ("Empty") there for example. "Shell125" createVehicle [9536, 3904, 0] "Shell125" createVehicle (getmarkerpos "markername")
-
I don't get what's so utterly awesome about ChernMOD. It's not like there isn't better islands with better objects. Just download the DXDLL from Kegetys' website and extract it into OFP dir, that's all you need to do. http://www.kegetys.net/ofp/index.php?p=others
-
[object] exec "bomb.sqs" <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">cutText ["Bomb in 30s", "PLAIN"] ~20 cutText ["Bomb in 10...", "PLAIN"] ~1 _i=9 #loop _str = format ["%1", _i] cutText [_str, "PLAIN"] ~1 _i=_i-1 ?_i>0: goto "loop" cutText ["Detonation", "PLAIN"] _p = getpos (_this select 0) _i=0 #loop2 "Shell125" createVehicle [_p select 0, _p select 1, (0.1+random 0.5)] _i=_i+1 ?_i<10: goto "loop2"
-
: is then, as in: ?1==1 : player globalchat "1 is 1" and the same in human: if, 1 is equal to 1, then, execute this command ; separates commands on the same line, as in: player globalchat "hello"; loon1 globalchat "hi"; loon2 globalchat "hey" And there's no need for the gotos and #-tags, you'd only skip the delays (~) if they worked. I'm not sure if I recall correcly but you might need to create the bombs a bit in the air for them to explode, like: _p = getpos _bomb "Shell125" createVehicle [_p select 0, _p select 1, 0.2]
-
It would be silent and you'd see the animation too.
-
Try the ArmA demo to see if it runs. In my opinnion OFP with mods, custom missions etc is a much better game for the time being. GOTY/Bestsellers edition has OFP+Red Hammer campaign+Resistance expansion. http://www.armedassault.com/dwnl_demo.html
-
Maybe a DXDLL problem, rename the file d3d8.dll in ofp dir to something else and it will be disabled.
-
I'd display the hand signals as icons, so the squad might actually notice and understand the orders. Not realistic but neither is the lack peripheral vision and men appearing to be about the size of lilliputs on your screen. Or having a bunch of twelve year old ADHD kids on a sugar rush as your squad.
-
Medic/Treat Wounds script help!
Metal Heart replied to kuwahara<ANZAC>'s topic in OFP : MISSION EDITING & SCRIPTING
That won't work. _medic and _hurtguy aren't defined and there is no setHealth command. Try this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_medic = _this select 0 _treated = _this select 1 _actionID = _this select 2 ?_medic distance _treated > 3: exit ?"Man" countType [_medic] > 0: goto "medicman" _treated playmove "Treated" ~3 _treated setdammage 0 exit #medicman _medic playmove "Medic" _treated playmove "Treated" ~3 _treated setdammage 0 exit -
Would someone like to write a script for me?
Metal Heart replied to limmy3's topic in OFP : MISSION EDITING & SCRIPTING
Use only one script for simplicity's sake and no triggers for stuff like distance. Something like: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #check_dist ?W_2 distance Civ_1 < 160: goto "w2speak" ?W_3 distance Civ_1 < 160: goto "w3speak" ?W_4 distance Civ_1 < 160: goto "w4speak" ~1 ?W_2 distance Civ_2 < 160: goto "w2speak" ?W_3 distance Civ_2 < 160: goto "w3speak" ?W_4 distance Civ_2 < 160: goto "w4speak" ~1 goto "check_dist" #w2speak W_2 SideChat "Sir, Civilians are coming up the hill from the south." exit #w3speak W_3 SideChat "Corporal, here's a couple walking over the hill trough the zone." exit #w4speak W_4 SideChat "Corporal, Sir! Two persons are coming towards the depot." exit Start from init.sqs or some single init line. And I don't think that corporals are called Sirs anywhere -
Uh, really? Capturing video makes the frame rate drop? Oh noes, what an awful program Seriously though, if you get a huge fps drop when capturing video, the problem is most likely a slow hard drive, not Fraps itself.
-
You can remove magazines one by one with the command: unit removemagazine "magazinename" And add with addmagazine. Magazine name for satchels is "PipeBomb" in OFP. Here's a reference for the weapon and magazine names: http://www.ofpec.com/COMREF/weapons.php
-
2 broken scripts not working on a dedicated server
Metal Heart replied to sputnik monroe's topic in OFP : MISSION EDITING & SCRIPTING
That airstrike script is made for single player. The reason it doesn't work is because the script is only executed on a client when he mapclicks, but a client can't run the script because it exits unless server is local. You would also have as many airstrikes as there are players because the radio trigger that sets up the map click is executed on everyone so each player could start the script once. camCreate created stuff, marker commands, sideChat and setRadioMsg are all local. Try naming the players' group and change the radio alpha trigger onActivation so that only the leader gets the mapclick: if(player==leader groupname) then {onMapSingleClick{[_pos] exec "airstrike.sqs"}} Remove the local server condition and change the camCreates in the script to createVehicle. Note that players other than the leader can execute radio alpha, bravo etc by clicking on the radio that's visible on the map screen and then the trigger is activated again for everyone so you might want a global variable to see if the airstrike has been already called. Like a few lines in the beginning of the script: ?airstrikecalled==1: hint "No more airstrikes available."; exit airstrikecalled=1 publicvariable "airstrikecalled" ... The second one, just a guess but try placing an invisible H where the chopper is supposed to land or change the command to: helo land "land" -
The ultimate realism
Metal Heart replied to operation madman's topic in ARMA - ADDONS & MODS: DISCUSSION
Dude... Everything's possible with your mad modding skillz -
Multiple cd:s cost more than one dvd to press and it's simpler to install the game from one disk.
-
Anti-aliasing smooths the jagged edges of polygons. Anisotropic filtering sharpens textures that are in an angle. Has a great effect in OFP. Here's some shots: No anisotropic filtering 4x anisotropic filtering 16x anisotropic filtering