Home   Help Search Login Register  

Author Topic: Need artillary to fire in general direction  (Read 1437 times)

0 Members and 1 Guest are viewing this topic.

Lojik

  • Guest
Need artillary to fire in general direction
« on: 07 Nov 2004, 19:15:58 »
I need 4 peices of artillary to fire in a general direction of a town , i have tryed targeting a barrel and "do fire" but that only works untill the barrell blows up or goes out of line of sight and they stop. i need continues fire in a direction or at a marker untill the gunner of the artillary dies preferably without having to put the object or marker in line of sight.

This is for my new addon (created by me and My mate Joe) for OFP Called Band of Brothers Modern day, it is 9 missions each based around one episode of the series, so far we have a modern d-day paradrop at night with evething exploding, pretty cool and a cross road fight wilth machine guns and mortor tactics. site for the addon will be up soon and if you have any idea's or design models you would like to see in the addon please contact me then.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Need artillary to fire in general direction
« Reply #1 on: 07 Nov 2004, 19:30:53 »
You could use a game logic. don't know if they have health, but you can use eventhandlers to keep it alive:
this add eventhandler ["hit",{this setdammage 0}]
(syntax may be wrong)

or you could use artillery scripts but that may be useless if the artillery are the addon, although i dont know if it will matter that much either way...

bored_onion

  • Guest
Re:Need artillary to fire in general direction
« Reply #2 on: 07 Nov 2004, 20:29:14 »
i dont think that loons fire at game logics but you can download an invisible target addon - search for one in the forum i think theres one for use with a flak script

Dubieman

  • Guest
Re:Need artillary to fire in general direction
« Reply #3 on: 07 Nov 2004, 20:39:02 »
What do you want, the look of a few arty pieces firing towards the town with no expectations of it hitting near the town or the arty just hitting random spots around the town?

Try arty scripts that would make the explosions around town and make it so your arty really doesn't fire anything except like shells that do a damage of 0.1 or something. To simulate it. That's one solution I can think of... :P

Or there is the COC arty, very direct though. :P

But whatever you do it sounds complicated... :-\

Lojik

  • Guest
Re:Need artillary to fire in general direction
« Reply #4 on: 07 Nov 2004, 21:37:21 »
If you've watched the eposide of band of brother wherre they have to destroy 4 artillary units, i need those 4 artillary units to be firing doesn't matter where but firing untill we kill the gunners.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Need artillary to fire in general direction
« Reply #5 on: 07 Nov 2004, 21:55:25 »
make something that isn't going to move a lot if its hit by the artillery, and give it the EH
this addeventhandler ["Hit", {this setdammage 0}]

you could also use:
this addeventhandler ["killed", {this setdammage 0}]

Lojik

  • Guest
Re:Need artillary to fire in general direction
« Reply #6 on: 08 Nov 2004, 00:37:17 »
is the event handler ment to be in the viechals init or the artilirys, or can you show me a print screen of where to put that script to work properly
cheers

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Need artillary to fire in general direction
« Reply #7 on: 08 Nov 2004, 01:09:05 »
Just use a looped fire command.

#loop
~5
? not alive gunner1 : exit
gun1 fire "weaponNamewhatever"
goto "loop"

That's just a sketch but you get the idea.

Else use the invisible target addon.    I think its indestructible so you don't need the hit EH.   Don't place it too far away, shells vanish into thin air if the time of flight is too long.
Plenty of reviewed ArmA missions for you to play

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Need artillary to fire in general direction
« Reply #8 on: 08 Nov 2004, 01:11:47 »
First off, have the guns watch in some direction with the dowatch command. "this dowatch getpos barrel" or something like that.

Next, in your script, use the line: "gun fire gunweapon", where gun is the name of the gun to fire, and gunweapon is the name of the weapon the gun fires. That will get the gun to just shoot where it's barrel is pointing (where it is looking).

Now last, if you DON"T want the guns to actually shoot anything, you could put this in their init field:

this addeventhandler["fired", {deletevehicle (nearestobject[_this select 0, _this select 4]}]

That will delete the shell right after it is fired, so it will be like the guns are firing blanks.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Lojik

  • Guest
Re:Need artillary to fire in general direction
« Reply #9 on: 08 Nov 2004, 02:31:08 »
cheers for advice will try soon, have to sleep

Lojik

  • Guest
Re:Need artillary to fire in general direction
« Reply #10 on: 08 Nov 2004, 11:52:56 »
the ad event handler doesn't get rid of the shells, and i can't seem to goet it stop any object dying either.

Lojik

  • Guest
Re:Need artillary to fire in general direction
« Reply #11 on: 08 Nov 2004, 20:23:08 »
sorry for the last post i got that to work eventalluy had to move a few spaces around and add a few things but it works well know cool mod should be available on the iste soon.