Home   Help Search Login Register  

Author Topic: Creating a motar laucnh bombing  (Read 2721 times)

0 Members and 1 Guest are viewing this topic.

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Creating a motar laucnh bombing
« on: 20 Feb 2010, 17:21:12 »
hi, I want to create a mortar barrage on a city, using a certain radius and a designated number of shells.

I'm a beginner scripter, how do I accomplish this goal?

thanks.no idea how to script this, thank you.
Who's hyped for Arma4, long live Arma!

Offline bardosy

  • Honoured Contributor
  • ***
  • campaign designer
    • CartooDiv
Re: Creating a motar laucnh bombing
« Reply #1 on: 22 Feb 2010, 07:40:31 »
Hey, the new, yound fellow ofpec-members will blame me, but I'm an oldskul, elder guy, so here it is my solution:
It not uses the Arm,A2's arty module, it just create shells in the air above the city and fall down...
You can change the radius and the timings and the shell-type. When I use this script ON player I don't like the heavy shells, because it easily kill the player and not a big fun. But if you  need to destroy that town, you can use heavier shells...

Code: [Select]
_target = _this select 0
_radius = _this select 1
_tx = getPos _target select 0
_tz = getPos _target select 1

noneedarty = false

#loop

_shell = "G_40mm_HE" createVehicle [_tx+(Random (2*_radius))-_radius,_ty+(Random (2*_radius))-_radius,80];

~(Random 5)+5
?(noneedarty): exit
goto "loop"


Copy this text into a textfile and name it: mortar.sqs
Then you can call eg: [townGameLogic, 80] exec "mortar.sqs"
Where townGameLogic is the name of a GameLogic in the center of your target town and 80 is the radius of strike.

If the strike is not heavy enough,
you can change the "G_40mm_HE" for "Sh_125_HE"...

If the strike is not intense enough, you can change "~(Random 5)+5" to "~(Random 3)+2"
Fix bayonet!

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re: Creating a motar laucnh bombing
« Reply #2 on: 22 Feb 2010, 17:22:01 »
Hi Thank you bardosy, you are like one of the kings for editing and these games. cheers..I'll use this, i wish I could actually have the soldeirs lauch shells from the mortars to the city and not just create the effect but this will do.

I'll let you know how it goes.
Who's hyped for Arma4, long live Arma!

Offline bardosy

  • Honoured Contributor
  • ***
  • campaign designer
    • CartooDiv
Re: Creating a motar laucnh bombing
« Reply #3 on: 23 Feb 2010, 07:55:18 »
Ok, I understand. In that case, you need something complicated. It will uses the Arty Module.

My advice is to download my campaign (from Beta Test thread, it name is PIROG), dePBO it, find mission #2, copy it to your editing folder and open it with ArmA2.

This mission is started with exactly the same as you want: the enemy (in my mission CDF) uses his real mortar battery against a village. And the player has to eliminate the battery (kill the crew) and stop bombarding.

Check my mission and if you don't understand, just ask here!
Is it help you?
Fix bayonet!

Offline RangerX3X

  • Members
  • *
  • Ranger, out.
    • RangerX3X
Re: Creating a motar laucnh bombing
« Reply #4 on: 23 Feb 2010, 11:50:45 »
I submitted this some time ago to the resource center...you may find it useful in some scenarios:

http://www.ofpec.com/forum/index.php?topic=34633.0

Also, my beta mission Operation Stone Bell uses this but adds Resistance mortars to the Russian and American mortars:

http://www.ofpec.com/forum/index.php?topic=34653.0

Feel free to use them at your discretion.
Ranger, out.

Offline Bahger

  • Members
  • *
Re: Creating a motar laucnh bombing
« Reply #5 on: 23 Feb 2010, 21:28:55 »
How do you de-PBO a mission?

Offline RangerX3X

  • Members
  • *
  • Ranger, out.
    • RangerX3X
Ranger, out.