Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

profcupcake

Member
  • Content Count

    99
  • Joined

  • Last visited

  • Medals

Everything posted by profcupcake

  1. Is there any easy way to find a vehicle ammo value for any given vehicle as a value between 0 and 1? I.E. Like the value you would enter for setVehicleAmmo. Failing that, how would I go about finding the max. ammo for any given vehicle's weapons? That way I could try something like this: (Total ammo in vehicle)/(maximum ammo for vehicle)
  2. profcupcake

    Dead Simple Tracker Markers Script

    That is a solution for making 1 mark. This script offloads that entire process, allowing you to make and delete as many marks as you want all around a mission. Think of it like offloading repeated operations to an external function. Keep your code dry and all that. It also unifies them, bringing them all into the same update loop, which should make things a lot more efficient than having a separate loop for each mark. That is a solution for making 1 mark. This script offloads that entire process, allowing you to make and delete as many marks as you want all around a mission. Think of it like offloading repeated operations to an external function. Keep your code dry and all that.
  3. Hey, look, I released another script. I don't know how long it's been. I'm still keeping up the three-sentence gag though, so this one is going to have to be really extended so that I can explain that this is a script to make some map markers track units. KNOWN ISSUES None. (yay)Download Link
  4. (Or CupMed for short) So I've decided to release the current version of this project I'm working on: a somewhat simple, but more complex than default, medical system script. Currently, this version of it is just barely functional, with (most of) the core systems in place and nothing else. It's in an okay state to be used in missions at the moment, but be aware that there are still a few core systems that have yet to be implemented. This is an attempt to provide a middle ground between A3's default medical system and the rather complex systems featured in such things as ACE. Since I couldn't find that sort of thing already made, I decided to make it myself. To try and keep things going as they should, I set out a few design philosophy points to follow. These are the following:- In reality, humans are easy to injure, but surprisingly hard to kill. The system should emulate this. It should be simple on the frontend without compromising depth or gameplay. Each part of it must have a good reason for being there. No guff. Abstractions can, and inevitably will, be made for the sake of gameplay. Make sure that the Medikit is useful to the common soldier, but there are still worthy bonuses to being a proper medic. So, with that in mind, just what the hell does it actually do? Allow me to give a basic explanation. THE "BASIC" EXPLANATION The default A3 damage system has been effectively disabled. Instead, it all goes through the script, and instead of the damage value being the major vital, it is now "blood level" (don't go taking that too literally). When you are hit, you lose some blood instantly, and also increase your bleed rate. There are two ways to reduce your bleed rate. There are "patches" which require (and consume) a FAK, which will partially reduce the bleed rate, and there are bandages, which require a Medikit, and will reduce the bleed rate to 0. The only way to increase your blood level again is to wait - it will (very) slowly regenerate over time. If you are a medic and have a Medikit, you can use an injection to temporarily increase the rate at which you (or others) regenerate. Be careful, though - if you are bleeding, it will also greatly increase bleed rate. Additionally, too much of the injection will knock you unconscious until your regeneration rate returns to a normal-ish level. This brings me nicely onto unconsciousness. There are 3 ways to be knocked unconscious. The aforementioned 'overdose' is one of them. The other two are when you are hit, and when you are bleeding. When you are hit, there is a chance to be instantly knocked unconscious. When you are bleeding and go below a certain level, there is a chance you will fade into unconsciousness. Both of these are more likely if you are more badly hurt. There are two ways to recover from (non-overdose) unconsciousness: either a medic with a Medikit can revive you instantly, or there is a chance you will recover automatically if you are no longer bleeding. I think that's pretty much it. MAJOR ISSUES Wait, there are no major issues? Weird. Guess nobody has found them yet. MINOR ISSUES disableuserinput quirks. The feedback for when you're injured could use some tweaking. You currently take bleeding damage from things that shouldn't make you bleed, such as falling. TODO (Those marked with an asterisk are currently being worked on, or in other words, can be expected in the next update) Action for medics to check people's vitals Carrying unconscious people Injured effects (primarily gameplay-wise, then visual effects later) *Work out a way of dealing with unconsciousness when in a vehicle Tweaking. Lots of tweaking. A readme or something AI support TO BE DECIDED Add an inverse to the injection, to assist in recovering from overdose? Implement a "special" type of unconsciousness, so that external scripts can use it? (e.g. rifle-butting a prisoner to knock them out) Download link Armaholic page With great credit to farooqaaa, as without him I probably wouldn't know how to do any of this.
  5. So this is annoying me, and I've decided to see if anyone else has any ideas about this. The following line is throwing "generic error in expression"... waitUntil {!isNil {_this getVariable "CUPMOVE_recordedArray"}}; I have looked over everything I could think that would be relevant to it, and come up with nothing. As far as I can see, this code should be working, but it throws "generic error" when it runs. Does anyone know what could be up here?
  6. _this is a unit, which in this context will have been taken from an array and passed to the function by an earlier function. At the start of the mission, these arrays are constructed by adding all of the units to the relevant arrays. It's a messy workaround for the fact that units are switched to different sides after certain events (death, friendly fire, etc.).
  7. profcupcake

    Farooq's Revive

    disableUserInput is the command I was talking about. I keep mistakenly calling it disablePlayerInput because I am a gibbon.
  8. profcupcake

    [WIP] Cupcake's Medical System

    UPDATE - Bleed indicator is now shaped like a drop. - The pain flash now draws on a random layer between 1000 and 2000. This means multiple pain flashes can be on-screen at once, making it less derpy when taking several rounds in quick succession. - Added a vignette effect which gives a rough indication of your blood level. It gets pretty strong as you go down, but then you're also really close to death at that point so I guess it makes sense. - Changed the method for the involuntary weapon firing, and thus re-enabled it. Hopefully it should work now. - Doubled the base regen rate and the maximum regen rate, as it felt too slow to recover. Also, added a base regen rate parameter so you can tweak it if you're brave enough. - There are now snarky messages randomly displayed while unconscious. This is mainly to make unconsciousness less boring. I understand that this may seem a bit silly for more serious situations, so feel free to disable them by setting "CUPMED_snarkChance" to 0 in the init. - If you go unconscious via an overdose, it tells you how long it will be before your regen rate is below the maximum. - A few tweaks/fixes here and there, most of which I have forgotten and probably aren't worth listing anyway. Vehicle unconsciousness was meant to be a part of this update, but I had some trouble testing it so it's now the sole feature of the next update. On the bright side, this means that it will be far more polished in that update than it was going to be in this. Setting it up is going to be a lot of busywork, so having it as the sole focus means I can get it out of the way slightly quicker than I perhaps would have otherwise. ---------- Post added at 17:49 ---------- Previous post was at 16:54 ---------- MINI-UPDATE - Changed the pain flash from a full-screen effect to a vignette effect - Significantly decreased the fade-out time for the pain flash - Fixed a bug where it would draw the pain flash multiple times per hit (didn't notice it before, as it was overwritten each time) - Slightly increased damage taken
  9. profcupcake

    Farooq's Revive

    Farooq is not the most reliable person on these forums, and there's clearly a lot of problems here. I probably know this script just as well as he does at this point, so I'm gonna start solving problems. Wowzers. Welcome to scripting, you're clearly new. Okay, so the first number you changed there has completely broken it. The "select" command simply selects an element from an array; by changing it, it is now selecting the wrong number. Change it back. The second number you've changed has resulted in ANY damage making someone unconscious. 0 damage is fully healed; 1 damage is basically dead. Not the other way around. As to what caused your original problem in the first place, I have no idea. If you have any weapon/damage mods enabled, it's probably those. This script should not be doing that. Try a test mission with no mods or scripts enabled other than Farooq's Revive. ---------- Post added at 14:12 ---------- Previous post was at 14:09 ---------- I'd recommend using playAction instead. There are cases where playMove has an advantage over it, but this is not one of them. The specific actions you're looking for will be "medicStart" and "medicStop". An extra advantage of this is that, with the engine dynamically applying the animation for as long as the action is active, you can have a randomised duration for healing (or, for example, have healing take longer for non-medics). This is, in fact, the exact thing I do in my medical system. Shameless self-advertising. ---------- Post added at 14:14 ---------- Previous post was at 14:12 ---------- It's a quirk of disablePlayerInput. Basically, any keys that were pressed when you got knocked down will act as if they are being constantly held. To stop it, simply press whichever keys are acting as if they are held (e.g. if you are constantly running to the left, you'd probably press A). It's unfixable without a considerable amount of workaround, or possibly the addition of a better command by BI. ---------- Post added at 14:16 ---------- Previous post was at 14:14 ---------- I don't think those variables are present server-side. I'll look into it and come up with a solution within the hour day. I said day. None of you saw "hour" here. Liars. UPDATE: Alright, I've got it. You're going to need to add something to your init.sqf, though. At line 36 of the init.sqf, modify it so that it is as follows: if (isDedicated) exitWith {"FAR_deathMessage" addPublicVariableEventHandler nameOfYourServerSideFunction;}; Then, within your server's function, _this select 1 will point to an array containing the victim's name in index 0 and the killer's name in index 1. To clarify within a script... nameOfYourServerSideFunction = { _victim = _this select 1 select 0; _killer = _this select 1 select 1; // And then from here on you can do your function's stuff as required }; Note that this assumes the server is dedicated. Would that work for you?
  10. Alias: [Take a glance over to the left] Real Name: Marshall Age: 19 Time Zone: GMT Available: Most weeks, THU-SUN, any time really Notable Skills: Adequate helipilot (standard flight model), competent FT leader Notable Weaknesses: Slow to acquire targets (i.e. lining up the shot before firing), generally poor marksmanship Looking For: Semi-serious. No pointless milsim bullshit. Would prefer use of AGM, ACRE and/or JSRS (the latter is client-side, but may be banned by certain server setups).
  11. profcupcake

    Mag Repack

    Bug report: Mag repack does not initialise after loading a saved game.
  12. I am writing a script (guess which) that requires a driver of a vehicle (or gunner or commander) to not be able to control their vehicle for a while. I have looked through what I know and the various places I can actually find info on this, and I could not find a proper method. So, anyone happen to know a way to temporarily disable vehicle controls?
  13. profcupcake

    Disable control of a vehicle?

    I don't want to stop the vehicle, just remove the driver/gunner/commander's control of it.
  14. profcupcake

    [WIP] Cupcake's Medical System

    Time for a GLORIOUS REINCARNATION of this COMPLETELY BROKEN AMAZING SYSTEM which I will PROBABLY FINISH this time MAYBE UPDATE Bet ye forgot about me, eh? - Changed the prefixes of all global variables to meet new standards (from generic "CUP_" to more specific "CUPMED_") - Added a basic "pain flash" effect upon being hit. Duration of effect relative to damage taken. It's pretty sudden and is a full-screen effect, so I guess there's a seizure warning required there. - Added a small indicator (currently just a red square in the lower-centre of the screen) which appears every time you take bleeding damage. Duration related to bleed rate. Temporary fix, yada yada. Note that these changes now require you to add some elements to the description.ext. A description.ext has been provided with the relevant code. Hey look, my solutions are clunky and terrible! It's like I never left. <3 ---------- Post added at 21:23 ---------- Previous post was at 21:16 ---------- It's like Baby's First Displays over here.
  15. Sling-loading has been added as a default feature now. Why are you looking at this? A simple, lightweight script that enables helicopters to carry ground/sea vehicles around. Works for all helicopters and ground/sea vehicles, no matter what, and also includes optional blacklists if you want to restrict certain vehicles. I once again lack a third sentence. KNOWN ISSUES The lifted vehicle has neither physics nor collisions. I don't think there's a way for me to fix this simply. There is no performance impact on the helicopter when lifting. I've basically given up on this for now. Download link Armaholic page
  16. profcupcake

    Dead Simple Helo Lifting Script

    Way to revive a dead thread. On the bright side, this has reminded me that Arma still exists and as such I may actually return to scripting. But yeah, your problem. No idea. Shouldn't be happening. Doesn't for me, after testing. Are you sure it's not a problem with the mission? Or maybe you're using an old version of the script? Or perhaps there's a problem with the specific helicopter that's used in your mission? Other than those, not sure how I can help.
  17. A script that will restrict certain vehicles to certain drivers/gunners/commanders (or pilots/copilots, etc.). If a unit which is not allowed to be the driver, gunner or commander of a vehicle attempts to go into those spots, they are removed, and get a warning message. Two sentences is all my mind can cope with. Download link Armaholic page (Made on request for a squadmate)
  18. Yeah, looks like you missed a } there. Other than that, it seems solid.
  19. profcupcake

    Farooq's Revive

    If they are all in the same group, you could do this: {_x setCaptive true} forEach units GroupOfYourUnits; And if you need to make sure they stay "captive", this should work: { _x spawn { while true do { waitUntil {captive _this == false}; _this setCaptive true; }; }; } forEach units GroupOfYourUnits; Although a better alternative would be to replace the "true" in "while true do" with some variable that you can switch off if required. Still, those should work.
  20. profcupcake

    Farooq's Revive

    Fork'd. I won't be working on that at all any more, on account of CupMed existing and farooq apparently returning, so I'm just leaving it there for anyone to do as they please.
  21. profcupcake

    [WIP] Cupcake's Medical System

    The spinning/autorun thing is an unfortunate quirk of disableuserinput, which is used at the moment the player goes unconscious so that they don't ruin the animations by moving (for example). I'm sure there are better ways of doing it, but it takes a lot more code and I don't quite know how to do it yet. As for not being able to tell you're wounded: I know. I'm (finally) going to (re)start working on it this week. It's probably going to take a while, though, as I'm going to have to learn how to use displays/dialogs/etc., which I currently know absolutely nothing about.
  22. profcupcake

    [WIP] Cupcake's Medical System

    If you just want to know the basics of how to use the editor, there are two main ways most people learn. Either 1: mess around with it and play with random buttons trying to work out what they do (that's how I did it! :D) or 2: have a quick search for the useful tutorials that exist.
  23. profcupcake

    Dead Simple Helo Lifting Script

    Just wait until they discover tank curling.
  24. profcupcake

    Dead Simple Helo Lifting Script

    1. That's the way A3 works, seemingly. As long as the vehicle lands on its tyres (or tracks), it takes minimal fall damage, if any. I can assure you that they definitely explode if you drop them on their nose a few times, though. As for adjusting this via the script: I could attempt it, but I'd rather not on the basis that it would probably end up being worse, as well as making things more complicated than they perhaps need to be. 2. Anything in the blacklist will be disallowed from lifting. You can use either names you have set in the editor, or the classname of the object. A nice quick way to find the classname is to select the object in the "add/edit object" menu and look on the top-right of it; the classname of your selection is displayed there. Note that if you are using a name that you have set in the editor via the "NAME" field, it does not require quotation marks. If you are using a classname, it does. In your case, you'd probably want to put the classnames of every helo except the "big choppers" that are in your mission into the blacklist.
  25. profcupcake

    Dead Simple Helo Lifting Script

    UPDATE Fixed: Vehicles which were not local were unaffected by helo velocity when dropping. Vehicles will now auto-drop if the carrying helo is destroyed.
×