-
Content Count
275 -
Joined
-
Last visited
-
Medals
Posts posted by wyattwic
-
-
Is there any way to restrict it by location? This appears to do all destroyed vehicles and people.
Thank you
EDIT: Solved it! Thank you!
while {true} do { {deleteVehicle _x} forEach allDeadMen in list Base; {if (damage _x == 1) then { deleteVehicle _x};} forEach vehicles in list Base; sleep 10; }; -
Both preferably but vehicles are what I need taken care of the most.
-
Hello everyone,
I have been having a hard time figuring out the best way of removing dead units from a trigger. So far, what would seem the simplest and correct way to go has proven intermittent, along with other attempts.
Currently, the best I have been able to come up with was to have the server execute the following code. The results were intermittent, only working 75% of the time.
"Base" is a trigger set with "this" as a condition on repetitive.
while {true} do { {if !(alive _x) then {deleteVehicle _x}} foreach list Base; };Any ideas or suggestions would be loved! Thank you.
-
Here is the updated version. Its tested and appears to be working. I hope it helps someone.
-
1
-
-
Thanks dude.
I am incredibly pissed at myself. Drunk me was writing the code into the init file on a backup of the project. Sober me barely realized this. Damnit.
-
That I understand, my issue is that while the rest of the script as is works fine, the section that is adding the -50 rating does not function. Bullets are deleted without issue.
I am still trying to find a solution, but no errors or results yet.
-
Ill have to do some research on settimemultiplier. This script was from my archives (dated 1/22/2014).
I did some testing on it and it appears that the inital set system time does not work well. Ill have to re-code it some.
In the meantime guys, I would not consider this a working script.
-
Hello everyone,
I am having a hard time finding out why the addrating portion of the below script wont work. I have not had much luck.
player addeventhandler ["fired",{ if (vehicle (_this select 0) in list base ) then {vehicle (_this select 0) addrating -50; deleteVehicle (_this select 6)};}];Any help would be very enjoyed.
-
Hey guys,
Today I am releasing the stable version of my simple time management script.
This script provides three functions.
- Synchronize client date/time every ten minutes to avoid day/night mismatch.
- "Short days". This allows you speed up night or day independently.
- "Fast time". Allows you speed up time.
Here is the download link for the SQF file.
https://dl.dropboxusercontent.com/u/61911880/timekeeper2.sqf
Version 1, Does not work but is here for historical.
https://dl.dropboxusercontent.com/u/61911880/timekeeper2.sqf
Please, any errors or improvement suggestions would be awesome!
-Wyatt
Here is the code, if you want to look at it without downloading.
//Wyatt's time management script /* Disambiguation: This script is made to manage a few key game play features. - Game starting time - Fast time (We will use setdate to avoid clouds skipping around) Start time: I want to keep this option simple. I will give them the options of sunrise, noon, sunset, midnight. Fast time: I know there has to be over a dozen different published ways to forward through time. This script uses the more complex setdate wich in contrast to skiptime, advances players through time without the lower clouds jumping around. Forecast and clouds generated by the default weather system are not effected. Important notes and operation methodology: This script must be started via the global init file as it must be ran on the server as well as the client. This script causes the server and clients to calculate the required advance in time every minute. Every ten minutes the server pushes its time to the clients to insure everyone sees the same time. JIP clients will start at the time last broadcasted and will be updated on the next broadcast. To operate, the following variables are required. They are not defined in this script. starttime - Starting hour. This should be between 0 and 23. Suggested intergers are 6,12,18,0. Sunrize, Midday, Sunset, Midnight. fasttime - Time acceleration. This can be any positive intiger. Suggested values are 0,4,8,24,48. Disabled, 6 hour days, 3 hour days, 1 hour days, half hour days. shorttime - This option allows you to shorten days or nights in specific. Allowed values are 0,1,2. Normal, Half days, Half nights. rundebug - This option allows the script to dump error messages in relation to its operation into the rpt file. */ private ["_date","_tm"];//Set game time in accordance to parameters. JIP ready! XD if (isServer) then { PublicServerTime = date; PublicServerTime set [3,starttime]; publicvariable "PublicServerTime"; setdate PublicServerTime; settimemultiplier fasttime; if (rundebug) then {diag_log text format["timekeeper.sqf - Server - Initial time sync has been pushed to clients as hour %1. Fast time is %2 ",PublicServerTime select 3,fasttime];}; }; if (!isServer) then { waituntil {!isnil "PublicServerTime"}; setdate PublicServerTime; "PublicServerTime" addPublicVariableEventHandler { setdate PublicServerTime; if (rundebug) then {diag_log text format["timekeeper.sqf - Client - Time sync completed with server"];}; }; if (rundebug) then {diag_log text format["timekeeper.sqf - Client - Initial time sync completed with server - %1", PublicServerTime select 3];}; }; if (isserver) then { _ct = 0; if (shorttime == 0) then { if (rundebug) then {diag_log text format["timekeeper.sqf - Server - Short time has been disabled. - TM %1 - FT %2",timeMultiplier,fasttime];}; }; while {isserver} do { _ct = _ct + 1; sleep 60; //Every 10 minutes, the server will trigger the clients to update their time. if (_ct >= 10) then { PublicServerTime = date; publicVariable "PublicServerTime"; setdate PublicServerTime; if (rundebug) then {diag_log text format["timekeeper.sqf - Server - Time sync has been pushed to clients as hour %1.",PublicServerTime select 3];}; }; //Short days if (shorttime == 1) then { if (daytime > 6 && daytime < 18) then { //The sun is up _ft = fasttime + fasttime; setTimeMultiplier _ft; if (rundebug) then {diag_log text format["timekeeper.sqf - Server - Short day has been activated. - TM %1 - FT %2",timeMultiplier,fasttime];}; } else { //The sun is down setTimeMultiplier fasttime; if (rundebug) then {diag_log text format["timekeeper.sqf - Server - Short day has been de-activated. - TM %1 - FT %2",timeMultiplier,fasttime];}; }; }; //Short Nights if (shorttime == 2) then { if (daytime > 6 && daytime < 18) then { //The sun is up setTimeMultiplier fasttime; if (rundebug) then {diag_log text format["timekeeper.sqf - Server - Short night has been de-activated. - TM %1 - FT %2",timeMultiplier,fasttime];}; } else { //The sun is down _ft = fasttime + fasttime; setTimeMultiplier _ft; if (rundebug) then {diag_log text format["timekeeper.sqf - Server - Short night has been activated. - TM %1 - FT %2",timeMultiplier,fasttime];}; }; }; if (rundebug) then {diag_log text format["timekeeper.sqf - Server - Server loop completed - TM %1 - FT %2 - CT %3",timeMultiplier,fasttime,_ct];}; }; };-
2
-
Hello all,
I wanted to share a handy snipplet with everyone! I have no clue where it came from, or when I made it (if I did make it). This snippet will convert all mission parameters into global variables in almost any mission. It is best used at the beginning of init.sqf
Hope it helps! If you see any bugs in the code, let me know!
//Wyatt 6/8/14 //Settings document. //Converts all mission parameters into global variables for use. if (isNil "paramsArray") then { if (isClass (missionConfigFile/"Params")) then { for "_i" from 0 to (count (missionConfigFile/"Params") - 1) do { _paramName = configName ((missionConfigFile >> "Params") select _i); missionNamespace setVariable [_paramName, getNumber (missionConfigFile >> "Params" >> _paramName >> "default")]; }; }; } else { for "_i" from 0 to (count paramsArray - 1) do { missionNamespace setVariable [configName ((missionConfigFile >> "Params") select _i), paramsArray select _i]; }; }; -
Okay, I realize that my goal was not all that clear. My question should probably be chocked up to, has anyone tested to see if setplayable is working post update? I am somewhat lacking on available assistance at the moment to test this.
-
In my research I came acrost a feedback issue. Does anyone know if this was resolved with the last patch? I didn't see anything in the change log on it.
-
Hello everyone!
I am having a hard time finding out how to add or remove playable slots mid game. Would anyone be able to point me in the right direction?
My goal is to make more roles available as a server fills up, to avoid having a raging abundance of pilots for no good reason.
Thank you!
-
Hello everyone!
Todays question is on bullet information.
The fired event handler provides the ability to interfere with bullets via "(_this select 6)" however if the bullet is replaced with another round, its ownership information doesn't get delivered with the new shell.
Would anyone happen to have any information on the sub array for the bullet? Given its short lifespan I am having a hard time figuring out what to change so that modified bullets provide proper "damage delt by" information.
Here is an example worded out, just in case my grammer went to hell -
Player 1 shoots at player 2 with a MXC. Damage is recorded as being delt by Player 1.
Player 1 shoots at player 2 with a modified MXC that is delivering 155mm howitzer shells. Damage is recorded as being delt by a unoccupied vehicle.
Now, a MXC that shoots 155mm arty is OP as hell, and the ragdoll is funny as hell, but you get the example.
Help is appricated!
-
Hello,
A friend of mine approached me the other day asking how to get a up to date copy of glibc and its associated packages on Ubuntu 12.04 for use with extdb. The easiest solution would be to update your OS to the latest stable, however this is not an option in most VMs.
Ubuntu 12.04 (Codename "Precise") has glibc version 2.13 available via the repositories, while extdb requires at least version 2.18. This tutorial (more like me stammering drunk with notes) will cover installing version 2.21 or better, depending on what year your reading this. This tutorial assumes your using SSH.
Step 1
With your favorate text editor, open /etc/apt/sources.list as sudo/root. Below is an example if you use vim.
sudo su root -c "vi /etc/apt/sources.list"
Step 2
At the end of the file, add the following line to the document. We will be deleting this after we get what we need.
deb http://archive.ubuntu.com/ubuntu vivid main restricted universe
Save and close.
Step 3
Lets get to updating our sources. DO NOT UPGRADE unless you know what your doing. In most VM enviorments, mainly VZPP, a distribution upgrade will not be compatible within the system. Why they do this, sometimes it feels like its just to piss me off.
Lets get started. Run the following commands.
sudo apt-get update sudo apt-get -y install libtirpc1 libnih-dbus1 libnih1 libc6-i386 libc6 libc6:i386
At this point we have updated the above packages to the newest available to the vivid release - At the time of this writing, version 2.21. For clarification, of the six above, 5 are dependedancies for our libc6 package.
Step 4
Lets clean up! For safety sake, go back to step 2 and remove that line from the sources.list. Afterwards run "sudo apt-get update" and your back to normal.
I hope this helps someone, this has been tested to be working on Ubuntu 12.04 with your run-of-the-mill Altis Life server, however I will be testing this with Version 67 of extdb soon!
-
1
-
-
Hello,
How would one have groups of respawn positions presented in MenuPosition for a player to choose from?
My hope is to have 5 sets of 3 markers, when a set is selected a random marker from that set is used for spawning.
Does the MenuPosition respawn template (BIS_fnc_respawnMenuPosition) even support it? It doesn't appear that way, but I could have missed something. If so, how?
----
All markers that need to be grouped and randomly selected from on the menuposition screen should have the same name. I guess it would be possible to make a custom version of BIS_fnc_respawnMenuPosition with it, if its not currently possible.
-
Damn PuFu, your mean this morning. I like it
In all seriousness though lifemanlive, no one is going to help you with that attitude. I was going to try and help out if I could github it but meh, not worth it.
On the models, I personally enjoy grabcad.com and cadblocksfree.com - Majority of them are in other formats so it does take time to convert them to a usable format.
-
Try posting it up on github that way people can know what they are up against. The beauty is that anyone can make a fork from what you have, and if its good, use it.
Me honestly, I wouldn't look at someone elses project unless I had a detailed project management flow and a idea as to where we are at.
-
Thanks, that helps. It slipped my mind that we had allgroups.
-
The 144 group limit got to me on a script I was working on, and I just wanted to share the fruits of my labor.
_temp = createGroup EAST; //Create a EAST group. Replace with variable as needed. [this] joinSilent _temp; //Join the newly created group. [this] joinSilent grpNull; //Get out of the newly created group deleteGroup _temp; //KILL THE NEWLY CREATED GROUP!
This allows you to change the sides of players and AI without fear of sooner or later hitting the max group limit, and without actually grouping people for AI/command purposes. In my situation large groups of roaming AI caused issues, this took care of it.
If anyone can think of a better way, im all ears, otherwise I hope it helps someone. It took me longer than I care to admit to come up with this.
-
Thanks Jshock,
No errors this time, but no results either. Seems something may be wrong with my onact too.
-
Hey guys, these forums help me out quite a bit so I figured I would contribute a bit too. It took me longer to perfect this snipplet than I care to admit, but if it helps someone else out, im happy.
Below is a simple holster/unholster script for players. Note that it has not been tested with AI.
This snipplet should be placed in the onPlayerRespawn.sqf event script. If if respawnOnStart is 0 or 1, this should take care of implimenting it completely.
_unit addAction [ "Holster", {(_this select 1) action ["SwitchWeapon",(_this select 1),(_this select 1),100];}, true, 1, false, false, "", "(!(currentWeapon _target == '') && (count weapons player > 0))" ]; _unit addAction [ "Un-holster", {(_this select 1) action ["SwitchWeapon",(_this select 1),(_this select 1),0];}, //EDITed 9/18 - Apparently not all guns like using "1", "0" works better. true, 1, false, false, "", "((currentWeapon _target == '') && (count weapons player > 0))" ];-
2
-
-
Hello,
I am attempting to detect housing within a trigger, and if one of the models selected it should place a marker overhead. I dont seem to be getting any errors, however it is not doing anything.
Any insight would be helpful.
Type None
Activation Anybody
Once
Present
Condition
this iskindof "i_house_big_02_v2_f" || this iskindof "i_house_big_02_v3_f" || this iskindof "i_house_big_01_v2_f" || this iskindof "i_house_small_02_v1_f" || this iskindof "i_house_small_01_v2_f" || this iskindof "i_garage_v1_f"
On Act.
{createmarker [_temp,position _x]; _temp setmarkertype "Dot";} foreach thislist; -
The addAction condition is handled by the engine and is executed on each frame in unscheduled environment (call), so of course there must not be any sleep in there. Why would you want to do that anyways?
Yes
Putting (_target == _this) into the condition is not needed if you add the action to the player object, because as the BIKI says it, the "[c]reated action is only available on the computer where command was executed." So in your case, _target is already _this.
Thanks Johnny, reason why I would like a sleep in there is because the conditional does not need to be checked every frame. When its all said and done with, I need to be running as lean as possible.
When it comes to locality, in this specific instance it is local client, but what happens when its added to the player by the server?
Help needed - Removing dead vehicles from trigger area
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted
Okay, forget that edit. Both of our iterations of the script target all wrecks. Any ideas?