Home   Help Search Login Register  

Author Topic: Mando Missile ArmA (ACCEPTED)  (Read 117930 times)

0 Members and 1 Guest are viewing this topic.

Offline ViperMaul

  • Members
  • *
    • Theatre Of War (Team PvP Campaign)
Re: Mando Missile ArmA
« Reply #30 on: 01 May 2007, 23:36:19 »
We need to get this in the bug database quickly http://bugs.armed-assault.net/.
I could not find it in there. So chances of it being fixed are probably slim.
We also will need a very bare bones example mission file of reproducing this bug.
Then attach it to the newly created bug report.

As I already told you on IM, sorry to hear about your misfortune Mandoble.
Thanks for letting me help test. Everything was working that I could see. It was exciting to see!
Hurry back!!
ViperMaul
Theatre of War (Co-Lead Dev)
ACE (Jr Project Manager)

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mando Missile ArmA
« Reply #31 on: 02 May 2007, 00:01:41 »
To demostrate the bug is quite easy. Just create a mission with several playable soldiers, in the init.sqs put:
Code: [Select]
;init.sqs
player addAction ["Kill myself", "killme.sqs"]
exit

And now killme.sqs
Code: [Select]
;A grenade is spawned near the player
_bomb = "GrenadeHand" createVehicle (player modelToWorld [0,2,1.5])
exit

Export the mission to MP and try killing you with the createdVehicle grenade.



EDIT:
Good news  :good:

Ceeeb posted a workaround here

So, to avoid the crash you only need to have a custom onPlayerRespawnAsSeagull.sqs in your mission folder. This is the one I'm using now (quite basic, BTW, but problem gone):
Code: [Select]
;onPlayerRespawnAsSeagull.sqs
_player = _this select 0
_killer = _this select 1
_seagun = _this select 2
? (isNull _killer) : _killer = player
~5
exit

If you are already using a custom onPlayerRespawnAsSeagull.sqs like Kegetys spectating script (which already uses a custom onPlayerRespawnAsSeagull.sqs script) or your mission has BASE or INSTANT respawn type, the problem will be gone too.

Note that the problem with ArmA default onPlayerRespawnAsSeagull.sqs is caused only when the killer is null, which happens every time a player is killed by spawned ammo.
« Last Edit: 06 May 2007, 12:23:57 by Mandoble »

Offline bardosy

  • Honoured Contributor
  • ***
  • campaign designer
    • CartooDiv
Re: Mando Missile ArmA
« Reply #32 on: 21 May 2007, 10:45:28 »
Hi Mandoble!

My T-key problem is more complicate as I thought, so I move our discussion from PM to here the forum.
It's a little bit OFF topic, but I hope you could help me.

I stole one of your script from Mando Missile example, when you triggered the missile to a laser target with pressing T-key.
In ArmA mission editor it's work fine. If I save the mission as Single Mission, it's work fine. But when I PBO as a campaign, doesn't work.
A thought: OK, preesing a key doesn't work in campaign, so I will change the triggering mechanism to Action Menu. And I made a new menu item, which triggered the same script, except the 'if' pressing button. And the effect was same: in editor or single mission works fine, but in campaign doesn't. So the problem is in the script not the triggering mechanism.

This is the script (I rework it a little bit):
Code: [Select]
_launcher = launcher;
_dirini = 0.0;
_lasers = [];
_firstlaser = objNull;

   if (rockets > 0) then
   {
      _lasers = (getPos player) nearObjects["LaserTarget",1000];
      if (count _lasers > 0) then
      {
         player sideChat format["%1 I have a target for you", name gunner _launcher];
         Sleep 2;

            _firstlaser = _lasers select 0;
            gunner _launcher sideChat format["Roger %1, missile on the way, keep the laser lock.", name player];
            if (!isNull _firstlaser) then
            {

_missilebody      = "Bo_GBU12_LGB";
_dir              = getDir _launcher;
_pos              = _launcher modelToWorld [0,2,1.25];
_vangle           = 30;
_speedini         = 5;
_speedmax         = 150;
_acceleration     = 1;
_target           = _firstlaser;
_boomrange        = 2;
_activerange      = 600;
_modeinit         = 0;
_cruisealt        = 180;
_boomscript       = "mando_missiles\warheads\mando_missilehead2a.sqf";
_smokescript      = "mando_missiles\exhausts\mando_missilesmoke1a.sqf";
_soundrsc         = "";
_sounddur         = 29;
_endurance        = 60;
_terrainavoidance = true;
_updatefreq       = 999;
_delayinit        = 0;
_timetocontrol    = 0;
_detectable       = false;
_debug            = false;
_launchscript     = "";

                _res = [_launcher, _missilebody, _pos, _dir, _vangle, _speedini, _speedmax, _acceleration, _target, _boomrange, _activerange, _modeinit, _cruisealt, _boomscript, _smokescript, _soundrsc, _sounddur, _endurance, _terrainavoidance, _updatefreq, _delayinit, _timetocontrol, _detectable, _debug, _launchscript]execVM"mando_missiles\mando_missile.sqf";
rockets = rockets - 1;
               
            }
    else
            {
                gunner _launcher sideChat format["Sorry %1, there is no laser signal.", name player];
            };
      }
      else
      {
          gunner _launcher sideChat format["Sorry %1, there is no laser signal.", name player];
      };
   }
   else
   {
      gunner _launcher sideChat format["Sorry %1, we ran out of missiles.", name player];
   };

And this is the line in the init.sqs:
Code: [Select]
player addAction ["Tomahawk", "tomahawk.sqf", [], 5, false, false, "T"]
Fix bayonet!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mando Missile ArmA
« Reply #33 on: 21 May 2007, 11:35:52 »
Do you get this radio message?

player sideChat format["%1 I have a target for you", name gunner _launcher];

Offline bardosy

  • Honoured Contributor
  • ***
  • campaign designer
    • CartooDiv
Re: Mando Missile ArmA
« Reply #34 on: 21 May 2007, 12:01:00 »
In mission editor and single mission YES. But in campaign I got nothing: not a radio message, not an error message.
This script doesn't RUN in campaign... :(


Maybe some global variable...? I have no other idea.
Fix bayonet!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mando Missile ArmA
« Reply #35 on: 21 May 2007, 12:27:43 »
First of all, yes, this is absolutelly offtopic here  :whistle:

Add the following hint at the beginning:

Code: [Select]
Hint format["Rockets:%1, Launcher:%2, Driver:%3", rockets, launcher, driver launcher]

These are the globals involved in your script. If any of these is null your script will not work.


Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: Mando Missile ArmA
« Reply #36 on: 13 Jun 2007, 07:03:35 »
Mando, this is one incredible script. 

My scripting talents are limited to getting soldiers to sit in the outhouse!   ::)

I was trying your demo mission using arma version 1.08, and got an error.   Figured you would be interested.  See attached screenshot.
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 Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mando Missile ArmA
« Reply #37 on: 13 Jun 2007, 09:23:24 »
johnnyboy, that is not a problem of 1.08 but a problem generated by a 100% perfect shot, that is, where the angle difference between the missile and the target is not even 0.0000001 but just 0. This problem is fixed in V2.2 (not public yet), you may apply the following change there (mando_missile.sqf) to avoid the problem in v2.1:
Code: [Select]
      _turn = _dif/_difabs;

by

Code: [Select]
   if (_difabs != 0) then
   {
      _turn = _dif/_difabs;
   }
   else
   {
      _turn = 0;
   };

Offline drafz

  • Members
  • *
Re: Mando Missile ArmA
« Reply #38 on: 16 Jun 2007, 12:12:44 »
Hi !!


i would know if mandoble could think about ask gigan permission to use his superb nuclear blast scripts.
gigan made a scud , but this part of his works isn't the best 's one.

However , his nuclear explosion is absolutly wonderfull . and i would like to know if you could include it in your mando missile gears.

Here is my personnal test mission of manual nuclear ignition
there is only 2 radio trigger. the 2nd call the nuclear blast script.
Unfortunly , i don't have your skillz in scripting , andi don't have any idea of how join a ballistic missile with this sqs script.
i simply create a marker, then make bomb explode on it.

this script (only , not scud procedure)  is MP compliant, AFAIK , i tested it with 2 player , but GIG_scud addons must be installed on all parts because some part of script call some in the addons pbo even if you include them in your mission folder.







Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mando Missile ArmA
« Reply #39 on: 16 Jun 2007, 12:23:20 »
Draft, in Mando Missile you may create your own warheads, the warhead script is passed as an argument to mando_missile.sqf script, so you may create as many as you want with as many effects as you want. I just included two example warhead scripts in V2.1 (look into mando_missiles\warheads folder).

Mando Missile V2.2 is done and I'm now fighting my lazyness to make it public. V2.2 is fully MP compatible and with many more aditions as well as some new warhead script examples. But, as with V2.1, warhead, exhaust smoke and launch scripts are parameters of the missile script (or missile launcher units scripts) so you may create your own ones as long as some parts of the code of the example scripts are keep untouched (these related to award score to the launcher unit when the target is destroyed). But anything else is custom, you may pick up the effects of that nuclear explosion and implement them into a new warhead script easily.

Offline drafz

  • Members
  • *
Re: Mando Missile ArmA
« Reply #40 on: 16 Jun 2007, 12:32:11 »
thanks you mate, i will works on it  :good:

edit: Can i add warhead script in sqs format ?
« Last Edit: 16 Jun 2007, 12:40:56 by drafz »

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mando Missile ArmA
« Reply #41 on: 16 Jun 2007, 12:57:12 »
Nope  :P only sqf. Believe me, much easier than with sqs. But if you have problems with sqf code and want to convert some warheads in sqs format, just post here the scripts and I'll try to convert them.

Offline drafz

  • Members
  • *
Re: Mando Missile ArmA
« Reply #42 on: 16 Jun 2007, 13:16:40 »
here it is .

the main exp.sqs script or expnod(amage).sqs are used to called the particle effects. and there are many sqs file  :weeping:
may the force be with you  :good:

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mando Missile ArmA
« Reply #43 on: 16 Jun 2007, 13:29:41 »
Much easier than expected  :D

Just a simple derivation using mando_missilehead1a.sqf present in V2.1


I just deleted all the FX code in the original sqf script and replaced them by a simple exec of the nuclear script.
Sadly, that script does not consider explosion height, only X and Y, so no aerial nuclear blasts.

Code: [Select]
// mando missile warhead type 1
// mando_missilehead1a.sqf v1.0
// Jan 2007 Mandoble
//
// General explosion script for mando missiles
// This script may be used as explosion script argument for mando_missile.sqf
//
// Big smoke and falling smoke debris
// Medium power explosion (equivalent to M_Ch29_AT missile).

private ["_pos", "_target"];

_pos = _this select 0;
_target = _this select 1;




[_pos select 0, _pos select 1] exec "\GIG_Scud\exp.sqs"




_pos2 = [_pos select 0, _pos select 1, (_pos select 2)];
_b2 = "Bomb" createVehicle _pos2;
_b2 setPos _pos2;
_b1 = "M_Ch29_AT" createVehicle _pos;
sleep 0.05;
deleteVehicle _b2;
exit;

Offline drafz

  • Members
  • *
Re: Mando Missile ArmA
« Reply #44 on: 16 Jun 2007, 13:59:48 »
thanks a lot .
i will try to use that. if i do face any problem, i will ask you again  :whistle:

edit:

damn it !!! there are more than ten arguments for launch the script :weeping:
Quote
Initial horizontal direction (usualy, the direction of the launcher)


i dont know what is it. could you write me a script launcher example please?

« Last Edit: 16 Jun 2007, 14:31:53 by drafz »