-
Content Count
1304 -
Joined
-
Last visited
-
Medals
Everything posted by twirly
-
Go back to my last post....I added stuff for you. You'll be OK now.
-
You still have some errors.... You forgot the underscore in _responses.... and you didn't assign anything to _response1, _response2, _response3! _response1 = "sound10"; _response2 = "sound11"; _response3 = "sound12"; But then...hang on a second!. You don't need _response1, _response2 and _response3 at all if you just use the actual sound itself. _target = _this select 0; _killer = _this select 1; [color="SeaGreen"]_responses[/color] = [[[color="Red"]"sound10"[/color],"He's down"],[[color="Red"]"sound11"[/color],"Eliminated"],[[color="Red"]"sound12"[/color],"Target down"]]; _indx = 0; if (group _killer == foxmist1) then { _indx = floor random 3; playsound (_responses select _indx) select 0; _killer sidechat (_responses select _indx) select 1; }; EDIT: OK... I made a demo for you. Works sweet! There's another error that I missed above and that is... The Eventhandler passes an array [victim,killer] to your script.... so to get the killer and the victim you have to extract them from the passed array like this:- [color="Red"]_array = _this select 0[/color]; _target =[color="Red"] _array[/color] select 0; _killer = [color="Red"]_array[/color] select 1; I knew that all along but without testing I just did not see it.
-
Oh yes.... it will... stupid me. I just copied your post again. If you look at my orignal post above... I actually edited it after to be correct. Seems you grabbed the code before I had fixed it. So yes you are 100% correct.
-
ARMA 2: OA beta build 85478
twirly replied to themaster303's topic in ARMA 2 & OA - BETA PATCH TESTING
My 2 cents again... Lethality. Any of these rounds should be lethal or incapacitating if I see blood. Maybe the heavier ones more incapacitating .... but all should be. Body Armor. If it hits body armor... don't show me blood. Show me a poof of something... but not blood. Weapon shake. Personally having the game shake my weapon depending on how much the game thinks I'm rattled or scared or tired... is just not the way to go. That's imposing things on me that may or may not exist. Different personalities will react differently. Who's to say??? Windage. Introduce windage to make hitting targets at range more difficult. There's already wind in the game. Changes in wind direction and gusts can cause you to miss at range. That is more realistic and seems it might solve some of... if not all of.... the problems we are having here. Another thing that blows me away is the shake when vehicles are around. I live in New Zealand and I know what an earthquake is. Besides the fact that my world doesn't shake every time I'm around a huge crane, truck, or jumbo jet for that matter... what I see represented in this game is 7 on the Richter Scale. Without a doubt! I think you need to use sound better to represent "rumble"....lots of bass. Feel it in your stomach. I think it's that easy to increase awareness and therefore the immersion. The shake for vehicles is arcade.... not that real world at all IMHO. For explosives.... yes shake and rumble... because there is a shockwave. It's going to move me! I just see these things as polish. But it's always up to the developers. -
Nah mate....not you being impatient. I didn't really help you much with my post... so was trying to go the extra mile and give you something better. _indx = 0 is simply to initialize the variable _indx. To give it a value before we use it in the "if" statement. You can have problems if variables are not set before being used in "if's" and "while's" etc. Arrays certainly won't work unless being previously initialized outside the scope of these statements. OK...here your error is easy... _target = _this select 0; _killer = _this select 1; [s]_response1 = [ playsound "sound10"]; _response2 = [ playsound "sound11"]; _response3 = [ playsound "sound12"]; [/s] _responses = [[[color="Red"]"sound10"[/color],"He's down"],[[color="Red"]"sound11"[/color],"Eliminated"], [[color="Red"]"sound12"[/color],"Target down"]]; _indx = 0; if (group _killer == foxmist) then { _indx = floor random 3; playsound (_responses select _indx) select 1; _killer sidechat (_responses select _indx) select 0; }; }; You need to see why you made an error though!...do you?
-
OK...do it this way maybe (I was working on it for you!). _responses = [[_response1,"He's down"],[_response2,"Eliminated"],[_response3,"Target down"]]; _indx = 0; if (group _killer == foxmist) then { _indx = floor random 3; playsound (_responses select _indx) select 0; _killer sidechat (_responses select _indx) select 1; }; You follow? ... not tested but should work. EDIT: I corrected the code lol! had a cut and paste nightmare going on there!
-
Try something like this for the sound man....short and simple. playsound (["killconfirmed","heshistory","goodbye"] select floor (random 3));
-
Nothing beats how the AI in the orig Ghost Recon react to being hit. You know they're toast from the first instant the projectile hits them. I agree. When I see blood spatter from the face or head... or almost anywhere for that matter.... that should be a good enough signal that I can change target. That AI is either dead or badly wounded and should no longer be a threat at distance.
-
Having AI Clear A Building
twirly replied to shammy2010's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hi mate... I remembered I had this example on Medifire that might help you. If you can pick your way through the code it might be of some use. There might be some hints in there that maybe don't apply... but it runs fine. -
ARMA 2 - Realistic Paradrop
twirly replied to DAP's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
The example mission works for me...no worries. Cool script! Thanks. -
A functional Swap Player method - Overcoming the limitations of selectPlayer
twirly replied to madrussian's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I basically have the whole game de-pbo'd and did a search....found these. teamswitch.sqf is in ui\scripts onPlayerrespawnOtherUnit.sqs is in Ca\data\scripts onPlayerRespawnAsSeagull.sqs is in Ca\data\scripts Hope that's some help for you. Not much in the teamswitch.sqf.... the only line is commented out. The other two are about handling the camera and a switch to INTERNAL view of the seagull or the new player. Much like a SP respawn script I have. -
That's great. At 1000 yards a FMJ 308 round will kill. No problems at all.... it's still packing over 500ft-lbs of energy. For a 223 it's about 200ft-lbs at 1000 yards....that will still also kill. Thank you.
-
I'm seeing the AI swallow 223 and 308 rounds at 600m one after the other and still shoot back. As much as seven rounds to take them down sometimes. They can be lying prone and take them in the face and down the neck and they're fine until they die. I see the blood. Anyone else noticing that?
-
Help with selectPlayer
twirly replied to madrussian's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Still play this online with friends to this day...you cannot beat the immersion in GR!... So I'm interested. Sorry can't help you though because I haven't done any MP programming at all. As soon as I realised that the AI was warping in Arma (many years ago) and the problem wasn't with me.... I decided it was really just a waste of time. My friends won't play it even after I bought it for them... and I really can't blame them. I won't either. The new Betas seem to be doing something about the warping....but I guess I have to put my trust in the people who know what they are doing in MP to test that. EDIT: Not sure if you've seen this post or not... but this might help. It seems you have to fudge it in some way! http://forums.bistudio.com/showpost.php?p=2035973 -
Random Marker / Ambush /IED / Camp Script
twirly replied to Skelt's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
That always works for me and is the best thing you can do when nothing makes sense anymore. Just leave it alone and come back later! -
You have to manually delete the beta folder in the Expansions folder before applying the patch. Are you doing that?
-
Need music looping solution
twirly replied to MajorModz's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Maybe you can terminate the music by playing silence. Create a half second of silence with Audacity or whatever sound software and play that to terminate the sound that is currently playing. I have no idea if that works but seems like it should. -
Random Marker / Ambush /IED / Camp Script
twirly replied to Skelt's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hi Skelt.... for the second part of your post about the finding of positions inside houses. Here's a little script I wrote sometime ago for randomly placing stuff in buildings. It's not too hard to follow and the code in there should at least help you with your building positions. hideobjects.sqf:- /* Script: hideobjects.sqf TWIRLY 2011 nul = ["Fuel_can",_number_of_fuel_cans] execVM "hideobjects.sqf"; */ private ["_object","_numobj","_randbuilds","_numplaced","_i","_posarray","_rndpos","_pos","_cnt","_fc"]; _object = _this select 0; //the type of object to create _numobj = _this select 1; //the number of objects to create //finds random buildings closeby _randbuilds = nearestObjects [player,["Building"],50]; hint format ["_randbuilds: %1",_randbuilds]; sleep 1; _numplaced = 0; //keep looping till all objects placed while {_numplaced <= _numobj} do { //select one random building _build = _randbuilds select (floor (random (count _randbuilds))); hint format ["_build: %1",_build]; sleep 1; //initailize arrays _posarray = []; _rndpos = []; _pos = []; //set counter to zero _cnt = 0; //as long as building position _cnt not equal to "[0,0,0]" keep looping while {format ["%1", _build buildingpos _cnt] != "[0,0,0]" } do { _pos = _build buildingpos _cnt; //select building position _cnt _posarray = _posarray + [_pos]; //add the position to the list _cnt = _cnt + 1; //increment counter sleep 0.01; }; hint format ["_posarray: %1",_posarray]; sleep 1; //some buildings have no positions...so check for 1 or more available positions if (count _posarray >=1) then { //select a random position _rndpos = _posarray select (floor (random (count (_posarray)))); //create an object there _fc = _object createvehicle _rndpos; //created object seems to fall to the ground!! _fc setpos _rndpos; //move it to the correct position!.. works! hint format ["_fc %1 placed at\n_rndpos: %2",_numplaced,_rndpos]; _numplaced = _numplaced + 1; //increment the number of placed objects sleep 1; }; }; As it is the script only searches 50m around the player for buildings. This can easily be changed by providing more input to the script. -
Tasmania Island ArmA2CO
twirly replied to hotzenplotz's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
Nice island. Thanks bud. -
Great.... Perpetual missions will now run perpetually... fingers crossed!
-
Independents friendly to... change?
twirly replied to boris5134's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Maybe setfriend can help you. EDIT: I just read there that "Changing value during mission can cause unexpected errors in AI behavior" .... so it may not work as expected. -
What you want then is JTD_Hide.... which is simpler and works with the Action menu. This was made because I didn't like having to use the actions. This also has a lot of adjustments and is made to be more complex. Lol! I know I'll never please everybody.... but I sure can please myself and some others!
-
AH64 Gunner Script
twirly replied to 75thRanger's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
You sure are trying hard... I'll give you that! :) Here mate.... try this see how much mileage you get out if it. It will work in SP. Maybe someone can help you with the MP aspect..... or... hint hint... maybe you can try to do that yourself and then come back with questions. Create a script called "toggle.sqf" in your mission folder. Put this in it:- toggle.sqf if (not (Toggle)) then { Toggle=true; } else { Toggle=false; }; Then create a script called "swapseat.sqf"...put this in it:- swapseat.sqf:- _run = true; Toggle = true; UnitSwitchesAdded = false; while {_run} do { _veh = vehicle player; if (_veh isKindOf "Air") then { if (not (isnull (gunner _veh)) and not (UnitSwitchesAdded)) then { addSwitchableUnit (driver _veh); addSwitchableUnit (gunner _veh); _act = _veh addAction ["Toggle Seat", "toggle.sqf" ,[], -1, false]; UnitSwitchesAdded = true; }; while {_veh != player} do { if (not (Toggle) and gunner _veh != player) then { selectplayer gunner _veh; (group player) selectLeader player; }; if (Toggle and driver _veh != player) then { selectplayer driver _veh; (group player) selectLeader player; }; sleep 1; }; }; sleep 1; }; Put this in your players init:- nul = [] execVM "swapseat.sqf"; Now if you are in an AIR vehicle with a gunner you can switch using an Action.... but no doubt this script will raise other issues as you'll see. EDIT: Added two lines of code that will allow you to tell the pilot where to go when you are the gunner. -
AH64 Gunner Script
twirly replied to 75thRanger's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yeah... he came to me in PM too.... several! What he wants is someone to modify that script to be able to switch between gunner and driver in a MP environment!... or come up with a script to do that. -
need someone who knows a great deal with scripting
twirly replied to 75thRanger's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Look here you might find the answer..... http://forums.bistudio.com/showthread.php?t=125795 You posted almost the exact same question yesterday!