Jump to content

infiltrator_2k

Member
  • Content Count

    470
  • Joined

  • Last visited

  • Medals

Everything posted by infiltrator_2k

  1. I'm trying to find out a way of triggering a spawn script when a specified number of units have been killed. I found this code and it works when I set the "==" variable to whatever number I want to activate the trigger, but the code seems to include both the condition and activation. Is this because of the "if" and "then"? If so how do I edit the code to utilise both the condition and initialisation? Also is there a way of using percentages as well as numbers for counting the amount of units alive? if ( ({(side _x) == east} count allUnits) == 0 ) then { hint "no east units is alive"; };
  2. infiltrator_2k

    Enemy Count For Trigger

    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 :/
  3. infiltrator_2k

    Best Method To Freely Roam Vehicles

    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?
  4. infiltrator_2k

    Best Method To Freely Roam Vehicles

    The dismissed waypoint works fine with infantry. But with vehicles they get to the waypoint and just sit there waiting to be destroyed.
  5. infiltrator_2k

    Best Method To Freely Roam Vehicles

    I've already tried that. I hoping there's a way of awakening an AI's vehicle to seek and destroy upon receiving enemy fire or a spotter's information to the position of a local position of enemy. It doesn't seem practical or resource friendly to have you're mission littered with triggers continuously polling for conditions. An event handler would be preferred.
  6. infiltrator_2k

    Enemy Count For Trigger

    Thank you Iceman, it works a treat. Now I can spawn reinforcements when a desired number of enemy AI have been killed, oppose to when certain trigger areas have been cleared of AI. I know I need to focus more time in scripting, it's just with my job and family time is limited. Saying that I know I have to read Mr. Murray's guide as you've already recommended. ---------- Post added at 18:28 ---------- Previous post was at 17:26 ---------- I took that long to post my 2nd post I had 2 replies (one from yourself) whilst composing it LoL... Cheers chap ;)
  7. infiltrator_2k

    Enemy Count For Trigger

    So frustrated, I've spent a couple of hours trying to figure this out. Is "if" equivalent to the condition that would usually be added to a script rather than the trigger condition and "then" the equivalent to the trigger's initialization? I need some help here guys. I could just add a simple trigger in a completed task that's free from a trigger's enemy, but then I wouldn't be learning anything :/ In my trigger's init field a simple nul = execVM 'myscript.sqf'; that trigger's my script, it's just the condition I need to set.
  8. I've edited and used this script to spawn the helo and drop off troops, however, for performance reasons when the chopper's dropped off the troops I want him to fly off to marker5 and when reaching the next it I'd like the "deleteVehicle" command to delete it. I'd rather utilise reaching the marker as a trigger to keep things tidy, but what code do I add to accomplish this? I've had a look around although I can't seem to find anything other than people running commands through actual inserted waypoints and not markers. _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 "MOVE"; _wp3 setWaypointSpeed "LIMITED"; _wp4 = _crew1 addWaypoint [(getmarkerpos "marker4"), 0]; _wp4 setWaypointType "TR UNLOAD"; _wp4 setWaypointSpeed "LIMITED"; _wp4 setwaypointstatements ["this land 'land'"]; _wp5 = _crew1 addWaypoint [(getmarkerpos "marker5"), 0]; _wp5 setWaypointType "MOVE"; _wp5 setWaypointSpeed "LIMITED"; _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; _wp1a = _mygroup addWaypoint [getmarkerpos "marker3", 0]; sleep .5; _mygroup = _mygroup; { _x assignAsCargo (_airframe1 select 0); _x moveIncargo (_airframe1 select 0);} foreach units _mygroup; };
  9. infiltrator_2k

    Utilising Markers/waypoins As Triggers?

    Cheers, that makes sense. I'm glad it was a typo because it threw me and I thought I'm never going to get my head around SQF. There's no doubt about it, learning to script is a steep learning curve. I've just started reading Mr Murray's guide so hopefully I'll be able to learn something from it.
  10. infiltrator_2k

    Utilising Markers/waypoins As Triggers?

    Works a treat thanks. The algorithm looks more complicated to action a simple command than it should be though :/ I mean, the vehicle is mention a whooping 5 times in a single line. I understand the crew must be deleted before the vehicle, but why is it necessary to mention "vehicle this" 3 times? or is it a typo?
  11. Just interested guys about what made you want to learn to script and what you hope to achieve from scripting, i.e., is it just a past time, or is it more than that? Do you create to upload for example? Do you find scripting therapeutic and/or rewarding etc.. We scripters are evidently a different breed as you have Armaholics who just want to game playing custom made missions who don't like spending hours in the editor, and then there's Armaholics such as ourselves who are quite the opposite and spend more time in the editor than playing the game. I would describe myself as incredibly creative with a vivid imagination. How about you?
  12. infiltrator_2k

    Help With This Script Please

    Ahh... Chris warned people of this. It's a bug that's caused by copying/pasting from Youtube. Although he reported Youtube adding a hyphen. I just recopied and pasted and this time it adden the hyphen i.e. "[-]". Good spotting ;)
  13. I copied this script from Chris' tutorials where a helo spawns - drops troops off. Before I edited it for my requirements I thought I'd better just make sure it works as written in its original form. However, I can't even get the helo to spawn. Can anyone see anything obvious in this script? I've tested 2 other similar scripts which work, is just seems to be this particular one that doesn't work. I've checked for typos but can't see anything :/ _crew1 = []; _airframe1 = []; _mygroup = []; if (isServer) then { _crew1 = creategroup WEST; _airframe1 = [getMarkerPos "marker1", 140, "B_Heli_Transport_01_F", _crew1] call BIS_fnc_spawnVehicle; _wp1 = _crew1 addWaypoint [(getmarkerpos "marker2"), 0]; _wp1 setWaypointType "TR UNLOAD"; _wp1 setWaypointSpeed "LIMITED"; _wp1 setwaypointstatements ["this land 'land'"]; _wp2 = _crew1 addWaypoint [(getmarkerpos "marker3"), 0]; _wp2 setWaypointType "MOVE"; _wp2 setWaypointSpeed "LIMITED"; _wp3 = _crew1 addWaypoint [(getmarkerpos "marker1"), 0]; _wp3 setWaypointType "CYCLE"; _wp3 setWaypointSpeed "LIMITED"; _mygroup = [getmarkerpos "marker1", WEST, ["B_soldier_AR_F","B_soldier_AR_F","B_so***ldier_AR_F","B_soldier_AR_F"],[],[],[],[***],[],180] call BIS_fnc_spawnGroup; _wp1a = _mygroup addWaypoint [getmarkerpos "marker3", 0]; sleep .5; _mygroup = _mygroup; { _x assignAsCargo (_airframe1 select 0); _x moveIncargo (_airframe1 select 0);} foreach units _mygroup; }; Cheers Ian
  14. infiltrator_2k

    Help With This Script Please

    Thanks it's now working, or at least spawning and cycling the waypoints. But why did I have to remove it? A similar script worked with the "if isserver" present?
  15. I'm a little confused about what scripting commands to use and where to find them on Biki. I mean, I want to delete some vehicles and the crew on my mission and I Goggled this from an Armaholic's Arma 2 OA forum: {deleteUnit _x} forEach (unit fx1); deleteUnit fx1; {deleteUnit _x} forEach (unit fx2); Then I read to delete a vehicle you have to delete the crew first i.e. {deleteVehicle _x;}forEach crew heli;deleteVehicle heli; However, when I've gone to Biki I cannot find this 'deleteVehicle_x' command :/ More to the point, what commands do I use? Are Arma 1 and Arma 2 commands good to use with Arma 3? Is >>THIS<< a comprehensive list of all the commands from all the series? if so what happened to the deleteUnit_x command? Is it that BIS sometimes remove commands in order to replace them with more efficient ones?
  16. infiltrator_2k

    Biki's Scripting Commands?

    So basically all the commands in the Arma 3 commands list will do everything that the commands in Arma 2's list will do, and old Arma 2 commands are now considered surplus/obsolete (albeit still valid) as their actions can be accomplished with the new commands that came with Arma 3? Gotcha! Thanks for explaining that ;) Already I can hear Iceman77 screaming "read Mr. Murray's bloody guide!" LoL... I am going to look beyond its age I promise ;)
  17. I don't know if these >video tutorials< have been shared before, but I found these videos to be such a good resource and starting block for budding scripters like myself. Through one video alone he's explained everything I wanted to know about the basics of spawning units. P.S. If the guy (Chris) has helped you with his tutorial videos please don't forget to leave a comment and give him the thumbs up ;)
  18. infiltrator_2k

    Great Video Tutorials For Newbies Like Me :)

    I looked through it tonight and agree it looks date, and as soon as you see SQS mentioned it's a big turn off. I will have a good go at going through it though - albeit skipping the SQS parts.
  19. infiltrator_2k

    Great Video Tutorials For Newbies Like Me :)

    Nice one ;) The reason I like Chris' video tutorials is because he isn't pretentious and arrogant unlike another person's video tutorials I can think of :/ This one guy moaned about not having time to go into things and seemed to want to make the viewers profusely grateful that he had found the time to upload his clickity-clicky half baked rushed crappy video tutorial that left me more confused than before I watched it. I personally get great satisfaction from teaching people, and unless people enjoy teaching others they're better not to upload their tutorials, especially if they're hard to follow and if they ignorantly assume that the viewers are at around their competency level. It begs the question why they even want to upload tutorials in the beginning? To show people how quickly they can move their mouse perhaps. However, that guy Chris explains what is what and what does what and what goes where etc.. whilst speaking and explaining clearly and going at a pace that doesn't require the viewer to having to keep hitting the rewind button. His time and effort is hugely appreciated by noobs like me I can assure you ;) I downloaded Mr. Murray's tutorial but I've not yet read it. Does he not teach SQS too? which of course would confuse issues if he does.
  20. I'm trying to put together a realistic mortar team where an 'empty' mortar is placed down and at the beginning of the mission a mortar team takes positions on and around the actual mortar. I've used the SetUnitPos "middle"; to make the team leader and assistant gunner to kneel beside the mortar position, but what command do I use to attach the MK6 gunner to the actual empty mortar? Also, is their a way of detaching the gunner from the mortar when his position is over run as well as cancelling out the SetUnitPos "middle"; for the assistant gunner and team leader? Cheers
  21. infiltrator_2k

    Trying To Create Realistic Mortar Team

    Every mission that has mortars need an empty MK6 mortar, a mortar team where the gunner (as above command does) mounts the MK6 mortar, the assistant and team leader kneels besides the gunner and mortar - but, when an enemy closes in at a distance where the mortar is ineffective (too close), the mortar team disbands and go into normal combat mode like the rest of the AI. When however the threat subsides (the enemy leave the trigger area) the mortar team return to their initial positions. It is after all what soldiers would so in real life ;)
  22. infiltrator_2k

    Trying To Create Realistic Mortar Team

    Thanks. "moveInGunner" works. However, the mortar gunner still stays mounted to the mortar when an enemy is close (next to gunner). I think I need to figure this out with a type of remove "moveInGunner" command.
  23. infiltrator_2k

    Adding enemy planes

    Another option is to place an empty Buzzard (in formation) on the runway with a pilot nearby, highlight the pilot, select waypoints and click on the Buzzard and select the "get in" waypoint. Now add another waypoint (linked) to where you'd like the Buzzard to fly to. I usually select the "seek and destroy" waypoint on where I'd like the Buzzard to attack. The pilot will now get into the Buzzard and take-off to where ever you placed its waypoint and action. If you selected the "seek and destroy" it will circle the location and target/attack enemies.
  24. I'm interested how individual people have learnt to script, how long it took them, the resources they used, the best way method of learning and if they have any tips, advice to pass on to others like myself. I've grasped the logic, but looking at the code along with all the different characters and spacing appears daunting to merely look at. Is it through memory that you remember where and what goes where, or is it setting out the algorithm in orderly fashion that guides you to what goes where. Is the code forgiving? Will throw an error is a character isn't spaced exactly in the right position for example? Please share your unique experiences with learning how to script with dos and don'ts and any information that you think will help potential scripters.
  25. infiltrator_2k

    How Did You Learn To Script?

    ATM I'm just analysing the mortar script you rewrote and cross referencing what's been written with Biki. It's definitely not a script for newbies :)
×