-
Content Count
1224 -
Joined
-
Last visited
-
Medals
Everything posted by dreadedentity
-
Ferrying Squad Help
dreadedentity replied to strannix's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'm far from an expert, but I don't mind helping you out. I've got writer's block at the moment (scripter's block???). -
Multiplayer kill counter
dreadedentity replied to cerberusjin's topic in ARMA 3 - MISSION EDITING & SCRIPTING
When I look back at it, sideChat wasn't really the best way to do this, it says it doesn't broadcast but I'm pretty sure it does send a sidechat message to all players on that team. Anyway, sideChat requires a real unit to actually chat so you need to spawn a unit with the name you are using or put one down in the editor and name it. If you were going to use my event handler code, you would replace your event handler code with that. (simply copy+pasting that into the INIT field of each unit will work, make sure you uncomment the dead counter for whichever side the unit is on. To answer your 2 questions: _this select 1 refers to the unit that killed the unit that the "killed" event handler is attached to (the killer, if my explanation was confusing). If a player teamkills, that player's score and his team will still be incremented by 1, you'll need to add your own teamkill checking and result. Click this. On the right side you'll see unit and killer. Unit is _this select 0 and killer is _this select 1 Hope that helps clear up my last post. -
How do I deactivate this loop?
dreadedentity replied to CapBlackShot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
So which loop specifically are you trying to exit? Also, not sure why commenting a sleep command would give you an error. Make sure you use a double slash to comment // -
Back to Arma 3 - Still poor performance?
dreadedentity replied to shankly1985's topic in ARMA 3 - TROUBLESHOOTING
The desync is strong when you are not the driver. I'm sure this has something to do with reducing bandwidth for people that don't really need an exact picture of what's happening, so you get updates less often than the driver. It happened in Arma 2 also. Are we talking editor? Single player? Or Multiplayer? I guess it's not entirely accurate to say that I've never seen less than 50fps in Arma 3, I've been playing since release-day. Now, that was seriously unoptimized. You guys have it easy. When I bought the alpha, I was getting 15 fps in the one campaign mission that existed, with lower settings than what I use today. But that could also be because I had a computer much less capable than my current one that I custom-built to get rid of that old piece of crap. -
How far does "exitWith" actually exit?
dreadedentity replied to Heeeere's johnny!'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
This is awkward, I hope all this controversy didn't spawn from my comment in this thread: Script error or wrong logic? Respawn AI when all are killed Also, you can see me talking all kinds of bull, and then Larrow comes in and school's me. Why not just use a while loop in the lower scope? Or both? It's only like 2 lines of code you need to add and you never need to use any breakouts. I remember back when I was learning really "how" to program using TI-BASIC (yes, on one of those graphic calculators) while loops had significant performance loss, testing showed that "for" loops that you reset the counting value to run indefinitely could run 2x faster than a while loop (in TI-BASIC you were able to manipulate the counting variable, resetting it to 0. Not sure if that's possible in a legitimate programming language), but for a real computer I wonder if there's any difference in performance? tldr; breakouts are foreign and I don't trust them. -
Ferrying Squad Help
dreadedentity replied to strannix's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Sorry for not getting back to you on this, I was still learning the in's and out's of arma's syntax structure. You need to use a double equals (==) instead of a single one. -
Multiplayer kill counter
dreadedentity replied to cerberusjin's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello everyone, I believe your problem here is that you are using the "killed" event handler incorrectly. It seems you are checking for a death, and then incrementing the player's score based on a made up variable. There are scripting commands already implemented to increment score. Important: The "killed" and "MPkilled" event handler can actually check which player killed another player. (_this select 1) Try adding this to your units, whenever you add event handlers to them: this addEventHandler ["MPkilled", { _this select 1 addScore 1; side _this select 1 addScoreSide 1; chat sideChat format["%1 has killed an enemy", name _this select 1]; //place a unit in editor named "chat" // westDead = westDead + [_this select 0]; //make sure you define these at the beginning of the script. westDead = []; for example // eastDead = eastDead + ]_this select 0]; // guerDead = guerDead + [_this select 0]; // civDead = civDead + [_this select 0]; //Uncomment whichever side you want to check for. The array returns OBJECTS (for ease, you can think of them as the names of the units that died. To access a total you need to use "count westDead" for example). }]; //I purposefully did not add parenthesis in this snippet to show places where they are not needed. This code should still work just fine. In this example, they are for the coder ONLY. Players can then press "I" in game (default key) to show the scorebox (I believe this is multiplayer only). If you really need to check the number of players on each side that died it's a lot more complicated and I still haven't come up with a way to do this yet. The reason for that is because when a unit dies, it's side changes to civ, yet you can't check which side it was originally on when you use the "killed" event handler (it only returns 2 arguments, and neither of them are the killed unit's original side). Also, "if" statements absolutely require parenthesis. Tested by removing a few parenthesis from my simple patrol script: if floor random 2 == 0 then { _posInTrigger set [0, (random (_params select 0))]; } else { _posInTrigger set [0, -(random (_params select 0))]; }; Error is "Type Number, Expected Bool". Off topic, but I saw it mentioned in the thread, so I thought I'd throw my 2 cents. -
AI acting weird since 1.28?
dreadedentity replied to IndeedPete's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I've noticed that the AI in the game don't seem to know about other friendly AI and will call out when they see them, and get battle-ready -
Dread's Simple Patrol Script
dreadedentity replied to dreadedentity's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I already checked there but there are no BIS_fnc function's in the editor, so I thought I'll have to go searching and extract a pbo to get access to those scripts. EDIT: Nevermind, derp. -
Dread's Simple Patrol Script
dreadedentity replied to dreadedentity's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks guys, I'll look into adding those. Larrow, do you know where the code for randomPosTrigger is? I'm having trouble getting it integrated and I want to take a look at the actual script. I already have a pbo manager to decompile. -
disableAI "move" and setunitpos do not work!
dreadedentity replied to The Hebrew Hammer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Tested again, using the same method I posted earlier in this thread. Confirming disableAI works just fine as of September 5th, 2014 6:23 US Eastern -
I just got done looking through a ton of BIS animations. "AwopPercMstpSgthWnonDnon_end" looks kind of like a pistol-whip. "AwopPercMstpSgthWrflDnon_End1" and "AwopPercMstpSgthWrflDnon_End2" look kind of like a judo chop haha. You can view all the animations by putting down a trigger in the editor with [] call BIS_fnc_animViewer; in the On. Act field and then walking into it. Found those animations under "Operate a weapon", "Erect", "Grenade Throw", then for the first one choose "Nothing" and for the second 2 animations choose "Rifle".
-
Array of players in game
dreadedentity replied to BEAKSBY's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ah, you're right. I got a little confused with the syntax, I guess. I'm used to working with throwaway arrays when I use forEach. Something like: { } forEach [1,2,3,4,5]; Thanks for that catch ---------- Post added at 17:25 ---------- Previous post was at 16:44 ---------- Just wondering if this code would work: _west = []; _east = []; _guer = []; _civ = []; { if (isPlayer _x) then { missionNamespace setVariable [format["_%1", side _x], call compile format ["_%1 = _%1 + %2;", side _x, _x]]; }; } forEach playableUnits; I know we shouldn't really use call compile because of it's slow speed, but I was wondering if I can use it nested in setVariable like that. -
disableAI "move" and setunitpos do not work!
dreadedentity replied to The Hebrew Hammer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Maybe the commands need to be executed locally to the unit? I can take a look at your script but you'll need to post it. -
Array of players in game
dreadedentity replied to BEAKSBY's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks, edited original comment. -
Array of players in game
dreadedentity replied to BEAKSBY's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_west = []; _east = []; _guer = []; _civ = []; { if (isPlayer (playableUnits select (_x - 1))) then { if (side playableUnits select (_x - 1) == west) then { _west set [(count _west), playableUnits select (_x - 1)]; }; if (side playeableUnits select (_x - 1) == east) then { _east set [(count _east), playableUnits select (_x - 1)]; }; // if (side playableUnits select (_x - 1) == guer) then // { // _guer set [(count _guer), playableUnits select (_x - 1)]; // }; if (side playableUnits select (_x - 1) == indep) then { _guer set [(count _guer), playableUnits select (_x - 1)]; }; if (side playableUnits select (_x - 1) == civ) then { _civ set [(count _civ), playableUnits select (_x - 1)]; }; }; } forEach playableUnits; //_allPlayers = _west + _east + _guer + _civ; //Uncomment to return an array with all human players -
Something I think is important to note when dealing with AI groups
dreadedentity replied to dreadedentity's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Not entirely true, like I said in the original post, the units get taken out of the group slowly, and then it turns null when there's no more units in it. However, this is extremely slow so you should add an event handler "killed" for each unit and use the code {[_this select 0] joinSilent grpNull;} So what you can do with this is after that first code you can add more stuff to do when the unit gets killed, like increment score or something. Example: _unit addEventHandler ["killed", { [_this select 0] joinSilent grpNull; _this select 1 addScore 1; //adds 1 point to the unit that killed him }]; Not sure it that helps you at all, but if you tell me more about what exactly you're trying to do, I might be able to come up with something. -
How to remove certain number of items from a vehicle / crate?
dreadedentity replied to Undeceived's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Clear the vehicle's cargo before you add stuff to it. -
Back to Arma 3 - Still poor performance?
dreadedentity replied to shankly1985's topic in ARMA 3 - TROUBLESHOOTING
Go with the latest Intel-released CPU's. I'll highlight the main differences between Intel and AMD processors: Intel: 1. First and foremost, roughly double the cost of an equally-capable AMD processor. 2. Not all of their releases have hyperthreading. You want one with it. You should see vast improvements when playing on servers that run tons of background processes. 3. Real, actual, physical cores. 4. Better, more efficient architecture. 5. Usually less cores than a similarly-spec'ed AMD processor. AMD: 1. Roughly half the cost of a similarly-capable Intel processor. 2. No hyperthreading. They have a similar solution, called hypertransport but I haven't heard much of anything about it. 3. Core "modules", not real cores. I seem to remember that 2 modules share processing power, but each module is listed as a separate core under specifications. I need to do more research about them and you should as well. 4. Weaker architecture. A similarly-spec'ed AMD processor will require a few more cycles to run the same calculations. You can overclock to match the speed of an Intel processor, but then you need to run your fans at higher speeds or buy an aftermarket cooling solution to deal with the extra heat. Also, you will be drawing more power from your power supply, but it's not that much more expensive. 5. More cores than a similarly-spec'ed Intel processor. Although weaker, and most modern games only support up to 4 cores, having extra cores can increase performance in other areas like running background processes like recording while playing, listening to music, or streaming gameplay. My processor is an i5-4670k non-hyperthreaded and without overclocking at all and I only see major performance loss if a leave a loop open while scripting, I haven't ever seen less than 50fps during normal gameplay in Arma 3. This is because in combination with the things I said in my last post, I also keep my computer free of any crap background programs, those seriously kill a CPU's strength. -
Keep your powder dry
dreadedentity replied to six_ten's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I've never added items/models to the game so I don't know the process, but it sounds like if you did that the ammo would only think it's wet if you dropped it so it turns it into an item on the ground. Checking whether the player is wet or not and if he has powder is likely the easier, and most reliable way. -
disableAI "move" and setunitpos do not work!
dreadedentity replied to The Hebrew Hammer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I don't know what ASR is, so I'm not sure how much this mod improves vanilla gameplay. But you could consider removing it if you want to design missions. Or you can send a note to the author that these commands are not working while using his mod/addon. To keep units standing up, try giving them an event handler that forces them to stand whenever they aren't. this addEventHandler ["AnimChanged", { if (_this select 1 != "NAME OF STANDING ANIMATION") then { (_this select 0) setUnitPos "UP"; }; }]; Good luck -
How to setVehicleAmmo to remote vehicles
dreadedentity replied to BEAKSBY's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Not sure what you mean -
Keep your powder dry
dreadedentity replied to six_ten's topic in ARMA 3 - MISSION EDITING & SCRIPTING
What I meant was when you make a new item for the powder, you should make it as a grenade so it will be displayed underneath the weapon ammo so you can quickly and easily see how much you have left, because they are grenades and they will go into the grenade counter that is below the normal weapon ammunition count. Then in a script you can make it so some of the powder is used when you reload. It sounds pretty interesting, I think I'd like to play it when you finish -
Back to Arma 3 - Still poor performance?
dreadedentity replied to shankly1985's topic in ARMA 3 - TROUBLESHOOTING
The i7 2600k was the first in the Sandy Bridge line to be released. While still being quite capable, it is simply not as good as later generations and all the Arma titles have been extremely CPU-intensive. Your startup parameters have an effect on performance also, for example all I have in mine is "-noSplash -skipIntro -showScriptErrors". I tried setting some of those advanced settings like maxMem exThread and cpuCount, but it killed my FPS (by the way, you forgot to define how many threads you have in "exThread"). You mentioned 50fps as your max, if this is really true then I am getting better FPS than you 100% of the time and with a less powerful computer. Unpark your cores. For some reason, when you buy a CPU, your extra cores can be "parked" which means what it sounds like, they are not running at their full capacity. There are plenty of tools you can download to unpark your cores so I'm just going to tell you to search google for that. Also remember that the servers you play on have a huge effect on your FPS, if you play on a server that runs tons of unoptimized scripts and wastes your computers processing power that will kill your FPS faster than drawing shadows or calculating anti-aliasing (bad joke, shadows and anti-aliasing are the heaviest processes computers do in games). Lastly, you just need to get over your pride and turn your settings down. You don't need x8 anti-aliasing, you don't need a 12km render distance, you don't need high texture details, and you definitely don't need shadows. In fact, I play with shadows disabled and shadow visibility at it's minimum of 50 meters. It's a setting that will actually make you worse since everybody else turns shadows off anyway. You think you're safe under that tree, but you're not. -
ArmA 3 Mod Documetation?
dreadedentity replied to CommuneCode's topic in ARMA 3 - QUESTIONS & ANSWERS
Look in my signature, I just added them. If it hasn't shown up yet, here's: All Scripting Commands Grouped by Functionality All BIS Functions Grouped by Functionality When you say "modding" I assume you mean making your own missions or games. These pages (and you're imagination) are pretty much all you need to make those things.