Home   Help Search Login Register  

Author Topic: Endless fire on MG's, grrrrrr  (Read 969 times)

0 Members and 1 Guest are viewing this topic.

ocnick

  • Guest
Endless fire on MG's, grrrrrr
« on: 01 Sep 2004, 03:31:19 »
I got a mission that uses the Tonal pack (not sure if that's part of the reason), with some of the MG's provided in it.

My problem is that once the gunner is dead, the ai seems determined to destroy the gun.  It doesn't matter who's next to the gun, or how close the ai are.  They could be 1 meter away, firing in auto until the thing blows up killing half the squad.

This really ruins my mission, and my happy mood  >:(.  Any ideas on ways I could solve this?

BTW, I'd like to avoid destroying the gun as soon as the gunner is dead, to leave it open for use.

Can you setcaptive an empty vehicle?

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Endless fire on MG's, grrrrrr
« Reply #1 on: 01 Sep 2004, 08:26:36 »
Try this:

Once the gunner is dead, get the direction and the position of the MG.
deletevehicle MG
create a new MG with the same direction and poistion

It might not look good but it's better than having half a platoon laying down fire on an empty MG.

:beat: *Gets Shot* :beat:

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Endless fire on MG's, grrrrrr
« Reply #2 on: 01 Sep 2004, 09:54:26 »
This is a common problem (its nothing to do with Tonal) and there are a number of ways round it.    Use the forum search function.    There is a script which detects if the gunner is dead and orders one of the nearby loons to getin to the gun, for example.

However, I think if you place an empty M2 with a loon beside it with "this moveInGunner myM2" in his init line, it does the trick.

Plenty of reviewed ArmA missions for you to play

Offline Blanco

  • Former Staff
  • ****
Re:Endless fire on MG's, grrrrrr
« Reply #3 on: 01 Sep 2004, 16:28:21 »
Armstrong is right, creating an new empty gun at exact the same position is the only solution. I've wrote a simple script for that a few weeks ago.


emptygunfix.sqs
Code: [Select]
 

;[name of gun] exec "emptygunfix.sqs"
_gun = _this select 0
_guntype = typeof _gun
_gundir = getdir _gun
_gunposx = getpos _gun select 0
_gunposy = getpos _gun select 1
_gunposz= getpos _gun select 2


#checkcrew
?!alive _gun : exit
?((count crew _gun) == 0) :_gundam = getdammage _gun;goto "createnewgun"
~1
goto "checkcrew"

#createnewgun
; delete the old gun first, thx to Thobson
deletevehicle _gun
_newgun = _guntype createvehicle [0,0,0]
_newgun setpos [_gunposx,_gunposy,_gunposz]
_newgun setdir _gundir
_newgun setdammage _gundam
~0.5
exit
« Last Edit: 01 Sep 2004, 19:25:53 by Blanco »
Search or search or search before you ask.

ocnick

  • Guest
Re:Endless fire on MG's, grrrrrr
« Reply #4 on: 01 Sep 2004, 17:47:51 »
Cool, thanks Blanco, I'll try that out.

@Mac
That's how I have it now, start with empty gun, and make dude get into it.  But I'm still getting reports of ai shooting the hell out of the MG's.

rOk

  • Guest
Re:Endless fire on MG's, grrrrrr
« Reply #5 on: 01 Sep 2004, 17:48:49 »
Exactly the same thing happens to me if the MG is under ManMG script.
They just don't stop shooting at it.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Endless fire on MG's, grrrrrr
« Reply #6 on: 01 Sep 2004, 18:33:29 »

I too had this problem but assigning a solider to an empty gun seemed to fix the problem providing the player did not order the ai to attack it.  But I can see putting a new gun there would work better.

@Blanco

One question on your script:  Do you not need to destroy, move or otherwise get rid of the old gun when you put the new one in place?
« Last Edit: 01 Sep 2004, 18:33:53 by THobson »

Offline Blanco

  • Former Staff
  • ****
Re:Endless fire on MG's, grrrrrr
« Reply #7 on: 01 Sep 2004, 19:24:29 »
hey, you are right...

That old gun must be deleted...

Weird, I never saw there were two guns at the same place... lol

Thx, I'll fix that.

**edit**
Fixed,
Strange... I expect an explosion when you create two things at the same spot.




« Last Edit: 01 Sep 2004, 19:28:16 by Blanco »
Search or search or search before you ask.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Endless fire on MG's, grrrrrr
« Reply #8 on: 01 Sep 2004, 20:57:54 »
@Blanco

Thanks.
I have modified your script a little to meet my needs and have incorporated it into my latest mission (currently pending).  You are now in the (long) list of credits in my intro.  I cannot tell you what it is called because that would be advertising.  

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Endless fire on MG's, grrrrrr
« Reply #9 on: 02 Sep 2004, 01:26:14 »
You're allowed to advertise a little if its on topic, which in this case it would be.   Somebody with the same problem might want to get your mission and see what you've done to the script.

Unless you're just teasing us ...
Plenty of reviewed ArmA missions for you to play

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Endless fire on MG's, grrrrrr
« Reply #10 on: 02 Sep 2004, 07:40:22 »

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Endless fire on MG's, grrrrrr
« Reply #11 on: 02 Sep 2004, 11:06:25 »
Or you could just post it in [Advertising][/Advertising] BB code. ;D

:beat: *Gets Shot* :beat:

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Endless fire on MG's, grrrrrr
« Reply #12 on: 02 Sep 2004, 11:48:27 »
Like this?

[Advertising]Defensive Strike[/Advertising]