Home   Help Search Login Register  

Author Topic: Air to Ground & Ground to Air Fire  (Read 3775 times)

0 Members and 1 Guest are viewing this topic.

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Air to Ground & Ground to Air Fire
« on: 13 Oct 2004, 08:07:54 »
Here are a few scripts that will allow you to have aircraft attack ground troops and vice a versa. You may also use them for suppressive fire and targeting civilians. They use Lester's Invisible Targets (included in zip). As the target zip contains east, west, resistance, and civilian versions of infantry, armored, laser, and IR targets, all sorts of combat combinations are possible. As I originally wanted an onsinglemapclick type script that dynamically determined the enemy to the player and then spawned the appropriate enemy target nearby, these scripts falls far short of that goal but they do represent my first scripts made from scratch. Although they may not help those with more scripting experience than I, those with less may find them useful. The demo is very basic but I was tired of seeing others wish for scripts like these and had promised that I would get them off of my HD and posted in the near future. Feedback is welcomed but feel free to amend, upgrade, and enjoy these scripts as you see fit!

                                                    Wadmann

EDIT: Link added. Again.

[attachment deleted by admin]
« Last Edit: 03 Jun 2006, 06:49:53 by Wadmann »
Check out my Camouflage Collection! New items added 31 July 2005.

Offline Kuro

  • Former Staff
  • ****
  • 2./FschJgBtl 251 Green Devils
    • VBS2 Mission Download Site
Re:Air to Ground & Ground to Air Fire
« Reply #1 on: 14 Oct 2004, 08:43:30 »
Try to use SnYpirs SP/MP Support Package. It can do this very effective and a lot of other things.

Greetings
Kuro

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:Air to Ground & Ground to Air Fire
« Reply #2 on: 14 Oct 2004, 17:51:25 »
Hey Kuro!

Actually his pack was and still is an insiration for me! I often recommend it to others as it is a very powerful and diverse set of scipts. I looked at the unPBOed version to try to get the onsinglemapclick working with my script but quickly found that snYpir has mastered this language while I am still learning the basics. As great as his pack is, I wanted something a little different: I wanted an air unit to track and target a unit even if it moves while snYpir's pack only allows for a static strike on a predefined spot. If any of you scripting masters would like to help improve my simple script to a more dynamic version, I would appreciate it greatly. I have looked at skumball's airstrike script and feel that a version of his script combined with mine would be easier to implement than trying to figure out snYpir's complex version. When time permits, I will try to figure this out on my own but OFP III will most likely be out by then! :P

                                                        Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.

Offline Blanco

  • Former Staff
  • ****
Re:Air to Ground & Ground to Air Fire
« Reply #3 on: 15 Oct 2004, 04:05:19 »
Good scripts,They  work very well.

One suggestion :

Only the leader of the group is a target, can you make this more random?

PS : Can inv targets be destroyed? Didn't know that...

« Last Edit: 15 Oct 2004, 04:07:54 by Blanco »
Search or search or search before you ask.

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:Air to Ground & Ground to Air Fire
« Reply #4 on: 15 Oct 2004, 23:16:51 »
Blanco,

           Thanks for the compliment, especially coming from you as I think that you (and Gen. Barron) have made so many quality scripts that have filled in alot of gaps in the way the game's AI operates. I originally wanted to have the script target a random unit from an array of units that comprise the group (plus a whole lot more), but as this is my first script from scratch, this is about as far as I can go at the present time. I know that it could be done (what can't these days with so many prior barriers have been broken lately) but I do not posses the scripting knowledge to get it done myself. I know that there are functions (random select, find unit, nearest object) that could be used in the script to make a more random sequence, I just do not know how to work them into the script to get it to function properly. If you, or any other real scripter, want to take this to the next level, feel free to do so as it will only help our community as a whole. One of these days, given enough time and research, I will get an improved version out, along with a better demo. ;) I should at least update the demo mission to have at least one group on the move as that would give a better example of what I was really trying to accomplish. As for the invis target being destroyed, I wanted to put a hint in to tell me when an invis target's damage reached the max but I was unsure on how to do that also. I came to this conclusion based on my own observation as well as what others have observed but I have not been able to verify this 100%.  

                                                                       Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.

Dubieman

  • Guest
Re:Air to Ground & Ground to Air Fire
« Reply #5 on: 16 Oct 2004, 15:31:55 »
Not to drag you down or anything, but I already made a script like that.

Although its only for helis attacking or strafing. You could use for other things but its cool have you apache rain FFARS down on the enemy. :o ;D

But it looks like you have more features than mine. It doesn't matter if you make another script, take a look at mine and see how I did it and how you did, then see if you can improve it. ;)


Edit:ohh yea, mine's called Gunship support script if you wanna check it out.

Good job on the script. ;)
« Last Edit: 16 Oct 2004, 15:33:56 by GuiltyRoachKillar »

Offline Blanco

  • Former Staff
  • ****
Re:Air to Ground & Ground to Air Fire
« Reply #6 on: 27 Oct 2004, 05:45:29 »
I'm using this script in a helicopter mission and I have to say awsome job, man.

When I attack the convoy, the men inside disembark and start firing upon me. There are not doing a lot of damage, but it's the feeling that counts   :gunman:

One very small thing, but it doesn't bother me,
I can see a friendly target on my radar following my chopper.

Anyway, I tried this in many ways, but this really works!
Thank you
You'll be in the credits for sure.

« Last Edit: 28 Oct 2004, 07:09:12 by Blanco »
Search or search or search before you ask.

Offline Blanco

  • Former Staff
  • ****
Re:Air to Ground & Ground to Air Fire
« Reply #7 on: 31 Oct 2004, 07:29:49 »
Wadmann  :wave:

I'm changing your script so a random soldier in the group is the target. Every 20 seconds the script selects a new target.
I'm too tired to release it atm ,antyway  i'll doublecheck it tommorow, because I think I've forgotten something...

btw,
When I execute your ground to air script the air to ground script is not needed anymore because heli's will spot and attack groundtargets when they take bullets from them.

Another idea I had...

Why placing invisible targets on the  map when you can create them in the script?
You will need 2 new parameters to determine the side (WEST, EAST...) and type (air,man, IR,...) of the target.
Based on these parameters you can create the invisible target you need.

Cheers,

B.


« Last Edit: 31 Oct 2004, 07:31:00 by Blanco »
Search or search or search before you ask.

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:Air to Ground & Ground to Air Fire
« Reply #8 on: 31 Oct 2004, 15:58:50 »
Hey Blanco!

I am glad you are getting some use out of this script and even happier that you have upgraded it !

Quote
When I execute your ground to air script the air to ground script is not needed anymore because heli's will spot and attack groundtargets when they take bullets from them.

Very true! I noticed this also in the demo but if you want the chopper to let loose with all that they have available, then you may want to use the GTA script. I have not yet had a plane return fire on a ground unit, so it may be needed for planes to attack the ground units.

Quote
Why placing invisible targets on the  map when you can create them in the script?
You will need 2 new parameters to determine the side (WEST, EAST...) and type (air,man, IR,...) of the target.
Based on these parameters you can create the invisible target you need.

Quite honestly, I am not bright enough. :-[ As I stated in my original post:

Quote
As I originally wanted an onsinglemapclick type script that dynamically determined the enemy to the player and then spawned the appropriate enemy target nearby, these scripts falls far short of that goal but they do represent my first scripts made from scratch.

I knew that it was possible but I was not the right man for the job! Please feel free to implement this feature and post it as it will be a help to all (especially me so I can see how it is actually done! :P)!

Keep up the great work Blanco and post an upgrade when you have the time.

                                                 Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.

CptBravo

  • Guest
Re:Air to Ground & Ground to Air Fire
« Reply #9 on: 21 Nov 2004, 15:21:03 »
The one thing that was really annoying about OFP was air units seemed to take polaroid pics of battle field instead of helping out infantry on ground! So grrreat script!

A couple of questiions:

[unit to be targeted, invisible target name] exec "aatarg.sqs"
1) Where is the name of shooter/attacker? How do you specify which air unit attacks infantry?

2) Anyway to get air units to attack several ground groups with a single trig?

Also anyway to respawn or increase armor of the invisible target so it won't get detsroyed?

Great script!


Offline Blanco

  • Former Staff
  • ****
Re:Air to Ground & Ground to Air Fire
« Reply #10 on: 21 Nov 2004, 16:26:14 »
Quote
1) Where is the name of shooter/attacker? How do you specify which air unit attacks infantry?

2) Anyway to get air units to attack several ground groups with a single trig?


1) There is no name of shooter/attacker because the invisible target is visible for every enemy plane or chopper.

2) Yes, but you have to run the script multiple times in that trigger for each group.
« Last Edit: 21 Nov 2004, 16:28:10 by Blanco »
Search or search or search before you ask.

CptBravo

  • Guest
Re:Air to Ground & Ground to Air Fire
« Reply #11 on: 21 Nov 2004, 17:47:28 »
Hey thanks for the clairfication.

Only challange I am having is .. I have a mission where enemy units are group respawning. Now how do you get the air units to target such respawned  groups given that they do not have a group name and they will continue getting killed and get respawned?

I hope there is an answer to this little issue :)

Thanks

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re:Air to Ground & Ground to Air Fire
« Reply #12 on: 17 Dec 2004, 19:54:59 »
Nice script Wadmann.   Finally had time to look at it.  Nice and simple to use, which is great.
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline 456820

  • Contributing Member
  • **
Re:Air to Ground & Ground to Air Fire
« Reply #13 on: 05 Feb 2005, 11:36:39 »
how can you have it so only one group fires at the plane cause its going to be part of a mission im making halg the men attack the chopper when the other halg attacks enemy men so they all get killed

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:Air to Ground & Ground to Air Fire
« Reply #14 on: 06 Feb 2005, 07:24:09 »
Sorry for not responding quicker to a few of you but here you go:



@ Capt.  Bravo - I could not have help you any sooner as I cannot answer your question. Try a search for "name repawn group" perhaps?  ???

@ johnnyboy - Thanks!

@ 456820 - From the Invisible Target readme:

Quote
Enemy troops will attack these targets (if they are still there) before attacking most of the other targets.

I am not sure you can really do much about it.

You could try this in the activation field of the trigger that you use to call the script:

Code: [Select]
; {_x doTarget TargetName} forEach (units GroupName); {_x doFire TargetName} forEach (units GroupName)
Of course change "TargetName" and  "GroupName" to your two different invisble targets (one for the plane and one for the group of men). Hope that helps.

                                                  Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.