Jump to content

gokitty1199

Member
  • Content Count

    311
  • Joined

  • Last visited

  • Medals

Everything posted by gokitty1199

  1. gokitty1199

    Exporte Data to txt

    use inidbi2? just write whatever you need to the file with it
  2. something along the lines of this. check every player and see if any of them is closer than 200, if one unit is closer than 200 it exits the forEach command and sets _playerToClose to true, if no unit is closer than 200 then it leaves the boolean as false and runs your random location thingy _minDistance = 200; _playerToClose = false; { if (player distance _x < _minDistance) exitWith {_playerToClose = true;}; }forEach allPlayers; if (!_playerToClose) then { _Randomlocation = [[selectrandom [player1,player2], 1000, 1500, 3, 0, 20, 0] call BIS_fnc_findSafePos]; };
  3. gokitty1199

    Door Keypad [SCRIPT] Request

    updated: it now spawns a laptop(screw trying to use setVector -_-) on any building you want it to to the left of the main door by simply walking up to the building and it assigns a code to the building automatically(going to make it so you can set your own code with the key pad, just need to make it bigger so i can fit more buttons). you can now re lock the building that you have placed the key pad on, you cannot place more than one keypad on a building. to do: i want to make it so you can choose to unlock all doors in the building or just the main door. when you lock the building make it close all doors to ensure safety of the building. add lock building option to the keypad itself and not a separate addAction. add ability to set a new code for the building only when the building is unlocked. rename everything and set it so people can easily add to their mission and use it possibly add it so its a addon? idk how to do that yet so if anyone wants to point me in the right direction on how to do this that would be great!
  4. gokitty1199

    Problem with a GetIn event handler.

    watch this, it covers event handlers and the select command if you look at the parameters that Grumpy Old Man posted, you would see thats in in this order like this params ["_vehicle", "_role", "_unit", "_turret"]; and if you look in your script, you have _unit = _this select 0 your setting _unit to be equal to _vehicle. with eventHandlers their in order starting from 0, so 0 is the vehicle, 1 is the role, 2 is the _unit(what you want) and 3 is the turret. so instead of setting unit to 0 you would want to set unit to 2 so its equal to the unit like this. anything inside of the {} is where you can put whatever scripts you want to run when the event handler runs. this addEventHandler ["GetIn", { _unit = _this select 2; _unit additem "NVGoggles"; _unit assignitem "NVGoggles"; }];
  5. gokitty1199

    Door Keypad [SCRIPT] Request

    well ive been learning about dialogs for a solid 2 hours before attempting this(even made a little tut using listBox and buttons in that timeframe where you can teleport/kill a selected player from the box :D). so this is what ive got so far, its a pre placed house/tablet for the door for testing, just need to learn how to get the doors on all houses(no clue how to yet so please give suggestions) to make this kind of universal but its progress, have less than an hour into it. once that is sorted out i plan to make it so you can set your own code for the door Update: got keypads spawning to the left of the main door on any building dynamically with the ability to lock/unlock all doors
  6. gokitty1199

    Nuke On Trigger

    you can use this guys script. to run it in a trigger just put nuke_activated = true; in the activation box
  7. gokitty1199

    GF Ravage Status Bar script

    im not talking about the fix, i mean in general is it possible to do with the method in my post so that way it would appear centered no matter what the resolution is? sorry i dont have much experience in this area
  8. gokitty1199

    Teleport Entire Unit to marker

    awww man i just typed up a response :( you win
  9. gokitty1199

    Teleport Entire Unit to marker

    read the comment _players = allPlayers; { if(side _x == west) then { player SetPos getMarkerPos "marker1";//THIS LINE IS THE ERROR WHERE IT SAYS player } } foreach _players; _players is an array that holds every player on the server, so lets say theres 3 people on the server when this runs. p1, p2, p3 the forEach command uses the magic variable _x as a pointer to each element in the array. think of an element as a slot in the array, so element 0 is p1 and element 1 is p2 and element 2 is p3. so in your if statement(which is correct) it is checking the side of element 0/p1 and if it is equal to west then it sets player to the markers position, this is where the issue is. if you were to run just player setPos getMarkerPos "marker1"; in the players initPlayerLocal for example, this would work because its running on the client of the player so it teleports him and him only. since your using forEach you need to use the magic variable _x just like you did in the if statement to check the side of the player. remember _x is pointing to a slot in the _players array which holds the information of the players on the server so you need to do this _x setPos getMarkerPos "marker1"; so that it sets the position of each player inside _players to the markers location. so in the end it should look like this _players = allPlayers; { if(side _x == west) then { _x SetPos getMarkerPos "marker1";//THIS LINE IS THE ERROR WHERE IT SAYS player } } foreach _players;
  10. gokitty1199

    GF Ravage Status Bar script

    question, would it be possible to get the distance between the center of the screen and the left/right safezone and use a little calculation to position this so its always in the center?
  11. simplest way maybe? you need a way to store what the user types(little gui text box) in a string and then use format to add the senders name and such like messageToSend = format ["%1 says: %2", name player, _message]; , and then get the clientID of the player you want to send it to them with publicVariable client like 3 publicVariableClient "messageToSend"; then have a publicVariableEventHandler on the client to receive messageToSend like this and it should print out your message with your name in the form of a hint. its just the general idea behind a way to do it, idk what box thats called in the picture but you can set it up however by passing in stuff like the players name, their message and such separately and making it like how it is in the box. "messageToSend" addPublicVariableEventHandler { _message = (_this select 1); hint str _message; };
  12. sweet thats good to know, thanks man.
  13. gokitty1199

    High Command and Hide Module

    id think so, its why its worth testing
  14. gokitty1199

    High Command and Hide Module

    not tested but just a thought, maybe try running https://community.bistudio.com/wiki/hideObjectGlobal for every unit in that group?
  15. like in the post about the trigger. use your initPlayerLocal/init/initServer to execute other .sqf files. such as place the script in a .sqf file called something like day-nightCycle.sqf and inside initServer just execVm/call/spawn that .sqf file. it makes it easier to find bugs when your just reading 20 or so lines inside its own .sqf file instead of trying to search through hundreds of lines of unrelated crap if that makes sense.
  16. if you put it in the trigger then its going to throw a fit as triggers only take global variables, this script uses local variables with 2 global functions(should be local). place a trigger down to where the players would be teleported to so that they will enter the trigger once they are teleported to the starting area. set it to any player present, uncheck repeatable and set it to server only(i think thats the check box name?). in the activation box put null = [] execVM "alterTime.sqf"; paste this in alterTime.sqf _setDaySpeedFnc = { setTimeMultiplier 30; waitUntil { _hour = (date select 3); if (_hour == _sunSetHour) exitWith {call _setNightSpeedFnc;}; sleep 3; }; }; _setNightSpeedFnc = { setTimeMultiplier 60; waitUntil { _hour = (date select 3); if (_hour == _sunRiseHour) exitWith {call _setDaySpeedFnc;}; sleep 3; }; }; _sunRiseSet = date call BIS_fnc_sunriseSunsetTime; _sunRiseHour = round (_sunRiseSet select 0); _sunSetHour = round (_sunRiseSet select 1); call _setDaySpeedFnc;
  17. if your putting the entire thing in the initServer.sqf then paste this as is. please learn about event scripts and how to make your own and call them from other files. its not good practice to have your initServer cluttered like this setDaySpeedFnc = { setTimeMultiplier 30; waitUntil { _hour = (date select 3); if (_hour == _sunSetHour) exitWith {call setNightSpeedFnc;}; sleep 3; }; }; setNightSpeedFnc = { setTimeMultiplier 60; waitUntil { _hour = (date select 3); if (_hour == _sunRiseHour) exitWith {call setDaySpeedFnc;}; sleep 3; }; }; _sunRiseSet = date call BIS_fnc_sunriseSunsetTime; _sunRiseHour = round (_sunRiseSet select 0); _sunSetHour = round (_sunRiseSet select 1); _time = time + 1200; waitUntil{time >= _time; sleep 1}; call setDaySpeedFnc;
  18. yea. depending on where its executed from you may want to use the spawn command just incase _h = []spawn { _time = time + 1200; waitUntil{time >= _time; sleep 1}; };
  19. something like this, run this on the server somewhere, once the time hits 19/7pm it switches to night time speed, once it hits 5/5am it switches to day time speed. when this script executes make sure it is day time, if it is night time when this script first executes then change call setDaySpeeFnc to call setNightSpeedFnc or else you have to wait an entire cycle before it sets the correct time multiplier setDaySpeedFnc = { setTimeMultiplier 30; waitUntil { _hour = (date select 3); if (_hour == _sunSetHour) exitWith {call setNightSpeedFnc;}; sleep 3; }; }; setNightSpeedFnc = { setTimeMultiplier 60; waitUntil { _hour = (date select 3); if (_hour == _sunRiseHour) exitWith {call setDaySpeedFnc;}; sleep 3; }; }; _sunRiseSet = date call BIS_fnc_sunriseSunsetTime; _sunRiseHour = round (_sunRiseSet select 0); _sunSetHour = round (_sunRiseSet select 1); call setDaySpeedFnc;
  20. just run this on the server, every 5 seconds if checks if the player has any weapons both primary/secondary, if the player does not have any weapons then it sets the players captive state to true, if he does have weapons it sets the players captive states to false _h = []spawn { while {true} do { { if ((primaryWeapon _x) == "" && (secondaryWeapon _x) == "") then { _x setCaptive true; } else { _x setCaptive false; }; } forEach allPlayers; sleep 5; }; };
  21. There has been a few things that I have seen on the wiki page that have little to no information about them and I would like to start contributing to those pages, however when I tried to create a login i was prompted with this message "Registraion of new accounts for the Community Wiki has been temporarily suspended. We apologize for the inconvenience" Is there any other way I can create an account to do this?
  22. gokitty1199

    Just another ARMA 3 review

    wait until you explore the editor as well :)
  23. gokitty1199

    Huron Fuel Container

    im not exactly sure what the huron fuel container is, is it like a normal fuel source that you can refuel from? you can probably use this https://community.bistudio.com/wiki/setFuelCargo to refuel it. one simple way to refuel it would be to put a trigger around a gas station or whatever you want to use for the visual refueling part and have it detect the container so it adds a action to the fuel container saying something like this in the activation box fuelAction = huronFuelContainer addAction ["Refill container", {handleFuelScript = [] execVM "refuel.sqf"; and this in the deactivation box huronFuelContainer removeAction fuelAction; terminate handleFuelScript; inside refuel you can have a loop that continually gets/sets the fuel for the vehicle every few seconds, if you want you can get the players that are inside the array when the truck is set to get fuel and have it hint out to the players there what the fuel level is at kind of like so _fuelAmount = getFuelCargo huronFuelContainer; _playersInTrg = allPlayers inAreaArray triggerName; while {_fuelAmount < 1 && alive huronFuelContainer} do { _fuelAmount = getFuelCargo huronFuelContainer; if (_fuelAmount < 1) then { { [format ["Fuel at %1", _fuelAmount]] remoteExec ["hint", _x, true]; } forEach _playersInTrg; } else { { "Vehicle refueled" remoteExec ["hint", _x, true]; } forEach _playersInTrg; }; _newFuel = _fuelAmount + 0.1; huronFuelContainer setFuelCargo _newFuel; sleep 5; };
  24. gotcha thank you, thats how its setup but i just wanted to make sure the player could not simply *break out* of the surrender animation.
  25. 2 questions. 1. I have never really tried much with animations before but i have tried [player, "REPAIR_VEH_KNEEL", "ASIS"] call BIS_fnc_ambientAnim; without any luck, it doesnt do the animation either it just freezes me in place. im trying to have it setup so that when a player clicks a certain addAction it starts the animation and has the option to breakout of the animation as well kind of like how it is in the mission wasteland when you repair a vehicle. 2. not really a scripting question, but if i run this on the player _unit playmove "AmovPercMstpSsurWnonDnon"; does the player have the ability to *unsurrender* himself by pressing a certain key on their keyboard, or is the only way to break the player out of it by doing _unit playMove "";? i dont want the player to be able to break out of it and i have tried as many keys as i can think of but i just want to make sure that the only way to get out of that animation is to use _unit playMove "";
×