OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Muddy Waters on 28 Jul 2004, 17:28:22

Title: shooting at nothing
Post by: Muddy Waters on 28 Jul 2004, 17:28:22
i was wondering if you can get tanks to shoot randomly in a certain area. t.ex. to shoot rounds into buildings, it would be a very cool effect for my world war II maps
Title: Re:shooting at nothing
Post by: macguba on 28 Jul 2004, 17:38:39
Get the invisble target addon - search this board for a link - and use doTarget and doFire commands.
Title: Re:shooting at nothing
Post by: Dubieman on 28 Jul 2004, 18:13:06
 ::) :P

Have fun, unfortunately I don't have the readme....
Title: Re:shooting at nothing
Post by: Muddy Waters on 28 Jul 2004, 19:34:52
thanks! thats perfect! works great. But how can i get my artillery (ai) to shot at it from a distance, i tried to set info age to actual, but id didnt work
Title: Re:shooting at nothing
Post by: Wadmann on 28 Jul 2004, 20:09:07
I believe that most artillery units fire only by line of sight. The exceptions that I know of are Unnamed"s Observer and Mortar addon and CoC's Unified Artillery. Any other artillery will have to be scripted to get the effect of indirect fire.

                                                          Wadmann
Title: Re:shooting at nothing
Post by: macguba on 28 Jul 2004, 20:12:44
Indeed.   Genuine indirect long range fire is difficult in OFP because the shells get disappeared by the game after a set time, which isn't long enough for them to complete their trajectory.    
Title: Re:shooting at nothing
Post by: Raptorsaurus on 28 Jul 2004, 21:24:25
You can get around the "getting disappeared" problem using the the "camcreate" command.  For an example, check out my "Super Guided Missile" script/demo.  In that script I "extend" the life of the missiles by deleteing then camcreating a replacement just before the OFP lifetime for that missile expires.  But one must find the OFP lifetime for the artillary shell in question so you know how long you have before you have to "camcreate" a new one in its last location and set at its last velocity.

Check out "Super Guided Missile" in the OFP editor depot.  Use and modifiy the scripts and functions as you require for your application.
Title: Re:shooting at nothing
Post by: Dubieman on 29 Jul 2004, 04:37:17
Camcreate your arty. Or use a knowsabout command but that might not work. Some arty works diff ways...


I couldn't give the readme, I deleted it a while back casue it was in dutch. ::)
Known habits of invisible targets:
-AI always goes for target instead of reg infantry
-set life of one is a long time, troops may run out of ammo trying to kill them, best to delete after a bit
-good for making helis do random rocket attacks
-can serve as a suppresive fire technique for editors
-laser is great for makin A10s do bombing runs
-I have no idea what IR targets are targeted by
-you cannot use waypoints on them
-bullets go right through the target


They're fun to use. One time I put fifty person ones in front of an abrams and put 80 yank machine gunners farther in front of the abrams, I watched and after a few minutes on 4X the abrams blew up, killing all. Enough machine gun bullets puts an abrams down... ;D

Title: Re:shooting at nothing
Post by: Muddy Waters on 29 Jul 2004, 09:55:48
yeah, i had a WWII howitzer shooting at an invisible armoured target and the were shooting for ever, how do i delete the inv. target in games? like on a waypount or trigger, so that just before i enter the town, the arty stops.

i know a bit of danish, i could have translated the readme  ::)
Title: Re:shooting at nothing
Post by: Dubieman on 29 Jul 2004, 18:48:01
Too late now for the readme.... :P

Anyways use the deletevehicle command.

Like name the target you want to disappear "artyspot" and then make a trigger that is activated by you.

In the activation field of the trigger put:
deletevehicle artyspot

So once you enter town the target hould dissappear. ;)
Title: Re:shooting at nothing
Post by: Muddy Waters on 30 Jul 2004, 09:34:08
thanks, it worked out great!