Jump to content

NickThissen

Member
  • Content Count

    54
  • Joined

  • Last visited

  • Medals

Everything posted by NickThissen

  1. Hi, I am trying to set up a 'tank base' where some tanks are waiting until they will be called on later in the mission. I have set them up in a line in the editor, grouped together, but with their Formation set to None (I tried various things here). Then I have a waypoint right in front of them (formation LINE) which is synced to a trigger (later in the mission this trigger is activated and the tanks will move). I just want the tanks to remain in the position where I put them in the editor when the mission starts. Instead, they start driving around randomly, even hitting friendly soldiers and even exploding in extreme cases. WHY???? Just stay put!! The AI is so bad sometimes, why can't they just remain where I put them? I can't figure out what I'm doing wrong, they are told to stay in a line, yet they immediately start driving to other places, not just moving a few inches to get in line behind the next guy but overtaking each other and really driving long distances away from the camp. How can I just make the tanks stay put until I need them (activated by a trigger)?
  2. NickThissen

    Play without GPS, but with map?

    Hmm you may be on to something, I've never touched those difficulty settings so I don't know what they do. Is there no way to play with the default settings but still remove the dot from the map?
  3. Here's what happens when I put a squad of tanks and give them a waypoint with a trigger (which is not activated in this clip!), and tell them to go to Column formation: They do eventually line up in a column, they just seem to think they are in reverse order or something and go out of their way to get to "their" position. In this clip they have plenty of room to do it so not really a problem, in my actual mission that room is not available and they just crash through everything...
  4. NickThissen

    Play without GPS, but with map?

    Hmm, even with those lines, I can still follow my position (and that of my squad mates) live on the map. I am talking about the blue dots on the map, is there no way to remove those? I just want to simulate a mission where players have just a paper map, no live update of your position but figure it out for yourself. Edit: The strange thing is, there is no GPS in the slot in my inventory (even if I leave out those lines), but if I put one there, there seems to be no difference. Is there anything that contains a GPS (weapons, clothes, ?? :S). I am using the FIA faction of blufor (so not the regular soldiers stocked to the neck with high tech gear).
  5. I ended up using the disableAI approach, that seems to work ok-ish. They still bump each other when they are finally allowed to move but they got to their destination in one piece a couple tries in a row so I guess that will have to do. Still no idea why they don't behave properly though... But thanks! I should mention that disableAI does not work on a tank, instead you have to call it on the driver: { (driver _x) disableAI "MOVE" } ...
  6. Hmm, you must be right, but they do the same with column formation :( The fuel thing doesn't seem to work properly either. They no longer move at the start, but they also never move again even after I refuel them and trigger the waypoint..?
  7. Made no difference. Hmm I could try that. I think I found the problem though; they are trying to follow the LINE that I told them to, but the orientation of the line is not how I set them up in the editor, but rather something like a 45 degree angle to the road. So they have to move around to get in that orientation, and there's all kinds of stuff in the way so they keep bumping into each other and exploding. How can I let them line up with the road, like they would do when they are driving?
  8. Hi, I want to make a co-op mission where players play as Civilian people and are taken captive in an enemy camp. The objective is to escape the camp, which they'll likely have to do by finding weapons, silently killing guards and taking their clothes and weapons, etc. How would I set this up? I have tried various things but none seem to work. By default, enemies (opfor) don't react to civilians at all. I found a trick to make them hostile against civilians: group a blufor player to the civilian group and then set his probability of presence to 0. That works, the opfor AI is now hostile against me, but that's not very realistic for a prisoner either as they shoot me on sight. So I used setCaptive to make myself a captive player. That basically brings me back to square one, they don't even react to me. I can steal a gun right in front of their eyes, shoot their buddies, strip down and steal their clothes and they will just stand there looking at me like it's ok :confused: What I want in detail: - Start out as captive so enemy does not shoot on sight, but is hostile. - When I do something suspicious, such as picking up a weapon, lift the captivity and make them attack me. Is this possible? Thanks!
  9. How do I fire a trigger on "doing something suspicious" though? I was hoping there was a good way / trick to let the game figure that out, just like you can trigger on 'detected' I was hoping you can trigger on 'being suspicious'. I suppose I'm asking for too much though... Anyway I would not have a clue on what trigger to set the captivity in this case.
  10. Hi, I have a mission where the main objective is to take out an officer at an enemy base. As a side-objective I want the players to be able to take down a nearby communications tower, which then results in less enemy reactions after taking down the officer (keep the tower alive and I will let the enemy call in backup, take it down and you can get away safely). The problem is that there is just one communications tower near the base in question, and it is a little too close (about 600 meters). When I use explosions to take it down, the enemies in the base go into alerted state and they don't follow their waypoints properly which will likely ruin the mission how I designed it. Is there any way to prevent this? I can see three options: 1. Somehow prevent the enemies in the base from being alerted by the explosion (eg temporarily disable their senses right before the explosion and reset it afterwards, I'm just rambling here that's probably not even possible). 2. Reset their state of alertness after the explosion (so they become alerted by the explosion, but a script then resets them back to casual 'safe' state). 3. Take down the tower without making so much noise (I could add an action like "take down silently" to simulate the players sawing the pole down or something like that, but that is not really a good option imo as it will look stupid). Any suggestions?
  11. So I just set their behavior back to careless (or maybe safe) and that makes them forget all about the explosion? I did not expect that to work, but I will try it thanks. I would expect them to jump right back into combat / aware mode because they still remember the explosion but I'm probably wrong. It seems like I need everyone in one group though, which means they will all line up in formation unless I go by each unit and set them to not go into formation. Or I call the script on each unit separately, both options are not really nice...
  12. Hi, I have built some co-op missions and for the first time I'm using scripts to get some more advanced stuff going. Reading some snippets here and there I came to the conclusion that there is some difficulty with scripts in multiplayer environments, especially locality or on which client the scripts are run. I've been looking for some more information on this but have not found anything helpful. Only a handful of forum posts that deal with one specific example or unrelated problems, I can't get much further than finding out that there are difficulties, but not exactly what they are and not even close to how to deal with them. Is there any documentation or tutorial or something about multiplayer scripting, specifically in co-op missions? I have a few questions that I'd like to get answered, if they are answered in such a document / tutorial I'll gladly read that, but I can't find one... 1. I've read that scripts are not automatically transfered to a MP version of the mission when you use Save As - Export to Multiplayer. I always write scripts in separate .sqf files which I place in the 'Documents\Arma 3\missions\<mission name>.<map>' folder. There is also a MPMissions folder but it's always empty, do I need that? So far I only play co-op missions with friends where one of us hosts the server locally (so not a dedicated server I believe), that has worked fine for missions without scripts, but I have not tried any custom missions with scripts yet. So: do I just put the scripts in the 'missions' folder (that works fine when I test locally) and use the regular Save As - Export to Multiplayer function? Or do I need to do more? 2. That brings me to question 2: how do I test this properly? I have been testing by simply using 'Preview' and sometimes by hosting a local lan server with my mission, both seem to work fine. But I'm always alone in testing; I don't want to spoil the mission for my friends by testing every element in it with them because then we don't need to play it anymore ;) 3. When I call a script from a trigger (execVM in the onAct field), does this script fire on the server? Local to the player that triggered the trigger? Or for everyone separately? 4. What are some examples of things that could go wrong when not keeping MP scripting in mind? The only thing I can find is "for example" (it's always the same example) if you spawn vehicles with createVehicle, without using the "isServer" check, that it would spawn a vehicle for every client (and the server). Are there others? A specific example: I have a enemy helicopter that should get damaged from AI teammates (there aren't any AI teammates, I just script it that way to look like that). I wanted the helicopter to get damaged at a random time, but then I read that 'random' is local to each client. So suppose I wait for a random time and then damage the helicopter (via setDamage or setHit or whatever). Each client gets that command at a different time. Would that mean the helicopter gets damaged multiple times, at each random time that each client decided? Or is it only the shortest random time that determines when the command is executed (but then it is not executed again for each other client)? Things like this don't make sense to me; on one hand I read that these things are local to each player, but how can something like damaging a helicopter be local to each player. It's either damaged or not, surely it won't happen that one player sees a flaming wreck on the ground while the other sees a happy chopper flying around??? Well I'm tired of typing but have a lot more questions so I was hoping to get some good resources where I can learn it for myself... Thanks for any help!
  13. Thanks all, that's quite helpful actually. It seems the best course of action for my mission currently is to let every script run only on the server and abort it otherwise. The only problem I then still have in my current scripts is things like hints; they are all only executed on the server right now so that means nobody would ever see a hint. However, in local testing I do see the hints. Is that because I am the server at that point? Or is it more complicated? (I know the solution is just to move the hint commands above the 'abort if not on server' check, just checking my own logic). ---------- Post added at 18:02 ---------- Previous post was at 17:49 ---------- I have fixed some of my scripts, I believe. But perhaps one more relevant example then... In my mission a trigger is fired when two stationary vehicles are destroyed (condition !alive ...). The trigger fires a script. The script should do the following: 1. Hint/sidechat some text 2. Wait a while 3. Hint/sidechat more text 4. Wait a while 5. Hint/sidechat more text 6. Spawn enemy units 7. Call the next script Obviously the first 5 commands should be issued on every client so that everyone sees the hints. After that, I have the 'isServer' check so the rest is only executed on the server. The AI units are spawned with createUnit which I am assuming is global so they should spawn for every client (even though only executed on the server). The next script (step 7) involves spawning a friendly helicopter extraction and (besides spawning the vehicle) it issues some hint commands. The problem is that in step 7 there are also hint commands. They will now not be seen because the script is only called on the server? Is that correct? Should I then use BIS_fnc_MP to show the hints on every client?
  14. Hi, I want to make a dramatic ending to my co-op mission. The final objective takes place on a hill with basically only one entry point. I want to make a helicopter extraction the ending of the mission, but while the helicopter is travelling to the LZ (maybe a few minutes) I want to spawn a large amount of enemy forces "behind" me that rush toward the top of the hill (through that one entry point). I want to give the players a bit of time to take positions (maybe even lay some mines) until the enemies arrive. There will be really a lot of enemies (> 20), this should be ok because there is really only a small passage through which they can come so if positioned well even on my own I can take down 20 enemies with some luck. I have a few questions about this: 1. How do I spawn enemy units in the middle of a mission? I can't really place them somewhere the player won't reach because they are either too close to the player's objective (chance that they will be spotted) or too far away (takes too long to wait for them). I don't want them to be "alive" during the mission but only spawn once the final objective is destroyed. 2. Once spawned, how do I give them waypoints toward the top of the hill? I can put waypoints on the map obviously but if there are no units for those waypoints that won't work. Does that mean that a script which just calls createUnit a couple times won't work (for question 1) because how do I give those units waypoints? 3. How do I make it apparent to the players that something big is about to happen and they should really worry about defending their position? A simple task assignment won't do, it's a small message and a little bleep and players will probably think "oh, I have a couple rounds of ammo left, we should be fine". I want them to think "holy sh*t this is going to get nasty!". In other words: how can I make a more dramatic announcement? Music will probably help, but I also want a clear message that says "go there and get ready for a big fight". Thanks!
  15. Thanks Lappihuan, that works just fine! I found a decent animation (not that great but good enough).
  16. Hi, I am building a co-op mission where my squad is supposed to rescue a stranded squad in some city. The stranded squad is actually an ambush (at the moment a single Ifrit HMG without ammo or fuel) and when approached the players are ambushed. In my own playthrough testing however I noticed there are quite some spots where players can see the "stranded squad" from a distance. It would be quite obvious that it was an ambush if all they see is an empty vehicle. So I thought it would be pretty awesome if I could 'prop up' some dead blufor soldiers, as if the enemy has literally propped them up to disguise the fact that it's an ambush. From up close it would be obvious that they are dead, but from a distance it would look as if there were at least people around. Is it possible to spawn a dead soldier and have him "standing up" anyway? Even better if it's not the real standing animation but something that looks like a dead soldier suspended from a stick or whatever :cool: It would be even better if actually a name (or at least "Charlie Squad") appeared when you hover the mouse over the soldier. Is that possible? I might be asking for a lot here, but you never know... Thanks for any input!
  17. NickThissen

    Helicopter extraction not working

    Well, I could not get any other method to work :) Thanks, that makes sense about the captive setting. I have solved it for now to let the helicopter land at a small 'base' I made up out of some empty vehicles and some flags, looks pretty authentic, even better than ending the mission over the ocean. But I'll keep it in mind.
  18. NickThissen

    Helicopter extraction not working

    Wow, thanks! That finally works. (This should be a sticky or something, only thing that works for a proper extraction). There is one more problem though: I put the 'basePos' marker (where it flies to after extraction) somewhere in the ocean in the middle of a large trigger that is set to end the game (activation blufor, type end#1). However, the trigger is not activated when the helicopter flies inside it. It is only activated when I leave the helicopter (essentially jumping out into the sea, but I don't get that far, as soon as I issue the 'eject' command the mission ends). Is the helicopter not seen as blufor for some reason? It's not the end of the world, I could direct it to a landing place somewhere and end the mission when we get out, but I don't like endless ending "movies" where you just fly to an airport that's miles away lol. Another thing; I am assuming you set setcaptive to true so that the enemy doesn't shoot the helicopter? That's pretty clever, but maybe not very realistic. Do you have a better idea how to avoid the helicopter being damaged? Maybe resetting its damage in a loop or something? Also not too realistic but better than the enemy ignoring it completely. Thanks again!
  19. NickThissen

    Helicopter extraction not working

    Thanks. I have molded it into the following script which is called when I walk into a trigger (for testing purposes). The helicopter 'helo' is somewhere over the ocean and already flying. if (!isServer) exitWith {}; // Add waypoint _wp0 = group helo addWaypoint [getMarkerPos "heloLandMarker", 1]; _wp0 setWaypointType "MOVE"; _wp0 setWaypointStatements ["true", "helo land 'land'"]; // Wait for everyone to get in _grp = group p1; _inHeloCount = ({_x in helo} count units _grp); _aliveCount = ({alive _x} count units _grp); waituntil { _inHeloCount == _aliveCount }; // Take off _wp1 = group helo addWaypoint [getMarkerPos "heloEvacMarker", 1]; _wp1 setWaypointType "MOVE"; I don't need any more landing or unloading after extraction, the last waypoint is inside a large trigger that ends the mission. The helicopter fails to land at the LZ (marker 'heloLandMarker' which is on top of an invisible helipad), but it does land "close" to it (not really, quite far away actually). Even worse: as soon as it lands the entire crew (including pilot) gets out and walks away (presumably to the waypoint? The waypoint was not reachable from where the landed so they just kind of walked around). What am I doing wrong?
  20. Hi, I have set up a sort of ambush in my co-op mission where a large number of enemy soldiers spawn on a trigger and start to converge on the players via a single 'chokepoint' on the map (the area where the players are is only accessible via that one passage way). I make them move with waypoints, with the combat mode set to 'Open fire, engage at will' and speed to 'Full'. I have tried various behavior settings. When I don't engage the enemy (eg if I spawn as an enemy unit to test) they do what I want; they run through the passageway to follow their waypoints as fast as they can. However, when they are engaged (as in a real mission scenario), they completely fail to do that. As soon as I fire a shot or two, they will all drop to the ground and stay there. I have tried various waypoint behaviors to change this (eg 'careless', 'aware' and 'combat') but it doesn't really change. It seems only 'aware' is a behavior that fits with an ambush scenario (soldiers running), if I choose careless they are just walking with their weapons to their sides, and if I choose combat they will use cover on their way to the ambush point (takes too long to get there). What I want is simple: make the AI run through the passageway as fast as they can to ambush the players. When they are shot at, they may crouch or try to find cover to return fire, but the other enemies should not "care", but keep running. Certainly they should not drop to the ground and stop in their tracks, that completely destroys the purpose of an ambush since all the players have to do is shoot a few times and they have all the time in the world to get away because the 30 enemy soldiers are all chickening behind a wall some 100 feet away, out of sight... How can I force this behavior and make them less careful? Is it possibly because they are part of a group so that one soldier in the group getting shot at means they are all going into 'cautious mode'?
  21. I tried it but it does not seem to do anything at all. They still drop down and stop in their tracks when other enemies around them get shot. Here's my script: hint "A large amount of enemy troops were spotted converging on your area, get ready to defend the chokepoint!"; // Show some markers on the map "ambushMarker1" setMarkerAlpha 1; "ambushMarker2" setMarkerAlpha 1; "ambushMarker3" setMarkerAlpha 1; // Array of possible soldiers (regular soldier listed more often so it has a bigger chance) _soldiers = [ "O_Soldier_F", "O_Soldier_F", "O_Soldier_F", "O_Soldier_F", "O_Soldier_F", "O_Soldier_F", "O_Soldier_lite_F", "O_Soldier_AR_F", "O_medic_F" ]; // Spawn position _pos = getMarkerPos "ambushSpawnMarker"; _range = 2; // Get the group of the unit that defines the waypoints _grp2 = group ambushUnit; // Spawn 16 units for "_i" from 0 to 15 step 1 do { // Create a new group for each unit _grp = format["group%1", _i]; _grp = createGroup east; // Copy the waypoints of the ambushUnit to make the new unit follow the waypoints _grp copyWaypoints _grp2; // Create a new unit _soldier = _soldiers select floor(random(count _soldiers)); _unit = format["_unit%1", _i]; _unit = _grp createUnit [_soldier, _pos, [], _range, "FORM"]; // Allow fleeing to 0 so they don't flee when getting shot at _unit allowFleeing 0; sleep 1; }; The way it works is as follows: - I have a enemy unit 'ambushUnit' that has some waypoints defined. These waypoints will be copied to the units spawned in the script. - The ambushUnit gets teleported to the other side of the map when he reaches the first waypoint. This is done to prevent him being killed (when he is killed his waypoints are gone and the spawned units don't follow them). - When I hit a trigger the script gets executed. - The script gets the group of the ambushUnit (now safely out of the way) so it can copy his waypoints to the new groups - In a for loop, 16 new groups and new units are created. One unit per group, which I thought might make them work together less (eg they don't care if another unit nearby is shot, because they are not in the same group). No clue if this works but it's worth a shot I guess. - I also set the allowFleeing to 0 for each unit. Should this work or am I doing something wrong? Thanks.
  22. Thanks, but I don't see anything there that could help me, only things that make the AI even worse. That sounds promising, thanks! Will try that out soon.
  23. Hi, I am building a mission where two squads (two groups of three players each) start some distance away from each other. Part of the mission is to find your teammates (the other squad) and then continue together. I would like to join the two squads in the middle of the game, is that possible? The mission is build so that one squad is flying a helicopter (manually, not scripted) and has to land at an LZ where the other squad should be waiting. When the helicopter lands (or maybe when a member of squad 1 is 'close enough' to a member of squad 2) I want the squads to 'merge' into one squad, so that we can all see each other on the map and stuff like that. Right now while landing the helicopter I cannot see the other squad and it's very easy to mistake them for enemies (this is fine, I actually like this!) but after I have landed and we have 'regrouped' at the helicopter I want to merge the squads so we can continue as one. Is this possible? Thanks. Edit: I searched and found the joinSilent command, have tried it but it doesn't seem like anything is happening. I've made a test mission with two squads opposite each other and a trigger in the middle, with the trigger calling 'this joinSquad p1' on activation. 'p1' is the name of the squad leader of the other squad. Nothing happens when I hit the trigger...
  24. NickThissen

    Join two separate squads

    I don't understand how waypoints should work with human controlled players :/ Anyway, this may be getting off topic, but I have two scenarios that are acceptable for when the join should happen: 1) Trigger it as soon as the helicopter lands. No idea how to trigger something when a vehicle lands though... Trigger for a specific unit and a specific height (0) ? 2) Trigger it when every player is inside a certain trigger radius. Here I have the problem with variable number of players. There are 6 playable characters but the mission can be played already with 2 (and no AI). And 4 of the 6 players are 'expendable', if they die the mission can continue, but then that trigger that's checking for 6 players won't fire?
  25. NickThissen

    Join two separate squads

    Yeah I found the JOIN waypoint. But all soldiers are (in principle) controllable by human players (or AI), so I guess waypoints aren't possible to use? Anyway I managed to do it with the trigger afterall, used the join command instead of joinSilent, and also listed the players manually: [p1, p2, p3] join (p4); (p4 is the squad leader of the other squad). That works! Now I gotta figure out a way to trigger this when the squads are close to each other. I am thinking use a trigger that fires when all players are inside it. I've done this before by listing all players in a similar way... But then what if some players are missing (eg dead or never joined if I don't play with AI)? Will the trigger recognize this and still fire?
×