Home   Help Search Login Register  

Author Topic: FOSCO circular artillery (ACCEPTED)  (Read 7235 times)

0 Members and 2 Guests are viewing this topic.

Offline FoSCo

  • Members
  • *
    • FoSCo'S SiTe
FOSCO circular artillery (ACCEPTED)
« on: 16 Oct 2007, 11:03:13 »
FOSCO circular artillery

This script performs an artillery launch in a circular area.
1.0 beta
1.1 beta
1.2 beta
1.0 final

Demo mission included.
I don't know the minimum versions, but it works with "ArmA 1.08", NOT with "Operation Flashpoint".

USE ("FOSCO_circular_artillery.sqs")
target:Position that defines the center of the artillery launch (position).
ray:Ray of the bombed zone (meters).
min_com_delay:Minimum communication delay between the call and the first burst (seconds).
max_com_delay:Maximum communication delay between the call and the first burst (seconds).
min_cadence:Minimum interval between a burst and the next one (seconds).
max_cadence:Maximum interval between a burst and the next one (seconds).
blow_delay:Maximum delay of a blow by the moment of its burst (seconds).
ammo:Type of ammunitions (string).
blows(REMOVED):Number of blows for each burst (at least 1).
bursts:Number of bursts to launch (use 0 for an artillery launch with unlimited bursts).
altitude (ADDED):Altitude at which the shots will be created (meters).
artillery (ADDED):Array of objects that have the role of artillery (object).
art_weapon_cn (ADDED):Classname of artillery's weapon (string).
art_ammo_cn (ADDED):Classname of artillery's ammo (string).

USE ("FOSCO_circular_artillery_stop.sqs")
min_com_delay:Minimum communication dalay between the call and the stop of the artillery launch.
max_com_delay:Maximum communication dalay between the call and the stop of the artillery launch.

GLOBAL VARIABLES
FOSCO_circular_artillery_stop:
When the boolean variable "FOSCO_circular_artillery_stop" becomes true, the artillery is stopped.
It's resetted to false at the beginning of the "FOSCO_circular_artillery.sqs" script.
It's setted to true by the "FOSCO_circular_artillery_stop.sqs" script.
FOSCO_circular_artillery_busy:
(ADDED)
When the boolean variable "FOSCO_circular_artillery_busy" is true, the artillery is busy and it can't perform another launch.
It's setted to true at the beginning of the "FOSCO_circular_artillery.sqs", only if it was false (the artillery was free).
It's resetted to false at the end of the "FOSCO_circular_artillery.sqs" script, only if it found the variable false at its beginning (the script performed the launch).
« Last Edit: 04 Dec 2007, 20:50:15 by FoSCo »

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: FOSCO circular artillery
« Reply #1 on: 16 Oct 2007, 12:21:57 »
Some basic suggestions:
1 - _target=_this select 0, make first parameter a position instead of an object, this way markers might be used too.
2 - You might pass as argument an array of vehicles or a single one that would "act" as artillery. So if the vehicle or vehicles passed are destroyed, there will be no artillery support.
3 - _explosion= _ammo createvehicle [(_x_target+_x_gap), (_y_target+_y_gap), -0.1]. Create the ammo higher, for example at 100m, so the observers might see the projectiles falling down.
4 - _explosion setdammage 1. ArmA ammunitions cannot be damaged, they explode upon contact with terrain or another object. There is an static object named "Bomb" that will detonate when damaged, but this is the only exception and it is not an ammo, but a special static object.

Offline FoSCo

  • Members
  • *
    • FoSCo'S SiTe
Re: FOSCO circular artillery
« Reply #2 on: 16 Oct 2007, 19:04:42 »
Some basic suggestions:
1 - _target=_this select 0, make first parameter a position instead of an object, this way markers might be used too.
2 - You might pass as argument an array of vehicles or a single one that would "act" as artillery. So if the vehicle or vehicles passed are destroyed, there will be no artillery support.
3 - _explosion= _ammo createvehicle [(_x_target+_x_gap), (_y_target+_y_gap), -0.1]. Create the ammo higher, for example at 100m, so the observers might see the projectiles falling down.
4 - _explosion setdammage 1. ArmA ammunitions cannot be damaged, they explode upon contact with terrain or another object. There is an static object named "Bomb" that will detonate when damaged, but this is the only exception and it is not an ammo, but a special static object.

Thanks for the suggestions!

1 -  :good: Done.
2 -  :( I'll work with it next weekend.
3 -  :good: I have added a new argument (the tenth at last position) and a variable "_altitude" to choose at which altitude the shots will be created.
4 -  :good: Line erased.

First post edited and updated!

Offline FoSCo

  • Members
  • *
    • FoSCo'S SiTe
Re: FOSCO circular artillery
« Reply #3 on: 23 Oct 2007, 12:12:07 »
I was thinking of adding an array that handles mortars (I'll use the number of living mortars in the array instead of the "number of blows for each burst" parameter) and other parameters (in example projectiles' direction).
Do you think it is better to add everything in the call or it would be too long?
I could use global variables initialized in the script "init.sqs", or is it better to leave everything changeable between a call and the other?
What are the variables that you'd leave as parameters and not?

Thanks :good:

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: FOSCO circular artillery
« Reply #4 on: 23 Oct 2007, 12:36:07 »
If you ask me, I would add whatever is needed as parameters (quantity of parameters doesnt matter), leaving only as globals these indications that might change the script behaviour once started.

Offline LeeHunt

  • Former Staff
  • ****
  • John 21:25
Re: FOSCO circular artillery
« Reply #5 on: 24 Oct 2007, 00:42:25 »
Just tried out the demo, looks good, now maybe smoke?  This could be a good way to create a smokescreen, what do you think?

Offline FoSCo

  • Members
  • *
    • FoSCo'S SiTe
Re: FOSCO circular artillery
« Reply #6 on: 24 Oct 2007, 19:00:58 »
Just tried out the demo, looks good, now maybe smoke?  This could be a good way to create a smokescreen, what do you think?

I haven't really understood.
Now it's just possible to use "SmokeShellRed", "SmokeShellGreen" or "SmokeShell" to obtein smoke.
Is your idea to add a smoke effect to the explosion? If so, I think it would be too dense and lasting to be realistic.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: FOSCO circular artillery
« Reply #7 on: 24 Oct 2007, 19:54:18 »
I think he is referring to the ability of Artillery to lay down smoke as opposed to shelling the position with explosive shells.


Planck
I know a little about a lot, and a lot about a little.

Offline LeeHunt

  • Former Staff
  • ****
  • John 21:25
Re: FOSCO circular artillery
« Reply #8 on: 25 Oct 2007, 19:00:43 »
Yes i was thinking of the ability to call in a large scale smoke screen barrage.  Just another feature you could add, a couple more radio commands and just change the shell type as you mentioned. 

Offline FoSCo

  • Members
  • *
    • FoSCo'S SiTe
Re: FOSCO circular artillery
« Reply #9 on: 05 Nov 2007, 01:23:34 »
I published a new version (beta 1.2). Check the initial post for the link!

I added an array of units that acts as artillery and the global variable "FOSCO_circular_artillery_busy".
Using the new global variable, it's not possible to call more artillery scrips at the same time and you must to stop artillery or wait that it finishes, before you can perform a different launch. To simulate two or more artillery teams, you must create a different copy of the scripts for every team and rename in a different way the global variables and the scripts.
At the beginning of the game "FOSCO_circular_artillery_busy" must be false: is it best to use the "init.sqs" script to reset it? (now the script works, but i have read that the variables in ArmA 2 must be initialized before being used.)

Now the blows fall vertically and it's not very good. I'd like to add some realism to projectiles, creating them near artillery objects and using the setVelocity and the setDirection command, but I don't think it can be very simple.
I'll try anyway...

« Last Edit: 05 Nov 2007, 09:18:23 by FoSCo »

Offline LeeHunt

  • Former Staff
  • ****
  • John 21:25
Re: FOSCO circular artillery
« Reply #10 on: 15 Nov 2007, 02:59:16 »
hi Fosco,

I tested this out again FoSCo, good improvements on 1.2.

I do like the global variable that prevents multiple artillery launches.  I also like very much how the artillery is "real"-- for those of you who haven't tried the demo, most artillery scripts create explosions out of thin air.  FoSCo's actually requires artillery on the map up and running.  I think you could have the player not in a helicopter but right up with the artillery, so during the demo the player realizes there is actual artillery on the map etc. 

And I see that i could simply change the ammo type in FOSCO_circular_artillery_cannon to get a smoke barrage etc.  I tried that and did get an effective looking grey smoke barrage with "SmokeShell" ("SmokeShellRed" didn't look as cool). 

As for adding realism with SetVelocity to the projectiles etc, i think that would be a massive effort for an effect most people wouldn't notice in a mission etc.  Unless you have some more major changes it seems about done to me.  I'll wait to hear back from you and others though...

Offline FoSCo

  • Members
  • *
    • FoSCo'S SiTe
Re: FOSCO circular artillery
« Reply #11 on: 15 Nov 2007, 18:50:33 »
Thanks for trying the 1.2!

I agree that it's better to have the player near artillery.
I also agree of avoiding losing time in improving the fall of projectiles, but I'll add to them at least the right direction.
The last feature that I would add is to ensure that the artillery is not without crew, as well as it is alive.

However, I think that the script is almost finished and the next version probably will be the final one.

Offline LeeHunt

  • Former Staff
  • ****
  • John 21:25
Re: FOSCO circular artillery
« Reply #12 on: 15 Nov 2007, 21:27:40 »
cool looking forward to it. i think i'm gonna use it in my next mission  :D

Offline FoSCo

  • Members
  • *
    • FoSCo'S SiTe
Re: FOSCO circular artillery
« Reply #13 on: 16 Nov 2007, 13:52:29 »
Finally, the 1.0 version!!! (First post updated)

At least that you find errors or bugs, it's ready to be published.
Do I have to share it with someone or is it sufficient this post?

I added:
  • shooting cannons (they don't remain without ammunition);
  • the right direction to projectiles (the direction of each projectile depends on the cannon who shot it and the place where it falls);
  • vertical dynamic aim to cannons (it depends on the distance of the target).

That's all.

Offline FoSCo

  • Members
  • *
    • FoSCo'S SiTe
Re: FOSCO circular artillery (TESTING)
« Reply #14 on: 30 Nov 2007, 14:45:11 »
I changed the previous version, but I added only thanks OFPEC's members and staff. Sorry, but I had forgotten to add them!!! :whistle:
If you have the old 1.0, do not re-download the new 1.0.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: FOSCO circular artillery (ACCEPTED)
« Reply #15 on: 04 Dec 2007, 15:45:12 »
This resource has been accepted by OFPEC!
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: FOSCO circular artillery (ACCEPTED)
« Reply #16 on: 04 Dec 2007, 18:01:59 »
It would be nice if a pic or a utube video was added to the resource. If you have one let us know and someone can add it to the resource.
Xbox Rocks

Offline FoSCo

  • Members
  • *
    • FoSCo'S SiTe
Re: FOSCO circular artillery (ACCEPTED)
« Reply #17 on: 04 Dec 2007, 20:48:12 »
You're right!

I attached an example picture to the first post and in the "read me" too. I also added a message at the beginning of the demo mission that notifies the player that he must use the radio to try this script.
You can change the zip in the Editor Depot with the new one.

Thanks!