Home   Help Search Login Register  

Author Topic: Adding Artillery to snYpir's SP/MP Support Pack  (Read 907 times)

0 Members and 1 Guest are viewing this topic.

Mox2002

  • Guest
Adding Artillery to snYpir's SP/MP Support Pack
« on: 18 Jul 2003, 01:46:07 »
Hi, first of all I would like to thank Snypir for releasing this awesome pack,
it realy saves me a lot of work.

Second, I've got a problem I hope someone has run into before and knows
the answer to solve it.

When I want to add artillery to the script it works fine, I create a new
marker, add a new unit to the script and new ammo, then I add it to the artillery array. The problem is the units spawn correctly as a new battery which is also
able to fire but whatever addon I use, the fireing doesnt seem to
get animated. The shells fall (by the script), but the guns stay silent themselves.

This doesnt happen with the M1A1 and M198addon which Snypir used himself
to demonstrate the script so obviously I must do someting wrong..but I cant find what it is.

Plz help, Ive spent many hours on this:((
If someone wants to take a look at the script Ive got so far Ill upload/mail it.
Ive tried using several M109 addons and CptMoores m101a artillerie..sofar no luck.
« Last Edit: 18 Jul 2003, 02:15:17 by Mox2002 »

Mox2002

  • Guest
Re:Adding Artillery to snYpir's SP/MP Support Pack
« Reply #1 on: 18 Jul 2003, 21:10:15 »
Plz help

rudyvarner

  • Guest
Re:Adding Artillery to snYpir's SP/MP Support Pack
« Reply #2 on: 19 Jul 2003, 17:11:16 »
I just did this.  You have to make sure you have the weapon name in the _simulate_artillery variable:  here are a few examples.

; M46, requires addon available at http://www.dkm-mod.mkdi.net/weapon.html
_simulate_m46 = ["HOWITZER","DKMM_M46","SoldierWCrew",135,"DKMM_Gun130"]

; Palladin, requires addon available at ftp://www.gamezone.cz/ofpd/unofaddons2/m109palladin.zip
_simulate_palladin = ["SP","M109_Palladin","SoldierWCrew",30,"m182"]

; Mortar, requires addon available at ftp://www.gamezone.cz/ofpd/unofaddons/up_mortar_en.rar
_simulate_mortar = ["SP","mortar","SoldierWCrew",30,"wmortar"]

I found the easiest way to figure out the weapon name is by integrating the debug spectator script into yopur missions and then adding the unit to the game and the spectator script will list the weapon and magazine names for each unit you are viewing.  Much easier than dePBOing each unit and sifting through the config.cpp file.

The only problem I've run into is the non-howitzer units except for the M1's never point the correct direction when firing.

You can D/L the script here at the editors depot.

Hope this helps.

Rudy
« Last Edit: 19 Jul 2003, 17:13:36 by Rudedog »

Mox2002

  • Guest
Re:Adding Artillery to snYpir's SP/MP Support Pack
« Reply #3 on: 20 Jul 2003, 22:30:54 »
Rudedog this helped, thanks a lot!

Indeed the arty is never pointing in the right direction which makes it pretty
anoying when you want to go for all out realism.
It just sucks major a** if youve got 4 m109's reloading with their guns pointed backwards and following up on it by just blasting away in some
random direction.
I begin to think that my way (explosions impact without seeying the guns shooting wasnt so bad at all, :( )
The problem most likely recides in the supplied PBO from SnYpirs, there's a artillery_turn.sqs in it wich could do some refining(?)...but I need to get a LOT better at scripting first before I even go there.

Offline Dinger

  • Contributing Member
  • **
  • where's the ultra-theoretical mega-scripting forum
Re:Adding Artillery to snYpir's SP/MP Support Pack
« Reply #4 on: 22 Jul 2003, 23:27:38 »
If I understand it correctly, snYpir's support pack doesn't support "Real" artillery, in the sense that the firing units are just there for show, i.e., they don't actually fire the rounds that hit.

That's an even more complicated task that requires a mess of coding.
;)


Dinger
coc Unified Artillery project.
Dinger/Cfit

rudyvarner

  • Guest
Re:Adding Artillery to snYpir's SP/MP Support Pack
« Reply #5 on: 23 Jul 2003, 00:01:53 »
Actually, yes,  it is a simulation.  But you can add units, and he has the functions to turn the turrets toward the target, but, (You use SP for vehicles with turrets) they get messed up.  Sometimes blowing each other away.  Plus they all turn in random directions. It's actually like they are in a wedge formation and the turrets are turned like when they are covering the different areas.  Then they get all outta sync when they get a call.  I wonder if it is a formation that is affecting it.

When's Snypir gonna be back?  We miss him!  ;)

Offline Dinger

  • Contributing Member
  • **
  • where's the ultra-theoretical mega-scripting forum
Re:Adding Artillery to snYpir's SP/MP Support Pack
« Reply #6 on: 23 Jul 2003, 03:44:49 »
I'm putting CoC_Arty into VSS for final tweaking. Shortly (in a few hours) I can slip you CoCfIFTurnToTarget.
Format:
[unit, azimuth, elevation] call CoCfIFTurnToTarget

But I still say you're better off waiting for UA. ;)

Dinger/Cfit

Offline Dinger

  • Contributing Member
  • **
  • where's the ultra-theoretical mega-scripting forum
Re:Adding Artillery to snYpir's SP/MP Support Pack
« Reply #7 on: 23 Jul 2003, 16:27:26 »
Code: [Select]
comment "turntotarget/dinger@thechainofcommand.com";
private ["_myunit", "_azimuth", "_elevation", "_pos", "_posx", "_posy", "_posz", "_range", "_xelement", "_yelement", "_zelement"];
_myunit = _this select 0;
_azimuth = _this select 1;
_elevation = _this select 2;
_pos = getpos _myunit;
_posx = _pos select 0;
_posy = _pos select 1;
_posz = (_pos select 2)+1;
_zelement = _posz + (1000 * (sin _elevation));
_range = 1000 * (cos _elevation);
_xelement = _posx + (_range * (sin _azimuth));
_yelement = _posy + (_range * (cos _azimuth));
_zelement = _zelement - ([_myunit, _azimuth, _range] call CoCfIFelevation);
_myunit dowatch [_xelement, _yelement, _zelement];

Code: [Select]
comment "elevation/dinger@thechainofcommand.com";
private [{_subject}, {_direction}, {_range}, {_distance}, {_elevation}];
_subject = _this select 0;
_direction = _this select 1;
_range = _this select 2;
COCIFWidgetA setpos [(getpos _subject select 0)+ (_range * (sin _direction)), (getpos _subject select 1)+ (_range * (cos _direction)), 0];
_distance = _subject distance COCIFWidgetA;
COCIFWidgetA setpos [getpos COCIFWidgetA select 0, getpos COCIFWidgetA select 1, sqrt ((_distance ^2)-(_range^2))];
_elevation = (acos (_range/_distance))*((({COCIFWidgetA distance _subject > _distance} count [0])*2)-1);
if (format ["%1", _elevation] == {-1.#IND}) then {_elevation = 0};
_elevation
« Last Edit: 23 Jul 2003, 16:32:21 by Dinger »
Dinger/Cfit

Mox2002

  • Guest
Re:Adding Artillery to snYpir's SP/MP Support Pack
« Reply #8 on: 26 Jul 2003, 14:52:16 »
Thanks Dinger, Ill have a look at it asap and ofcourse Im lookin forward to your release as well  ;)