Home   Help Search Login Register  

Author Topic: strafe attack script  (Read 578 times)

0 Members and 1 Guest are viewing this topic.

GI-YO

  • Guest
strafe attack script
« on: 07 Oct 2004, 12:48:36 »
I am trying to make a script that commands a cobra to fire at invisibel H's which are placed in a line so it looks like he is just strafing enemy positions and I have written a sort of script but it doesn't do anything. Any help would be appreciated.

";strafing script by GI-YO

copter1 setcombatmode "red"

copter1 selectweapon "Zunilauncher38"

copter1 dotarget "hpad"

~2

copter1 dofire "hpad"

~2

copter1 dotarget "hpad1"

~2

copter1 dofire "hpad1"

~2

exit"

copter1 is the heliocpters name and hpad and hpad1 are the invisibel helipads. thanks in advance.

GI-YO

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:strafe attack script
« Reply #1 on: 07 Oct 2004, 12:51:58 »
Forget the second pad for a moment, once you have him firing on one you can add in more.

There is an invisible target addon that might be more effective than the invisible Hs.  Search the forum for a link.

Try switching the code to this:-

copter1 dotarget "hpad"
copter1 dofire "hpad"
~4

And I know you have checked the spellings of all the names, etc., but check it again.    Check the syntax of the commands too:  you may not need the quotes " ".
Plenty of reviewed ArmA missions for you to play

Sophion

  • Guest
Re:strafe attack script
« Reply #2 on: 07 Oct 2004, 17:42:51 »
Remember distance, they can't shoot whats out of range or can't see. Try something like putting an call trigger:

Put a trigger down as 1x1 and in the condition field:
Code: [Select]
Chopper1 Distance hpad < 250Then in the action field:
Code: [Select]
[Chopper1] exec "script.sqs"
Mabe that will work, I had troubles with the Dofire comm like that, They were too far away.

Or it could be a fault in the weapon's selection (?)

Offline Zombie

  • Members
  • *
  • Beware the night, the zombie walks among you
    • USI
Re:strafe attack script
« Reply #3 on: 07 Oct 2004, 18:01:23 »
perhaps using the reveal command would help as well

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:strafe attack script
« Reply #4 on: 07 Oct 2004, 23:54:25 »
You could try Igor Drukov's chain script available here if you just need it to look like a strafing run. I would personally use Lester's Invisible Targets. I have made a script using these to follows groups or units and aircraft will fire until the  invisible target is destroyed, the targeted unit/group is destroyed, you disable it via a variable, or a group is down to a certain number of units. If I get a demo mission together this weekend, I will post it here at OFPEC.


                                                             Wadmann

Edit: I do not know if it will work, but perhaps trying to group an enemy of the aircraft to the invisible H and delete the enemy unit at the start of the mission may help to get your aircraft to fire on the invisible H.
« Last Edit: 07 Oct 2004, 23:58:04 by Wadmann »
Check out my Camouflage Collection! New items added 31 July 2005.

Dubieman

  • Guest
Re:strafe attack script
« Reply #5 on: 08 Oct 2004, 01:56:04 »
Invisible targets are the way to go here. You could just set a few down or use my script in the ed depot for a gunship support script, it comes with the addon and has a script that creates a ceratin kind of target specified by you, man or tank etc... and just set the location at an invisible helipad or two or at enemy postions...

But whatever is easiest for you. ;)

edit : here--->
http://www.ofpec.com/editors/browse.php?browseon=&browsewhat=-1&catselected=-1_-1&catagory=-1&subcategory=-1_-1&numreturn=25&displayformat=0&ofpv=1&searchwhat=1&searchlevel=0&searchwhat=1&searchopts=&searchstring=gunship&x=27&y=7
« Last Edit: 08 Oct 2004, 01:59:11 by GuiltyRoachKillar »

GI-YO

  • Guest
Re:strafe attack script
« Reply #6 on: 10 Oct 2004, 12:40:59 »
Thanks for all the advice dude's but i'm trying to learn to script and here's my first attempt so I wanna make it work, i'll check out those other scripts and see what makes them tick. Heres what I changed the script to and it works ok, but the chopper keeps circling around and attacking the last hpad4, is there a donttarget command or something similar?

";strafing script by GI-YO

copter1 setbehaviour "aware"
copter1 setcombatmode "yellow"

copter1 selectweapon "MachineGun30"

copter1 dotarget h1
copter1 dofire h1
~4

copter1 dotarget h2
copter1 dofire h2
~4

copter1 dotarget h3
copter1 dofire h3
~4

copter1 dotarget h4
copter1 dofire h4
~4


exit"

I changed the invisibel H's to brown barrels, which the chopper doe's shoot at. Thanks again.

GI-YO