Jump to content

zooloo75

Member
  • Content Count

    1973
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by zooloo75

  1. zooloo75

    ppEffects viewer

    This should get updated with tonemapping features! :D
  2. nearunits = []; shotsfired = 0; hint "Initializing"; vehicle player addeventhandler ["Fired", "shotsfired = shotsfired + 1; nearunits = nearestobjects [player, ['Man'], 8]; nearunits set [0, 'remplayer']; nearunits = nearunits - ['remplayer']; {if(side _x == side player || side _x == civilian) then {_x playmove 'aidlpknlmstpslowwrfldnon_idlesteady02'};} foreach nearunits; player groupchat format['Shots fired: %1', shotsfired]; player groupchat format['nearunits = %1',nearunits]; nearunits = [];"]; Here's a little practice script I made to get my brain rolling back to the coding mindset. Haven't been able to write much code for a few weeks due to real life stuff. Here's what this code does - Whenever you fire, any nearby units will crouch and wait. This avoids those terrible moments where AI will run in front of your line of fire (potentially causing a teamkill or friendly fire incident). This still needs some work done to it such as having your fire only affect your side, and not everyone. Maybe the player's side and civilians. Very tired at the moment, but thought this could be a useful piece of code to some people (maybe even potential for a mod?). EDIT - Made the gunfire awareness only affect units on the player's side and civilians.
  3. zooloo75

    Flood effect

    Making rivers should be possible, maybe even water falls with the setvector commands or pitches. This is something BIS did well! They should make a module that floods an area given the parameters of the area, and height.
  4. http://img690.imageshack.us/img690/9716/flytobystrica.jpg (1905 kB)
  5. zooloo75

    Flood effect

    waituntil {alive player}; hint "Flooding!"; flood1 = "pond_acr" createvehicle (getpos loc1); flood1 setpos [position flood1 select 0, position flood1 select 1, -1]; while {true} do {if(position flood1 select 2 < 500) then { flood1 setpos [position flood1 select 0, position flood1 select 1, (position flood1 select 2) + .02]; hintsilent format["Flood Height: %1",(position flood1 select 2)];sleep 1;}; }; Here. This will make a flood at an object named "loc1", and it will give you a hint on the height the flood is at. I have a question though. How do I script a radius around a position? That way I can script in locations around a circumference of an object, while expanding the radius to make a bomb effect.
  6. zooloo75

    Army of the Czech Republic DLC

    Go first person in the touring car. Turn left, turn right. Prepare to question how cars work over at Czech.
  7. zooloo75

    Army of the Czech Republic DLC

    As a proud customer of ArmA2, OA, BAF, PMC, and now ACR, I have to say that this is a great expansion; My only complaint is that Chernar-I mean Bystrica is too small. Yes, I know it's a good size, but I have an entire mission already made in Chernarus, and I really don't see why you guys didn't just use the whole map? I see there are some changes, they look nice, but now I have to re-arrange everything, and there's no airbase anywhere :\ If you could port the new summer look to Chernarus, you will have another customer for any future title you release! :)
  8. ***Inappropriate advice removed***
  9. Is this available to ArmA2/ArmA2FREE?
  10. case 79: { if((patrolcar) && (vehicle player != player)) then {(vehicle player) say3d "stepoutofthevehicle"}; }; Ok, this code works great for me; the vehicle emits the sound effect, but there's one issue. In multiplayer, only the player who presses the key to play the sound can hear it - no one else can hear it. It's as if the sound is only played locally. How would I make this code work globally? I can't do setvehicleinit because it will make everyone play this sound, which is not what I want.
  11. Twirly, I am trying to use your method to make "setobjecttexture" global. It's not working :\ It will set my vehicle to a custom texture, but no one can see it. fn_netSetObjectTexture.sqf private ["_obj", "_texture"]; _obj = _this select 0; //object _texture = _this select 1; //texture // broadcast PV PVEH_netSetObjectTexture = [_obj,_texture]; publicVariable "PVEH_netSetObjectTexture"; // run on current machine also if not dedi server if (not isDedicated) then {_obj setObjectTexture [0, (_texture)]}; true checkcar.sqf while {true} do { if( ((vehicle player) distance paynspray < 10) && (typeof (vehicle player) == "VWGolf")) then { execvm "carpaint.sqf"; }; sleep 5; }; carpaint nul = [(vehicle player), "golfblue.paa"] call fn_netSetObjectTexture; hint "Vehicle Sprayed!"; piece of the init fn_netSay3D = compile preprocessFileLineNumbers "fn_netSay3D.sqf"; if (isNil "PVEH_netSay3D") then { PVEH_NetSay3D = [objNull,0]; }; "PVEH_netSay3D" addPublicVariableEventHandler { private["_array"]; _array = _this select 1; (_array select 0) say3D (_array select 1); }; //setobjecttexture fn_netSetObjectTexture = compile preprocessFileLineNumbers "fn_netSetObjectTexture.sqf"; if (isNil "PVEH_netSetObjectTexture") then { PVEH_NetSetObjectTexture = [objNull,0]; }; "PVEH_netSetObjectTexture" addPublicVariableEventHandler { private["_array1"]; _array1 = _this select 1; (_array1 select 0) setObjectTexture [0, (_array1 select 1)]; };
  12. I've had so many issues in the past with AI drivers. They either drive like they never drove a vehicle in their life; don't know what a steering wheel is; can't stay on the road; want to get out of their vehicle for no reason and run to the waypoint; hit every object that is OFF the road. I really wish BIS would improve the AI's driving skill. Maybe some skilled person could make a vehicle movement recorder that works kinda like camera.sqs and lets you record your position, rotation, velocity, etc while you move, and then lets you paste the info into an sqs/sqf for a vehicle, allowing the ai vehicle to do exactly what you did.
  13. I am using multiplayer. You press a key on the numpad and it executes the code. It first checks if the patrolcar is true, and if the player is in a vehicle. If those are true, then it will run the code. The player doesn't start in a vehicle though. case 79: { if((patrolcar) && (vehicle player != player)) then {[nil, (vehicle player), rSAY, "stepoutofthevehicle"] call RE;}; }; Basically what I want is when the player is a patrol officer, and is in a vehicle, they will be able to press a key and emit a sound from their vehicle that all players will be able to hear. ---------- Post added at 12:42 AM ---------- Previous post was at 12:18 AM ---------- Ok, I tested your method for my mission, it works great! I just have to see if others can hear it now! - will get back to you! Edit - WOW, this is epic. It works perfectly in MP!
  14. @Twirly - I never knew how those worked until you posted that nice bunch of info! I do know some Actionscripting, and I'm trying to adapt to ArmA's language because I love this game and would like to expand upon it with my own missions. I know in AS you can write functions which can handle things automatically (depending on how you wrote it). I never thought about/ knew about creating my own functions for ArmA. You just opened up a new door to ArmA scripting to me. Thank you! As your script hasn't been tested by me, I will try Shadow.D ^BOB's method first as it seems to be simple; but I will also test yours out for some other things. Thank you all for your help :) I will get back to y'all later once I test these out. ---------- Post added at 11:45 PM ---------- Previous post was at 11:17 PM ---------- if((patrolcar) && (vehicle player != player)) then {[nil, (vehicle player), rSAY, "stepoutofthevehicle"] call RE;}; I used this code, and it didn't work. I pasted it into squint and there were no errors. No sound was emited.
  15. So instead of case 79: { if((patrolcar) && (vehicle player != player)) then {(vehicle player) say3d "stepoutofthevehicle"}; }; It would be case 79: { [nil,nil,rEXECVM,"sound1.sqf",[player,allunits]] call RE; } and sound1.sqf would be if((patrolcar) && (vehicle player != player)) then {(vehicle player) say3d "stepoutofthevehicle"}; ?
  16. I am making a script when an hour goes by in the server, then everyone gets something. Like a "Happy Hour". The one problem I have though is checking if the time is even, or if it is divisible by a number. For example - if time is divisible by 60, then {blablabla}; or if time is even then blablabla. Something like that. It would be more preferred if someone would help me with the "if number is divisible by x" issue though. - Thanks for the help in advance ;)
  17. you could probably make it so instead of the rocket being fired out of the chopper, you could simulate it. Try using createvehicle, and set it's position and direction according to the chopper. Just a thought.
  18. I am making ambient lights for towns at night so it isn't pitch black. The #lightpoint code works great, except for one thing -- That ugly flare that blinds you. Townlights = [l1]; { light = "#lightpoint" createVehicle (position _x); light setLightBrightness 1.0025; light setLightAmbient[0.1863,0.1118,0.0706]; light setLightColor[0.1863,0.1118,0.0706]; light lightAttachObject [_x, [0,0,5]]; } foreach Townlights; That's my code. Is there any way to remove that visual disturbance?
  19. I searched but couldn't find anything on this. When you have SMK and Group Link 4 enabled, some animations will hurt you. For example, if I blindfire, shoot from sniper crouch, or shoot from backtowall position, it hurts me. I confirmed it by disabling GL4 and not having this problem.
  20. zooloo75

    Does jogging and running seem odd?

    Maybe BIS can make it to where the skill slider of an AI or player affects their speed of reloading and movement type. The new animations are great and a big S/O to Smookie for his awesome skills! - But as stated earlier, I wouldn't want to see normal soldiers moving as tactical as a SF person. - It wouldn't make the SF person that special :P
  21. No, it's not aiming deadzone. I will post a vid soon. ---------- Post added at 05:19 PM ---------- Previous post was at 05:07 PM ---------- http://www.youtube.com/watch?v=uj8ErB3_iIU&feature=youtu.be Watch the motion when I move the weapon while holding Alt. See how it jerks into place near the initial area? This makes it near impossible to aim properly whilst holding alt and looking near the center.
  22. My paintjob script works the way it should except I want to make it work on only a certain type of car - not w/e is in the area. How would I make it like so? For example, I pull into to an area and it switches the vehicle's texture to a custom one I made. I drive a VWGolf into a square, it changes it blue. But I am also able to drive for ex a tank into their and it will give it the vwblue texture - although that just makes it invisible. ---------- Post added at 11:24 PM ---------- Previous post was at 11:06 PM ---------- Also the custom texture doesn't show up for others, only for the person who got the paintjob.
  23. I made a script that simulates your character climbing over an object, but one issue I don't know how to resolve is that the player can hold down the key and end up flying. How would I make the key not repeat, or where it waits until the script has completed before running again? Below is a piece of the code that makes you climb. //climb case 76: { player switchmove "AcrgPknlMstpSnonWnonDnon_AmovPercMstpSnonWnonDnon_getOutHigh"; sleep 3; _vel = velocity player; _dir = direction player; _speed = 1; player setVelocity [(_vel select 0)+(sin _dir*_speed),(_vel select 1 + 2)+ (cos _dir*_speed),(_vel select 2)]; };
  24. Thanks, but that doesn't stop the problem of the player being able to hold down the key. The problem is that the player can hold down the key and just continuously float.
×