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

amphib

Member
  • Content Count

    14
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About amphib

  • Rank
    Private First Class

core_pfieldgroups_3

  • Occupation
    IT Manager

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Yeah, that could probably work. I'll look into it, thanks. But it feels like there should be a way to detect what actually triggers the animation to be played and use that event, rather than going by the actual animation being played so to speak. The gestures are not just animations after all, they're already triggering icons and texts to be displayed on-screen for other players in MP.
  2. amphib

    track a moving enemy

    Do you mean track like in following at a distance (without getting too close) or just trying to catch up with the tracked unit? Trying to catch a unit would be fairly simple, you set the tracking unit to move to the position of the tracked unit and loop it every few seconds. //Set _trackerUnit and _targetUnit to the tracker and the tracked while { alive _trackerUnit && alive _targetUnit } do { _trackerUnit doMove getPos _targetUnit; sleep 5; } Remaining at a distance (without stopping) is a bit trickier, but the basics are the same. You just also need to check the distance to the target in the loop and setting the speed mode (and perhaps the behaviour) of the tracker depending on the distance to the target. If the target is very far away, set the tracker to full speed, then reduce it as the distance gets shorter and stop it completely if it gets too close.
  3. I'd like to use the wheel menu gestures module to give orders to a number of NPCs in a mission I'm creating. Does anyone know if there's a way to detect the event when a player uses a hand signal? To be a bit more precise, I'd like these NPCs to detect if a player uses a specific hand signal, like "Regroup", which will then make the NPCs move to a position near that player. I don't want the NPCs grouping with the player though. My current ugly workaround for commanding the NPCs is to use radio signals for the commands, but that's not really what I want.
  4. That would mean I need to keep track of every spawned unit and call the script for each one. I'd prefer not having to manage a handle for each unit and running their behaviour from a common script. So I would really like to have a script added för each on the units spawned in this way and just call it with different parameters. But if there isn't a way, then there isn't a way. I guess I'll have to execute seperate instances of the script from the "parent" script after all. Thanks anyway, I appreciate the feedback!
  5. I need to loop a script indefinitely (until the unit is killed), making it run for a few secs, then crouch and fire (if there are any targets) for a few seconds. Rinse and repeat until death. 😉 Here's the script I'm using for the units, called with [<unit>, <"markername">] execvm "unitCharging.sqf": if (!isServer) exitWith {}; _thisUnit = _this select 0; _targetPos = getMarkerPos (_this select 1); _thisGroup = group _thisUnit; _thisGroup setSpeedMode "FULL"; while {alive _thisUnit} do { _thisGroup setBehaviour "CARELESS"; _thisUnit setUnitPos "UP"; _thisGroup setCombatMode "BLUE"; _thisUnit doMove _targetPos; sleep 15; _thisGroup setBehaviour "COMBAT"; _thisGroup setCombatMode "RED"; _thisUnit setUnitPos "MIDDLE"; doStop _thisUnit; sleep 10; }; PS. I do want to script, it's the safest way to get the exact result I want. 🙂
  6. Is there some way of spawning individual units with a script call (like the old setVehicleInit)? Basically, what I want to do is spawn waves of attacking enemies that would each run a script forcing them to "fire and advance" with full speed toward a set of positions. For the actual "fire and advance" part I use a script changing their behaviour and combat mode between CARELESS+BLUE and COMBAT+RED with a few seconds in between and with an additional doMove whenever they go into "advance". There's a reason I don't want to manage them all in a single script, but I'll refrain from confusing matters by explaining exactly why and leave it at "that's just not what I want to do" for now. 😉
  7. If you want individual civilians to be affected by the "propaganda factor", I'd do it by creating a list (server only) keeping track of each civilian (and enemy soldier if you like) and the "affinity factor" of those civilians, let's say in the range 0 to 100. That way, you can let the civilians be influenced using triggers, actions or whatever you like and when the affinity factor crosses a set level, you can make that particular unit switch (or join) sides. I would go about the side switch by spawning a new group belonging to the side that you wish the civilian to join and then transferring that civilian to the group in question. Then you can switch civilians to blufor (or perhaps indep) whenever they've been infuenced enough to switch sides.
  8. amphib

    Getting stuck on the MP loading screen

    I'm currently experiencing this problem with a specific mission on my dedicated server. Here's a description of the behaviour. Active mods: @CBA_A3 @UNSUNG_3.0_Charlie I have created two missions using the same mods, on the same map (the second mission was actually created using the first one as a template). One of them runs just fine, but the second does experience the hang on loading screen after role selection. The second mission is a bit more advanced, with more scripts running and active triggers. However, the second mission was tested every day on the server during development, by two players and everything worked just fine. Then I made som final changes and adjustments to the mission (just added some units, scripts and triggers) and when it was tested that evening the problem was there. The first mission still works just fine though, so the problem is not with the mods themselves. The strange thing is, that the problem seems to be intermittent and not always having the same effect. My brother has been helping me out with the testing and sometimes one of us can get in and start playing, but after a short while the player is instantly returned to the lobby. Other times, the player stuck at the loading screen can hear som sounds and even the sound of a failed mission. This is not the rule, however, I'd say that 90% of the times we get stuck on the loading screen and the only thing that can be done is to forcefully end the arma 3 process. I've even tried making a second version of the same mission and experimented with different spawn settings, both set in the editor and in Description.ext, bu nothing seems to work. Anyone running UNSUNG and feel like checking it out the server can be found by searching for "Norse Raders Team Server" or DC:ing to 185.62.206.126:2602.
  9. Well, you need to add an && !isdedicated to the if - exitwith statement in the first line. This exact version of the script has not been run live on a dedicated server (only in simple MP). But I have a more advanced (mission specific) version of it that has and works fine, so there's no reason why this fairly slimmed one should cause any problems on dedicated.
  10. I created a base defense mission for the Unsung Vietnam War Mod with something like what you're after. In my case I wanted hordes of Viet Cong infantry storming the base from different directions all at once (it was pure mayhem). Here's the script I created to spawn the waves of enemies. It checks every 30 sec if there are fewer than 100 enemies on the map, if so it spawns 8 groups of 10 soldiers (80 new units). markers used: vc1 through vc8: Enemy spawn locations am1 though am8: Enemy first waypoint locations am1_1 through am8_1: Second waypoint location am1_2 through am8_2: Third waypoint location if (!isServer) exitWith {}; _enemynumber = 100; //This is the MINIMUM enemies that should be present on the map. Fewer alive enemies than that will spawn another wave. while {!triggeractivated wintrigger} do //WINTRIGGER is the name of the trigger that handles the victory conditions { _opforAliveCount = {alive _x && (side _x == east)} count allUnits; //hint format ["VC on map: %1", _opforAliveCount ]; //Debug message, showing the number of enemies on the map. if ( _opforAliveCount < _enemynumber ) then { // Wait till the Functions module is ready. waituntil {!isnil "bis_fnc_init"}; _startloc1 = getmarkerPos "vc1"; _startloc2 = getmarkerPos "vc2"; _startloc3 = getmarkerPos "vc3"; _startloc4 = getmarkerPos "vc4"; _startloc5 = getmarkerPos "vc5"; _startloc6 = getmarkerPos "vc6"; _startloc7 = getmarkerPos "vc7"; _startloc8 = getmarkerPos "vc8"; _targetloc1 = getmarkerPos "am1"; _targetloc2 = getmarkerPos "am2"; _targetloc3 = getmarkerPos "am3"; _targetloc4 = getmarkerPos "am4"; _targetloc5 = getmarkerPos "am5"; _targetloc6 = getmarkerPos "am6"; _targetloc7 = getmarkerPos "am7"; _targetloc8 = getmarkerPos "am8"; _targetloc1_1 = getmarkerPos "am1_1"; _targetloc2_1 = getmarkerPos "am2_1"; _targetloc3_1 = getmarkerPos "am3_1"; _targetloc4_1 = getmarkerPos "am4_1"; _targetloc5_1 = getmarkerPos "am5_1"; _targetloc6_1 = getmarkerPos "am6_1"; _targetloc7_1 = getmarkerPos "am7_1"; _targetloc8_1 = getmarkerPos "am8_1"; _targetloc1_2 = getmarkerPos "am1_2"; _targetloc2_2 = getmarkerPos "am2_2"; _targetloc3_2 = getmarkerPos "am3_2"; _targetloc4_2 = getmarkerPos "am4_2"; _targetloc5_2 = getmarkerPos "am5_2"; _targetloc6_2 = getmarkerPos "am6_2"; _targetloc7_2 = getmarkerPos "am7_2"; _targetloc8_2 = getmarkerPos "am8_2"; _mil1 = [_startloc1, EAST, ["uns_rf_vc8d","uns_rf_vc8d","uns_rf_vc3a","uns_rf_vc2a","uns_rf_vc8b","uns_rf_vc4b","uns_rf_vc6asap","uns_rf_vc8f","uns_rf_vc8f","uns_rf_vc8e"],[],[],[],[],[],270] call BIS_fnc_spawnGroup; _mil1 setbehaviour "AWARE"; _mil2 = [_startloc2, EAST, ["uns_rf_vc8d","uns_rf_vc8d","uns_rf_vc3a","uns_rf_vc2a","uns_rf_vc8b","uns_rf_vc4b","uns_rf_vc6asap","uns_rf_vc8f","uns_rf_vc8f","uns_rf_vc8e"],[],[],[],[],[],270] call BIS_fnc_spawnGroup; _mil2 setbehaviour "AWARE"; _mil3 = [_startloc3, EAST, ["uns_rf_vc8d","uns_rf_vc8d","uns_rf_vc3a","uns_rf_vc2a","uns_rf_vc8b","uns_rf_vc4b","uns_rf_vc6asap","uns_rf_vc8f","uns_rf_vc8f","uns_rf_vc8e"],[],[],[],[],[],270] call BIS_fnc_spawnGroup; _mil3 setbehaviour "AWARE"; _mil4 = [_startloc4, EAST, ["uns_rf_vc8d","uns_rf_vc8d","uns_rf_vc3a","uns_rf_vc2a","uns_rf_vc8b","uns_rf_vc4b","uns_rf_vc6asap","uns_rf_vc8f","uns_rf_vc8f","uns_rf_vc8e"],[],[],[],[],[],270] call BIS_fnc_spawnGroup; _mil4 setbehaviour "AWARE"; _mil5 = [_startloc5, EAST, ["uns_rf_vc8d","uns_rf_vc8d","uns_rf_vc3a","uns_rf_vc2a","uns_rf_vc8b","uns_rf_vc4b","uns_rf_vc6asap","uns_rf_vc8f","uns_rf_vc8f","uns_rf_vc8e"],[],[],[],[],[],270] call BIS_fnc_spawnGroup; _mil5 setbehaviour "AWARE"; _mil6 = [_startloc6, EAST, ["uns_rf_vc8d","uns_rf_vc8d","uns_rf_vc3a","uns_rf_vc2a","uns_rf_vc8b","uns_rf_vc4b","uns_rf_vc6asap","uns_rf_vc8f","uns_rf_vc8f","uns_rf_vc8e"],[],[],[],[],[],270] call BIS_fnc_spawnGroup; _mil6 setbehaviour "AWARE"; _mil7 = [_startloc7, EAST, ["uns_rf_vc8d","uns_rf_vc8d","uns_rf_vc3a","uns_rf_vc2a","uns_rf_vc8b","uns_rf_vc4b","uns_rf_vc6asap","uns_rf_vc8f","uns_rf_vc8f","uns_rf_vc8e"],[],[],[],[],[],270] call BIS_fnc_spawnGroup; _mil7 setbehaviour "AWARE"; _mil8 = [_startloc8, EAST, ["uns_rf_vc8d","uns_rf_vc8d","uns_rf_vc3a","uns_rf_vc2a","uns_rf_vc8b","uns_rf_vc4b","uns_rf_vc6asap","uns_rf_vc8f","uns_rf_vc8f","uns_rf_vc8e"],[],[],[],[],[],270] call BIS_fnc_spawnGroup; _mil8 setbehaviour "AWARE"; {_x allowfleeing 0; _x setunitpos "up";} foreach units _mil1; {_x allowfleeing 0; _x setunitpos "up";} foreach units _mil2; {_x allowfleeing 0; _x setunitpos "up";} foreach units _mil3; {_x allowfleeing 0; _x setunitpos "up";} foreach units _mil4; {_x allowfleeing 0; _x setunitpos "up";} foreach units _mil5; {_x allowfleeing 0; _x setunitpos "up";} foreach units _mil6; {_x allowfleeing 0; _x setunitpos "up";} foreach units _mil7; {_x allowfleeing 0; _x setunitpos "up";} foreach units _mil8; _mil1wp1 = _mil1 addWaypoint [_targetloc1 ,5]; _mil1wp1 setWaypointType "MOVE"; _mil1wp1 setWaypointFormation "STAG COLUMN"; _mil1wp1 setWaypointStatements ["TRUE", "{_x setunitpos 'auto';} foreach thislist;"]; _mil2wp1 = _mil2 addWaypoint [_targetloc2, 5]; _mil2wp1 setWaypointType "MOVE"; _mil2wp1 setWaypointFormation "STAG COLUMN"; _mil2wp1 setWaypointStatements ["TRUE", "{_x setunitpos 'auto';} foreach thislist;"]; _mil3wp1 = _mil3 addWaypoint [_targetloc3, 5]; _mil3wp1 setWaypointType "MOVE"; _mil3wp1 setWaypointFormation "STAG COLUMN"; _mil3wp1 setWaypointStatements ["TRUE", "{_x setunitpos 'auto';} foreach thislist;"]; _mil4wp1 = _mil4 addWaypoint [_targetloc4, 5]; _mil4wp1 setWaypointType "MOVE"; _mil4wp1 setWaypointFormation "STAG COLUMN"; _mil4wp1 setWaypointStatements ["TRUE", "{_x setunitpos 'auto';} foreach thislist;"]; _mil5wp1 = _mil5 addWaypoint [_targetloc5, 5]; _mil5wp1 setWaypointType "MOVE"; _mil5wp1 setWaypointFormation "STAG COLUMN"; _mil5wp1 setWaypointStatements ["TRUE", "{_x setunitpos 'auto';} foreach thislist;"]; _mil6wp1 = _mil6 addWaypoint [_targetloc6, 5]; _mil6wp1 setWaypointType "MOVE"; _mil6wp1 setWaypointFormation "STAG COLUMN"; _mil6wp1 setWaypointStatements ["TRUE", "{_x setunitpos 'auto';} foreach thislist;"]; _mil7wp1 = _mil7 addWaypoint [_targetloc7, 5]; _mil7wp1 setWaypointType "MOVE"; _mil7wp1 setWaypointFormation "STAG COLUMN"; _mil7wp1 setWaypointStatements ["TRUE", "{_x setunitpos 'auto';} foreach thislist;"]; _mil8wp1 = _mil8 addWaypoint [_targetloc8, 5]; _mil8wp1 setWaypointType "MOVE"; _mil8wp1 setWaypointFormation "STAG COLUMN"; _mil8wp1 setWaypointStatements ["TRUE", "{_x setunitpos 'auto';} foreach thislist;"]; _mil1wp2 = _mil1 addWaypoint [_targetloc1_1, 5]; _mil2wp2 = _mil2 addWaypoint [_targetloc2_1, 5]; _mil3wp2 = _mil3 addWaypoint [_targetloc3_1, 5]; _mil4wp2 = _mil4 addWaypoint [_targetloc4_1, 5]; _mil5wp2 = _mil5 addWaypoint [_targetloc5_1, 5]; _mil6wp2 = _mil6 addWaypoint [_targetloc6_1, 5]; _mil7wp2 = _mil7 addWaypoint [_targetloc7_1, 5]; _mil8wp2 = _mil8 addWaypoint [_targetloc8_1, 5]; _mil1wp2 setWaypointType "MOVE"; _mil2wp2 setWaypointType "MOVE"; _mil3wp2 setWaypointType "MOVE"; _mil4wp2 setWaypointType "MOVE"; _mil5wp2 setWaypointType "MOVE"; _mil6wp2 setWaypointType "MOVE"; _mil7wp2 setWaypointType "MOVE"; _mil8wp2 setWaypointType "MOVE"; _mil1wp3 = _mil1 addWaypoint [_targetloc1_2, 5]; _mil2wp3 = _mil2 addWaypoint [_targetloc2_2, 5]; _mil3wp3 = _mil3 addWaypoint [_targetloc3_2, 5]; _mil4wp3 = _mil4 addWaypoint [_targetloc4_2, 5]; _mil5wp3 = _mil5 addWaypoint [_targetloc5_2, 5]; _mil6wp3 = _mil6 addWaypoint [_targetloc6_2, 5]; _mil7wp3 = _mil7 addWaypoint [_targetloc7_2, 5]; _mil8wp3 = _mil8 addWaypoint [_targetloc8_2, 5]; _mil1wp3 setWaypointType "MOVE"; _mil2wp3 setWaypointType "MOVE"; _mil3wp3 setWaypointType "MOVE"; _mil4wp3 setWaypointType "MOVE"; _mil5wp3 setWaypointType "MOVE"; _mil6wp3 setWaypointType "MOVE"; _mil7wp3 setWaypointType "MOVE"; _mil8wp3 setWaypointType "MOVE"; _mil1wp3 setWaypointFormation "DIAMOND"; _mil2wp3 setWaypointFormation "DIAMOND"; _mil3wp3 setWaypointFormation "DIAMOND"; _mil4wp3 setWaypointFormation "DIAMOND"; _mil5wp3 setWaypointFormation "DIAMOND"; _mil6wp3 setWaypointFormation "DIAMOND"; _mil7wp3 setWaypointFormation "DIAMOND"; _mil8wp3 setWaypointFormation "DIAMOND"; _mil1wp4 = _mil1 addWaypoint [_targetloc1_1, 5]; _mil2wp4 = _mil2 addWaypoint [_targetloc2_1, 5]; _mil3wp4 = _mil3 addWaypoint [_targetloc3_1, 5]; _mil4wp4 = _mil4 addWaypoint [_targetloc4_1, 5]; _mil5wp4 = _mil5 addWaypoint [_targetloc5_1, 5]; _mil6wp4 = _mil6 addWaypoint [_targetloc6_1, 5]; _mil7wp4 = _mil7 addWaypoint [_targetloc7_1, 5]; _mil8wp4 = _mil8 addWaypoint [_targetloc8_1, 5]; _mil1wp4 setWaypointType "CYCLE"; _mil2wp4 setWaypointType "CYCLE"; _mil3wp4 setWaypointType "CYCLE"; _mil4wp4 setWaypointType "CYCLE"; _mil5wp4 setWaypointType "CYCLE"; _mil6wp4 setWaypointType "CYCLE"; _mil7wp4 setWaypointType "CYCLE"; _mil8wp4 setWaypointType "CYCLE"; spawnedvc = spawnedvc + 80; //Counting total number of spawned enemies, each wave is 8 groups of 10 enemies. publicvariable "spawnedvc"; {if (_x isKindOf "Man") then {deleteVehicle _x}} forEach allDead; //Delete all bodies (optional, improves performance in massive battles) }; sleep 30; }
  11. Works like a charm, thank you very much!
  12. I'm having some problems making a mission that requires the use of a laser designator. The main idea: I'm making a mission where the players will create an observation post and wait for an enemy leader to arrive in his car. There will be some traffic in the target zone, so the players will have to manually identify the actual target (the leader). When identified, the target location should be laser marked and a missile (or artillery shell) should be called and hit the designated target a few seconds later. I'm thinking something like the movie "Clear and present danger". My problem is that i only want to call in a single blast at the laser designated target. Not an entire barrage and no visible aircraft etc, just a large explosion at the laser designated position, and only available to be called once. The mission is also being created as a "clean" mission, requiring only A2 and OA, so preferrably no mods at all (well, CBA is acceptable, but nothing else). Does anyone have a script available for something like that? Either for the complete action or just for getting the position of the laser designator's target?
  13. I've been using something similar for my missions, where in some places I want the players to come under artillery attack or to have artillery shell a location close to the players' position. Since I've spent a lot of time myself searching for different types of simple scripts (I prefer to find simple examples that I can modify and build on to fit my own needs, best way of learning imho), I thought I'd post one of the simple artillery scripts I've come to use as a template. I use the trigger's positions, so you can place as many as you like. Tested in SP and MP but not on dedicated. In the triggers onAct i use nul = [thistrigger,30,15] execvm "barrage.sqf"; (generally along with a delayed sidechat or hint saying "INCOMING!" or something similar). //Call this script unsing the following command: nul = [thistrigger,30,15] execvm "barrage.sqf"; (30 is the radius from the trigger center and 15 is the number of shells fired); if (!isServer) exitWith {}; _trigger = _this select 0; _area = _this select 1; _shellnumber = _this select 2; _loc = getPos _trigger; for "_i" from 0 to _shellnumber do { _delay = random 3; _zero = createVehicle ["Can_small", [(_loc select 0),(_loc select 1),-0.3], [], _area, "NONE"]; bomb= "Bo_FAB_250" createVehicle getPos _zero; sleep _delay; }; // SOME OPTIONAL BARRAGE AMMO TYPES //Bo_Mk82 //Sh_120_HE //Bo_FAB_250 //R_80mm_HE //Bo_GBU12_LGB //Sh_125_HE //R_Hydra_HE //Sh_105_HE Basically what it does it that it spawns a number of objects (small cans) 0.3 m underground and then hits each one with the specified ammo type. _delay = random 3; can be changed to anything you like, if you want a more or less intense barrage (the number is the maximum delay between each explosion, but I've found that 3 is a good number for most barrages). The number of shells and area are provided with the trigger itself, so it can easily be adjusted for each trigger. And yes, I know it's a crude method to spawn a can object for each explosion, but it's a simple script. If you like to, you can remove the cans right before the loop ends with deletevehicle _zero; if you want to limit the number of objects on the map, but since they're placed under ground they will not be visible to the players. NOTE: The barrage will be centered around the trigger's position. A common use for me is with "Any Group Member - PRESENT" type triggers, since my missions are generally scenarios played by a single group (a few movie-reenactment type missions), or by variables set or having specific values. But it doesn't matter what actually triggers the trigger, the barrage will target the trigger location on the map.
  14. Skip the gamelogics and just initialize the variables in your init.sqf. mykills = 0; mydeaths = 0; Then for each kill/death, you simply run the command mykill = mykill + 1; (You'll probably want an eventhandler to do this whenever a kill/death occurs) You reference the values by just using the variable names. For example, if you want to display the current "score" when triggering a trigger you could use the command hint format ["Kills: %1 \n Deaths: %2",mykills,mydeaths]; //Would display a hint with the variable values.
×