Jump to content

infiltrator_2k

Member
  • Content Count

    470
  • Joined

  • Last visited

  • Medals

Posts posted by infiltrator_2k


  1. Look at the return value for BIS_fnc_spawnVehicle

    _tankcrew = createGroup EAST;
    _tankframe = [getMarkerPos "SpawnA", 180, "O_MBT_02_cannon_F", EAST] call BIS_fnc_spawnVehicle;
    
    _Vehicle = _tankframe select 0; // The Vehcile object.
    _Crew = _tankframe select 1; // Array of all the units i.e. : [unit1,unit2,unt3.....]
    _tankcrew = _tankframe select 2; // Group
    
    _wp = _tankcrew addWaypoint [getmarkerpos "SpawnA", 0];
    _wp setWaypointType "SAD"; 
    _wp setWaypointSpeed "LIMITED"; 
    _wp setWaypointBehaviour "NORMAL"; 
    

    I've got it working, but what actually went on? I can see that the _tankframe variable as been assigned the global variable of _Vehicle, which of course I had to rename as Vehicle is itself a command and make a local variable in order to use it in a trigger condition. But how did the select command use that particular element order when the elements can't be seen in an array to reference from? And what's with the _crew variable? Is it a variable where I can actually assign names to the actual tank crew?


  2. This is doable with a simple trigger set to repeatedly.

    in the condition field put:

    speed yourchoppername < 45 && (getPosATL yourchoppername) select 2 < 8

    in the on act put:

    yourchoppername animateDoor ["door_back_R",1]

    in the deact put:

    yourchoppername animateDoor ["door_back_R",0]

    the animation name for the chopper could vary, this one is for the mohawk

    Just an update on that, the door animation doesn't work on the PO-30. I have no idea why BIS haven't fixed this.


  3. _tankcrew = createGroup EAST;
    _tankframe = [getMarkerPos "SpawnA", 180, "O_MBT_02_cannon_F", EAST] call BIS_fnc_spawnVehicle;
    sleep 1;
    TVehicle = _tankframe select 0; // The Vehcile object.
    _Crew = _tankframe select 1; // Array of all the units i.e. : [unit1,unit2,unt3.....]
    _tankcrew = _tankframe select 2; // Group
    
    _wp = _tankcrew addWaypoint [getmarkerpos "SpawnA", 0];
       _wp setWaypointType "SAD"; 
       _wp setWaypointSpeed "LIMITED"; 
       _wp setWaypointBehaviour "NORMAL"; 
    
    TVehicle setdamage 1;// works fine in script or in trigger

    Whatever your doing it's not the script it's working just fine here.

    How are your trigger settings, does the vehicle spawn at game start?

    For testing make sure there are no other OPFOR units in Trigger area.

    Stupid ass me not removing the underscore in the script :/ I was thinking you still had to include the underscore in the script. I didn't know you could use local variables in a script. I thought the were only used in an object's init field. But it's all working good now thanks guys . I knew it was something I was doing wrong my end, I just didn't know what.


  4. Look at the return value for BIS_fnc_spawnVehicle

    _tankcrew = createGroup EAST;
    _tankframe = [getMarkerPos "SpawnA", 180, "O_MBT_02_cannon_F", EAST] call BIS_fnc_spawnVehicle;
    
    _Vehicle = _tankframe select 0; // The Vehcile object.
    _Crew = _tankframe select 1; // Array of all the units i.e. : [unit1,unit2,unt3.....]
    _tankcrew = _tankframe select 2; // Group
    
    _wp = _tankcrew addWaypoint [getmarkerpos "SpawnA", 0];
    _wp setWaypointType "SAD"; 
    _wp setWaypointSpeed "LIMITED"; 
    _wp setWaypointBehaviour "NORMAL"; 
    

    But I can't use _vehicle in a trigger as it's a 'local variable' in a global space :/


  5. I've been trying to name this script spawned vehicle without success. Every posted answer to this type of question hasn't worked. Can someone please tell me what code I need to enter to this script to name the vehicle.

    Cheers

    Ian

    
    _tankcrew = [];
    _tankframe = [];
    
    
    if (isServer) then {
    
    
    _tankcrew = creategroup EAST; 
    _tankframe = [getMarkerPos "SpawnA", 180, "O_MBT_02_cannon_F", _tankcrew] call BIS_fnc_spawnVehicle;
    _SpawnA = _tankcrew addWaypoint [(getmarkerpos "SpawnA"), 0];
    _SpawnA setWaypointType "SAD";
    _SpawnA setWaypointSpeed "LIMITED";
    _SpawnA setWaypointBehaviour "NORMAL";
    
    
    };
    
    sleep .50
    
    


  6. Thanks man. Your guide taught me more in 15 min of reading then the hours I've spent in the past trying to learn this.

    I'll 2nd that! I've read the first chapter and I'm on the second. There's no bones about it, by merely reading the guide it would have potentially saved me hours of time messing around with the process of elimination of managing to accomplish things. It's incredibly rewarding too to finally understand what was initially "WTF???" Although I've not put together my own script yet I feel I now understand how it all works thanks to the guide.

    Nice one Mikie ;)


  7. I recently opted to go over to the Dev simple to remedy the broken Task Module. I know you can script around this issue although I wanted to keep up to date with the bug fixes. I created a mission a couple of months ago that had a shed load of AI, but I used the Simulation Module to save on resources - thus giving those who had low spec machines a half decent frame rate. I noticed that a friend who had a sluggish CPU suddenly dropped from 21-22FPS to 8-9FPS. I trawled through the debugging log and found no real performance hindering issues so just created another smaller mission that had less AI.

    From finding out of the issue regarding the bug in the Task Module I now suspect that the Simulation Module was also broken. At the time I dismissed this as I done a thorough check of the obvious not realising that modules were breaking only when another player joined. Can someone confirm that the Simulation Module is also broken like the Task Module? or did I have another issue? I can't seem to see anything obvious listed on BIS' page of 'known issues' underlining the broken module(s)? So I'm wondering what else is broken that hasn't been listed and many don't know about :/

    Cheers

    Ian


  8. My mission is quite dynamic in the sense that vehicles and troops spawn on various !alive and enemy count triggers etc. I've set this way to not even I know when to expect things to happen. Same with the enemy AI, I've set many with 33% presence with SAD waypoints, that way the game's more fluid and exciting to play. My only issue is having to many spawn scripts cluttering up my mission folder. Is it possible to put all of these spawn scripts into one script if they use multiple triggers?

    I ask this because the numerous scripts obviously don't trigger in a specific order so I'm not sure if it's possible or not.

    Cheers Ian


  9. apparently it's because the Set Task State modules are broken. some people are saying it's fixed on dev branch but there's been threads about this since august of last year. if it really is fixed on dev branch then that's pretty sad on bohemia's end. they work fine when you host in game but they're broken on dedicated.

    The tasks are also broken when you host a mission. I've created a mission and it's fine right up until someone joins, then all of the tasks complete. I've just downloaded the Development Build but I'm yet to try my mission out as I'm waiting for a friend to join and test it later. What are the downsides of the Dev Build if it fixes bugs? Already I've noticed a minor fix on a ladder climb that never worked with the stable version.


  10. Sorry I drift in and out of this forum but time really is a luxury with my job and young family :/ But basically I'd just like to add some realism and eye candy by adding the animateDoor command to this script by having the chopper's doors open when the AI are about to unload and close when the chopper's unloaded and about to take-off. Having the AI just dismount through a solid door sucks and looks glitchy.

    _crew1 = [];
    _airframe1 = [];
    _mygroup = [];
    
    if (isServer) then {
    
    _crew1 = creategroup EAST; 
    _airframe1 = [getMarkerPos "marker1", 180, "O_Heli_Light_02_F", _crew1] call BIS_fnc_spawnVehicle;
    
    _wp2 = _crew1 addWaypoint [(getmarkerpos "marker2"), 0];
    _wp2 setWaypointType "MOVE";
    _wp2 setWaypointSpeed "LIMITED";
    
    _wp3 = _crew1 addWaypoint [(getmarkerpos "marker3"), 0];
    _wp3 setWaypointType "TR UNLOAD";
    _wp3 setWaypointSpeed "LIMITED";
    
    _wp4 = _crew1 addWaypoint [(getmarkerpos "marker4"), 0];
    _wp4 setWaypointType "MOVE";
    _wp4 setWaypointSpeed "LIMITED";
    _wp4 setwaypointstatements ["this land 'land'"];
    
    _wp5 = _crew1 addWaypoint [(getmarkerpos "marker5"), 0];
    _wp5 setWaypointType "MOVE";
    _wp5 setWaypointSpeed "LIMITED";
    _wp5 setWaypointStatements["true", "{deleteVehicle _x} forEach crew (vehicle this) + [(vehicle this)]; deleteVehicle (vehicle this)"];
    
    _mygroup = [getmarkerpos "marker1", EAST, ["O_Soldier_F","O_Soldier_F","O_Soldier_F","O_Soldier_F","O_Soldier_F","O_Soldier_F","O_Soldier_F","O_Soldier_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;
    
    _wp4a = _mygroup addWaypoint [getmarkerpos "marker4a", 0];
    
    sleep .5;
    _mygroup = _mygroup;
    { _x assignAsCargo (_airframe1 select 0); _x moveIncargo (_airframe1 select 0);} foreach units _mygroup;
    }; 
    
    waitUntil { (currentWaypoint (_wp5 select 0)) > (_wp5 select 1) }; 
    
    


  11. From spending time in the editor creating missions and tasks, I've realised how CPU intensive Arma is with any AI that generally moves. My solution for this is either using the simulation module manager, or in urban CQC wave spawning the AI, that way you don't get the AIs disappearing in front of you eyes as you back away from say an intensive fire fight. However, I haven't a solution for vehicle in an urban CQC environment. I my only real resource saving method is to spawn vehicles in waves and use the seek and destroy waypoint. But then you have how many vehicles you've spawn roaming around the map until they're destroyed.

    For reality purposes I'd ideally like to have the majority of vehicles already positioned on the map, but parked and doing nothing but sitting there until some action comes along.

    My question is: is it possible to create a script that does the following and if so how much scripting will be involved? :

    Have vehicles spawn in formation at a fixed location, but when the vehicle is taking fire or an enemy is spotted within a set distance the vehicle automatically goes into 'seek and destroy' to kick it into action. However, when the incoming fire has stopped for a set amount of time, and/or and the enemy is no longer visible to the enemy for a set amount of time the vehicle then goes back into a dormant 'in formation' type state - thus saving system resources instead of endlessly roaming around the map.

    Is this achievable through scripting? or even better still, is there anything in the editor that can perform this type of action/behaviour? I guess it could in theory also apply to helicopters too i.e. take-off and land when a threat has dissipated.

    Cheers

    Ian


  12. if spawnA is a marker you can use it as a center point and spawn the vehicle somewhere around that point by doing for example this:

    _pos = getMarkerPos "SpawnA";

    _RandomPos = [_pos, 0, 200, 30, 0, 5, 0] call BIS_fnc_findSafePos;

    _tankframe = [_RandomPos, 180, "O_MBT_02_cannon_F", _tankcrew] call BIS_fnc_spawnVehicle;

    check this out : http://tactical.nekromantix.com/wiki/doku.php?id=arma2:scripting:bis_fnc_findsafepos

    That's awesome cheers ;)


  13. I've been digging around how to create random enemy spawn points but without much success. Basically I'm trying to find out the most simplest and effective way of adding random spawn points for AI units instead of them predictably spawning on one particular marker. Can someone please tell me what line of code will I have to add to get this MBT to spawn at multiple random markers?

    _tankcrew = [];
    _tankframe = [];
    
    
    if (isServer) then {
    
    
    
    _tankcrew = creategroup EAST; 
    _tankframe = [getMarkerPos "SpawnA", 180, "O_MBT_02_cannon_F", _tankcrew] call BIS_fnc_spawnVehicle;
    
    
    _wp1 = _tankcrew addWaypoint [(getmarkerpos "WP1"), 0];
    _wp1 setWaypointType "SAD";
    _wp1 setWaypointSpeed "FULL";
    _wp1 setWaypointBehaviour "COMBAT";
    
    
    
    };
    

    Cheers

    Ian


  14. Probably will get some much more experienced mission makers / scripters replying to this but here's my two cents worth having made many missions for our private dedi server that would be considered ai heavy but run very well.

    Firstly go through your buddies GFX settings if he hasnt already - A couple of our guys were getting bad FPS while others were hitting 50+ in a fully populated CQB fight through Kavala after going through their gfx settings and basically knocking it all back a bit both of them were amazed at how well it ran. Not going to go into what settings to use as everyone will have their own idea but for the slight reduction in quality is well worth the increase FPS. Oh and ULTRA anything is a no no on MP missions unless you have some nasa esque stylye PC.

    I think the easiest way to gain performance is looking at using some sort of ai cacheing script and spawning stuff in as and when you need it, Personally I would recomend EOS by bangabob for spawning infantry (not so good for vehicle IMHO) but for infantry its very good. We are using it (ver 1.8) in our current mission and all of us agree with 10 players and up to about 50-60 ai the performance is stunning. Occasionally it gets up to 80 - 100 ai and in larger towns we start to notice a performance drop.

    View distance can be a killer maybe limit it or turn the grass off.

    I dont think empty vehicles will cause too much of a perfomance drop.

    Looking into trigger spawning site modules is easy enough, but trigger spawning objects and additional AI, vehicles is going to be a balls ache and too labour intensive. I think the simulation managers should suffice. There's something causing the drop in FPS. Saying that, I often let him host and when I researched server lag the person's PC build will determine the hosted game's performance. If he's got a weal CPU it'll be best that I host. An i7 920 @ 4.0Ghz still seems to cut the mustard :)


  15. The mission I have created is a Stratis map, although it's fully loaded with AI, AI occupied static vehicles (to save on performance), 3 mobile aircraft and a mobile tank. The AI at the military sites have simulation managers so there's not a lot going on unless you're the set 1KM within range. I've found the map playable averaging 28 FPS, although a friend who has an inferior Xeon CPU that hits about 2.7K on CPU Benchmark is struggling averaging between 9-15 FPS. He's moaning because on other people's maps he can get close to 35-40 FPS.

    I've checked my map's the RPT log but can't find anything obvious. I use to run my mission's tasks one by one, meaning task 2 would popup once the player(s) completed task one, but as there AI units were already spawned I though it was unpractical to control the order players were tasked to complete missions. My question is what's the best way to spawn new assets at different sites when a trigger has completed a designated task. I ask this because I figure it will safe on performance. Not only that, but as I've created a MP mission if I have 8-10 players all over the map the simulation management isn't going to much use when all the players could potentially be within range of the 8-10 different sites thus cancelling out the performance saving feature.

    I've learnt how to spawn site modules via its trigger option, I'm just wondering the most practical way of spawning the sites additional assets, i.e. vehicles, items and additional AI soldiers. Will I have to create the spawn scripts that run on the same trigger that activates spawning the site module? Also, if that's the case will I have to create say 10 separate scripts for spawning assets at 10 different sites? or can it be done with one script?

    One more question: I have a lot of empty vehicles on my map to simulate vehicle depots, does this cause performance issues?

    Cheers

    Ian


  16. I've spent some time now trying to get this to work but with no success. Basically I've triggered spawned this vehicle but I can't get it to 'seek and destroy, it just sits there at waypoint wp3. Do anyone know what I've done wrong and what I need to do to get the vehicle to do the seeking and destroying?

    Help much appreciated guys because I've been trying to sort this for several hours now :/ But the silver lining is I'm learning :)

    
    _tankcrew = [];
    _tankframe = [];
    
    
    if (isServer) then {
    
    _tankcrew = creategroup EAST; 
    _tankframe = [getMarkerPos "tankstart", 180, "O_MBT_02_cannon_F", _tankcrew] call BIS_fnc_spawnVehicle;
    
    _wp1 = _tankcrew addWaypoint [(getmarkerpos "wp2"), 0];
    _wp1 setWaypointType "MOVE";
    _wp1 setWaypointSpeed "NORMAL";
    _wp1 setWaypointBehaviour "STEALTH";
    
    
    _wp2 = _tankcrew addWaypoint [(getmarkerpos "wp3"), 0];
    _wp2 setWaypointType "MOVE";
    _wp2 setWaypointSpeed "FULL";
    _wp2 setWaypointBehaviour "STEALTH";
    
    
    _wp3 = _tankcrew addWaypoint [(getmarkerpos "WP3"), 0];
    _wp3 setWaypointType "SEEK AND DESTROY";
    _wp3 setWaypointSpeed "FULL";
    _wp3 setWaypointBehaviour "COMBAT";
    
    
    };
    
    


  17. if you are carrying out a reinforcement script and learning the basics - good to keep an eye on groups numbers. Maximum group count i think is 250 (someone may correct me). Therefore its handy to see how many groups are in existence and how to remove said groups to ensure you have room to create more. Also its a means of learning efficient scripting.

    while {true} do
    	{
    	  { 
    	  if ((count (units _x)) == 0) then 
    	     {
    		 if (side _x == EAST) then 
    
    			{deleteGroup _x; _x = grpNull; _x = nil};
    	     };
    	   } foreach allGroups;
    	   sleep 60;
    	 };
    

    just something to consider

    Cheers Mikie boy. I thought I'd let the players remove the AI to trigger the reinforcements script. I understand the logic of it all, it's just the SQF language that is the steep learning curve. I'm looking at the code above and trying to get my head around it :/


  18. The impact of a few (or a dozen for that matter) seek&destroy waypoints is not that high. Of course like you say not the most resource friendly way, but not that big an impact on performance imo. I would just use a hold/move waypoint for the AI and then a trigger with the condition of when they should use the seek&destroy waypoint (if the mission is not huge). In the end a patrol script does basically the same (in my understanding) and lets AI seek&destroy in slow_safe mode within a radius.

    Fascinated with military tactics I've paid attention to real life combat scenarios in Syria where the SAA in armoured vehicles record their battles when taking on the FSA who roam the cities on foot with RPGs, high velocity rifles with armour piercing rounds and anti-tank missiles. If there's one thing the SAA don't do it's sit still when under fire or if an enemy is near. Although in armoured vehicles they know if they stay in one location they FSA will get a fix on their location and destroy them. The same should apply with AI tanks in Arma. Popping smoke and moving tactically when under fire would be a good script to write. Sadly I lack the knowledge to do it :(

    I've used Spunfin's Militarize script, although when adding vehicles they're incredibly dumb and run over too many soldier units. The vehicle's speed also fluctuates wildly when in real life whenever armoured vehicles are any where near foot soldiers their speed would be constantly limited for obvious reasons. I've been fortunate to have driven a variety of armoured vehicles when I served in the British Army and no-one would dare move around faster than limited when there were pedestrians/soldiers around whilst also being in coms with the commander or have eyes on a banksman. In short you'll never see armoured vehicles driving faster than limited when there are troops on the ground nearby unless of course the vehicles on point in combat and the same should ideally apply in Arma for added realism.

    More to the point, how would an armoured vehicle react when under fire? For starters it in all probability wouldn't stay in the same location and be a sitting duck unless it had a definite target lock on the incoming attacker(s) to immediately return suppressive fire. Has anyone even seen an AI tank pop smoke yet?

×