Jump to content

thirith

Member
  • Content Count

    387
  • Joined

  • Last visited

  • Medals

Everything posted by thirith

  1. Cool, thanks. I've yet to work with getVariable (and will have to wrap my head around its intricacies and around namespaces), but it sounds like it's exactly what I need. Edit: What I don't quite get, though, is how you redefine red1 and red2 in your second suggestion, when these are already in use globally. Wouldn't you need to use different variables? Or is this one of those local/global things?
  2. Heh. I probably have a tendency to over-complicate things... I think it'll be a fun, unconventional mission, though - so few opportunities for small groups to use Littlebirds in regular missions. Anyway, I've got a couple of potential solutions now, and I'll have to see which one works best: At the end of the repair script, check which passengers are near the helicopter but not on board, and then order those to get in again. (In the briefing text, I can say that passengers aren't stupid and they'll disembark any damaged or repairing vehicle for their own safety, but they'll get back in again after a helicopter's been repaired.) I could make the passengers join the player's group, in which case they should stay on board, and then have them leave the group just before the final waypoint. I'll see which works okay.
  3. I'm currently working on a helicopter mission where you're ferrying around AI units, racing other players. I've added an action that allows you to repair the helicopter if it's damaged; it deactivates the helicopter by setting fuel to 0, sleeps for 10 seconds, then refuels and repairs the helicopter. (The action only works if the helicopter is on the ground.) This works well - except for one thing: as soon as the helicopter is damaged or the fuel set to 0, any AI passengers disembark the helicopter. I've tried passenger disableAI "FSM", but it doesn't change anything: the moment the fuel drops to 0, the passenger gets out. Any way I can keep this from happening? I've seen a couple of possibilities, but they all seem to have drawbacks, in particular for the setup of my mission: you fly to waypoints A, B, C and D, picking up one passenger at each waypoint. If I were to lock the cargo slots during repairs, I imagine that new passengers couldn't get in either. Any tips would be much appreciated. Cheers!
  4. I'm about to encounter the intricacies of spawning objects and/or vehicles in a MP mission, which I hear can cause certain problems due to locality etc. As I don't want to end up with a spawned vehicle for every person playing the game, but I can't find one page that clearly explains what works and what doesn't, I wanted to ask how to do this: Is the proper way to spawn a vehicle that is shared by players (or a unit that players interact with) to only do so on the server? If so, does it make a difference whether we're talking about a dedicated server or a non-dedicated server? Does a spawn command executed *only* on the server in that vehicle or unit being in every player's game?
  5. Don't Event Handlers only come into play in certain specific scenarios, though? Or can most trigger types be replaced by EHs?
  6. Thanks, that's very useful. Just to make sure I understand the basics correctly: In my case I'm spawning a smoke grenade based on a trigger placed in the 2D editor that checks if a certain unit is in a specific area. The On Act script will be run on every machine, so if I did use vehicleCreate, each client would enact this and create a smoke grenade, so I have to use vehicleCreateLocal. However, let's say I'd add a custom action in each playable character's Initialisation script that spawns a smoke grenade, there I'd use vehicleCreate, since the script for the custom action is only run on the client where a player uses the action. Is that correct?
  7. I'm currently working on a helicopter pickup mission. As the player is supposed to pickup several units, I'm hoping to get around assigning waypoints on the helicopter for all of them, as this becomes pretty messy in the 2D editor (several waypoints on the same unit). What I'm thinking of doing is create a trigger once the helo enters the target region, putting assignAsCargo and orderGetIn code for the unit in question in the initialisation box. My question is this: how does a unit behave if it's given an orderGetIn command but the vehicle in question is still up in the air? Will it wait until the helicopter has landed and then get in? Second, and secondary, question: does orderGetIn generally work better than a "Get In" or "Get In Nearest" waypoint? Using the waypoint method, I find that the AI tends to make quite a detour before boarding the helicopter.
  8. Yeah, I'd imagine that with a unit or vehicle that players interact with, I'd have to just do it on the server; with a smoke grenade, it just matters that everyone gets the same effect in the same place more or less at the same time. If I understand correctly, remoteExec is Arma 3 only, and I'm currently doing this for A2/OA. It's good to hear they've made these things easier in A3, though.
  9. Thanks, that's the one I tried this morning. I used createVehicleLocal, though, since the mission's basically a multiplayer race (who picks up four passengers first and then returns to base?). As far as I understand, there's a risk with createVehicle that it's enacted on the server as well as on each client. Then again, I guess multiple smoke grenades are better than multiple tanks or OpFor units... :) In any case, the smoke grenade thing works pretty well, and I expect it might work quite nicely with two-player teams - pilot and co-pilot spotter, keeping an eye out for a plume of smoke.
  10. That's a good tip, thanks. I might test both; if orderGetIn gets the unit to start running towards the helicopter, I might leave it in, since it tends to make the unit more visible, and some of the pickups might be in between buildings. ... actually, I'm just thinking: it might be more fun for this particular mission if getting close enough to the unit to be picked up triggered a smoke grenade. Off to look for info on scripted smoke grenades!
  11. I'm currently thinking of a fun, afterparty-style mission that's basically a Littlebird taxi mission that has several players competing against each other to pick up a number of passengers and then return to base. What I'd like to try is having a number of units wait at the base and start firing into the air in celebration when the first chopper approaches. I've Googled and searched the BI forums for this, but I haven't found anything. Is there an easy way to do this? P.S.: I'm actually thinking of two versions of this mission: one in MH-6Js and one in AH-6Js, with the players being able to attack one another. Perhaps I'd use dancing units for the former and units firing in the air for the latter.
  12. Cool, thanks! Will try that one out. I guess it wouldn't be possible to make an object (e.g. the suitcase) invisible or change its size until it's so tiny, it can hardly be seen, right?
  13. I'm currently working on my first MP mission ever, and it's been a steep but exciting learning curve. However, I realise now that I was perhaps too ambitious with respect to what I can do in a first mission. I'm getting there, but in hindsight I might not have done a couple of things the way I chose to do them in the end. The main thing that's currently giving me headaches is this: I'm creating tasks based on certain triggers and Event Handlers. However, I only realised this weekend that these tasks aren't assigned to all playable units but only to the ones that are currently being played. I then thought I'd use a forEach playableUnits loop - but if I create a task and assign it a handle (e.g. {task1 = _x createSimpleTask ["taskName1"]} forEach playableUnits;), I run into the problem that I can only have one task1 at a time. Anyway, to cut things short: for the mission I'm currently doing, which is a six-player coop mission, I'll use a brute-force fix, i.e. I'll name all six players (player_a, player_b, player_c etc.) and I'll basically create six versions of each task (task1a, task1b, task1c etc.), which, if I understand correctly, should allow me to create and update tasks specifically for each of the playable units. I hope it'll work, but it's obviously far from elegant - and if I wanted to create a mission with much larger numbers of playable units, I wouldn't want to do it like this. Which is where my question comes in: by now, is there a standard way of handling tasks in MP missions that allow for respawn and/or JIP? I've heard about TaskMaster, for instance, but haven't looked into it yet, and I don't know whether it also handles respawn/JIP situations.
  14. Cheers. I'm currently using Notepad++ with the Arma-specific plug-in, but I've had some weird crashing problems with edited script, so I'm a bit apprehensive.
  15. I assume the d = is only necessary if the script returns something, right? If it just puts certain things in action, is a variable needed?
  16. I've been editing my scripts in mission.sqm, seeing how they were getting pretty messy in the in-editor initialisation fields - but now when I try to load the mission in the editor, I get the following error: Can anyone help me with this? Is it that in the editor I shouldn't use Enter but something else? I'm editing in Notepad++, in case this helps. Here's the code in question: init="this addEventHandler [""fired"", {apc1 removeAllEventHandlers ""fired""; [] spawn { sleep 3; task2a = player_a createSimpleTask [""Destroy the APC""]; task2b = player_b createSimpleTask [""Destroy the APC""]; task2c = player_c createSimpleTask [""Destroy the APC""]; task2d = player_d createSimpleTask [""Destroy the APC""]; task2e = player_e createSimpleTask [""Destroy the APC""]; task2f = player_f createSimpleTask [""Destroy the APC""]; {_x setSimpleTaskDestination (getPos apc1)} forEach [task2a, task2b, task2c, task2d, task2e, task2f]; player groupChat ""Are they heading for the airbase?""; taskHint [""Destroy the APC"", [1, 1, 1, 1], ""taskNew""]; } } ];";
  17. Super, thanks. I'll try your suggestions ASAP. Edit: Brief addendum: some of the weirdness in the script above came directly from the editor, for instance the weird brackets and quotation marks. For instance, if I understand correctly, in mission.sqm you need the " (and probably the ; ) at the end, since the quotation marks envelop the entire init field. Anyway... What I've started doing now is editing the scripts for initialization and On Act fields in Notepad++ (with the SQM plugin) and then copying them into the editor. It's when I have to debug or edit the script, it's a bit of a hassle. How do the pros juggle between the editor and editing the scripts directly? Are there recommended practices?
  18. I'm not playing on a dedicated server, I'm afraid... Thanks for the offer, though!
  19. Cool, cheers. I'll check out Taskmaster for my next mission that has somewhat complex tasks - though I think I'll do a simple, quick'n'easy one next as a palate cleanser of sorts.
  20. From the page you've linked to, do I understand correctly that these new features are Arma 3-only? For the moment I'm stuck with A2/OA (at least with respect to my coop group), since the people I'm playing with are new to Arma and first want to find out if they actually like the game before they shell out on A3.
  21. I'm having a problem with a script that should reduce the damage to a Littlebird and keep its occupants safe (see this thread). This is the script that I've added to the Littlebird's init field: this addEventHandler ["GetIn", {(_this select 2) allowDamage false}]; this addEventHandler ["GetOut", {(_this select 2) allowDamage true}]; this addEventHandler ["HandleDamage", {((_this select 2) * 0.02) } ]; This also seems to work reasonably well if I order my men to board the helicopter, as I can then shoot them without them dying. However, in the mission I give the option of using the Littlebird for reconnaissance, but when I pass the APCs I'm looking for and they fire at me, it often results in my guys getting hurt and even killed. To the best of my understanding, the script should set all my units so they don't take damage after boarding, and only once they disembark can they be injured again. What is it I'm getting wrong?
  22. I'd imagine this is a pretty basic problem, but I haven't found any threads discussing it, unfortunately... I'm creating a mission where some tasks are created by triggers or Event Handlers. When I play the mission, all the new tasks show up at the top of the task list. Is there any way I can change this so the new tasks show at the bottom?
  23. I haven't got any mods active, but I'll try without the First Aid modules. It's really strange, because obviously *something* is happening, e.g. when my units are on the chopper but I'm outside, I can shoot them without injuring them. It's only when we're all on the chopper and the APCs shoot at us that the guys are injured.
  24. I'm currently working on my very first multiplayer mission, in which I want to give my squad the option of doing some aerial recon of the Chernogorsk area in a Littlebird. The aim is to find two armored vehicles (currently BTR-90s), then going in and destroying them on foot. The problem is that even with good flying skills there's too high a chance that the Littlebird is shot down by the BTRs. I'm hoping to reduce the chance of this happening, but as I'm new to mission editing I don't know how best to do this. Is it as simple as changing the vehicles to a different type, and if so which? (Ideally I wouldn't want a unit that cannot defend themselves at all against aerial units, but that would be preferable to them being utterly deadly.) Alternatively, is it a matter of changing the units' skill (but I don't want them to be less dangerous to the people on the ground)? Are there script commands I can use to make the Littlebird less visible to ground forces? Or is there another solution to my problem? Any help would be much appreciated. Cheers! P.S.: Is there a useful compendium of which units work best in which situation?
×