Jump to content

dcthehole

Member
  • Content Count

    96
  • Joined

  • Last visited

  • Medals

Everything posted by dcthehole

  1. Maybe create the mines in a server script and put them in an array? You might be able to work a little magic after that.
  2. Assuming that you are editing the standard arma 2 life mission then this would work. _copplayernumber = 0; for[{_i=0},{_i < (count playerarray)},{_i=_i+1}] do { _curplayer = playerarray select _i; if((isplayer _curplayer) && (!isnull _curplayer) && (_curplayer in coparray)) then { _copplayernumber = _copplayernumber + 1; }; }; Then you could just use the variable _copplayernumber to run a simple exit-with check.
  3. If the _grrrVal is being used anywhere else in the script try this out. if((_object getvariable "Sarge")==1) exitwith {}; if(!_parachuteWest and !(locked _object)) then { //if (_objectID == "0" && _uid == "0") then if(_objectID == "0" && _uid == "0" && (vehicle _object getVariable ["Sarge",0] != 1)) then { _object_position = getPosATL _object; _isNotOk = true; }; };
  4. At work so cant test code, but try this out. private ["_var","_grrrVal"]; _var = _object getvariable "Sarge"; if(isnil "_var") then {_grrrVal= 0;} else {_grrrVal = _var;}; if(_grrrVal== 1) exitwith {}; if(!_parachuteWest and !(locked _object)) then { //if (_objectID == "0" && _uid == "0") then if (_objectID == "0" && _uid == "0" && (vehicle _object getVariable ["Sarge",0] != 1)) then { _object_position = getPosATL _object; _isNotOk = true; }; };
  5. Maybe something like this? _bridge = nearestbuilding this; _bridge addeventhandler ["HandleDamage",{false}];
  6. dcthehole

    Object placement

    Try using setPosATL or setPosASL.
  7. dcthehole

    List of all Playable Groups

    { //Code } foreach playableunits; Is this what you are talking about?
  8. dcthehole

    Arma 3 RCon

    Try this. If you would have taken 10 seconds to scroll down before you started this topic you would have seen it.
  9. Dont run anything like this [] spawn { while {true} do { player setFatigue 0; sleep 0.1; }; }; Thats an unnecessary loop to run and less efficient. Not to mention there is a command to do exactly what you want. Use this if (local player) then { player enableFatigue false; player addEventhandler ["Respawn", {player enableFatigue false}]; }; Like Foxy said.
  10. No, it should not be in quotes. cuel's above code seems right.
  11. dcthehole

    end animation go back to original state

    Maybe something like this? To start saluting: S2 switchmove "AmovPercMstpSrasWrflDnon_Salute"; S2 enablesimulation false; To stop saluting: S2 enablesimualtion true; S2 switchmove "AidlPercMstpSrasWrflDnon_AI"; That should work.
  12. I have one quick question about the onPlayerDisconnect command. Is there a way to record the player name in the onPlayerDisconnect? I've tried with no luck. Any help would be appreciated.
  13. dcthehole

    Player Disconnect Question

    Oh nice thanks. Does it record anything else? Also where did you find that at?
  14. dcthehole

    Dog barking possible?

    Two questions. Did the dog spawn and can you post script errors if any?
  15. I think the only way to do this would be a combination of if's with alive and !alive commands.
  16. Edit: Code not working still thinking.
  17. You could add this to your init.sqf if you want.
  18. If im understanding you correctly. You might want to try. waituntil{!alive T1}; hint "Ammo Truck Down Msg"; waituntil{!alive T2}; hint "Ammo Cache Destroyed Msg"; waituntil{!alive T3}; hint "Fuel Truck Down Msg";
  19. dcthehole

    Dog barking possible?

    Sorry when I posted this it was on my phone. Here is a more in depth example. Add this code to your init.sqf _dog = "Fin_blackwhite_F" createvehicle (getposasl player); while{true} do { sleep 10; _dog say ["Bark",5]; }; Then add this to your description.ext class CfgSounds { class Bark { name = ""; sound[] = {"sounds\bark1.ogg", db-5,1}; titles[] = {}; }; }; If you do it this way there is no need to place anything in the editor except for the playable unit. Hope this helps. ~dcthehole
  20. If you have a specific location in mind then just create the vehicles are tweak the positions until they are just right.
  21. dcthehole

    Dog barking possible?

    Just create a dog and play a sound with the dog as the source. _dog = "Fin_blackwhite_F" createvehicle (getposasl player) _dog say ["Bark",5]; Be sure to define "Bark" in your Description.ext under cfgSounds. For more info check out this http://community.bistudio.com/wiki/Description.ext#cfgSounds
  22. dcthehole

    Epoch DLL

    The purpose of the Epoch.dll to is to get the system date and time and allow arma to use it accordingly. You can get the file here and put the .dll file in your Arma3 Steam directory. Here is the source code (feel free to tweak as you like): #define WIN32_LEAN_AND_MEAN #include <time.h> #include <windows.h> #include <stdio.h> BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; } extern "C" { __declspec(dllexport) void __stdcall RVExtension(char *output, int outputSize, const char *function); }; void __stdcall RVExtension(char *output, int outputSize, const char *function) { outputSize -= 1; if (!strcmp(function,"Version")) { strncpy(output,"Epoch.dll Version 1.0",outputSize); } else if(!strcmp(function,"DateTime")) { char text[100]; time_t now = time(NULL); struct tm *t = localtime(&now); strftime(text, sizeof(text)-1, "%m-%d-%Y %H:%M:%S", t); sprintf(output, "%s", text ); } else if(!strcmp(function,"Date")) { char text[100]; time_t now = time(NULL); struct tm *t = localtime(&now); strftime(text, sizeof(text)-1, "%m-%d-%Y", t); sprintf(output, "%s", text ); } else if(!strcmp(function,"Time")) { char text[100]; time_t now = time(NULL); struct tm *t = localtime(&now); strftime(text, sizeof(text)-1, "%H:%M:%S", t); sprintf(output, "%s", text ); } else { strncpy(output,"Unknown Function!",outputSize); } } The extension accepts 3 functions(DateTime,Date,Time). Super simple to do. Here are some quick examples. Version (Will return the version number): diag_log text format["Version -> %1",("Epoch" callextension "Version")]; hint format["The Epoch.dll version is: %1",("Epoch" callextension "Version")]; DateTime (Returns the date and time formatted like Month-Day-Year Hour:Min:Sec): diag_log text format["DateTime -> %1",("Epoch" callextension "DateTime")]; hint format["The date and time is: %1",("Epoch" callextension "DateTime")]; Date (Returns just the date formatted like Month-Day-Year): diag_log text format["Date -> %1",("Epoch" callextension "Date")]; hint format["The date is: %1",("Epoch" callextension "Date")]; Time (Returns just the time formatted like Hour:Min:Sec): diag_log text format["Time -> %1",("Epoch" callextension "Time")]; hint format["The time is: %1",("Epoch" callextension "Time")]; Let me know what you guys think.
  23. dcthehole

    Intro for an mission help!

    No problem glad to hear it worked out.
  24. dcthehole

    Intro for an mission help!

    You could accomplish the intro cam by adding this to your init.sqf. Note these coordinates [1864.000,5565.000,0] are they Stratis Air Base. You can change them to wherever you like. [[1864.000,5565.000,0],"TEXT LINE 1||TEXT LINE 2||TEXT LINE 3||etc...|"] spawn BIS_fnc_establishingShot; And to do the music you do a few things. 1. Get an ogg sound file that you want to use and name it into.ogg. 2. Add this to your description.hpp: class CfgSounds { class intromusic { name = ""; sound[] = {"intro.ogg", db-5, 1}; titles[] = {}; }; }; 3. Add this in your init or where ever you please. _intromusic_obj = "Land_HelipadEmpty_F" createvehiclelocal (getpos player); _intromusic_obj setpos [(getpos player select 0),(getpos player select 1),-1]; _intromusic_obj say ["intromusic",1];
  25. dcthehole

    Array, set, do for...

    I think this is what the code you posted should look like. for[{_i=0},{_i<=(count Arr)},{_i =_i+1}] do { sleep 0.1; if(!(alive(Arr select _i))) then { Arr set[_i,Arr select (_i+1)]; }; }; for[{ _y=0},{_y<=(count Arr)},{_y = _y+1} do { sleep 0.1; _alpha = (Arr select _y) distance player; _beta = (Arr select(_y+1)) distance player; if(_beta<_alpha} then { Arr set[_y,Arr select (_y+1)]; }; }; A few questions though. What is Arr, because it is undef and can you post the script that is execvming this?
×