OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: OFPfreak on 12 Dec 2005, 09:02:17
-
I have tried setting up invisble tank targets so my M1A1 tanks acted like artillery but they didnt fire at all! The aim at it, but aim below it and just sit there looking. What is wrong!? I tried multiple invisible target packs!
P.S. is this the same?
this setpos [getpos this select 0,getpos this select 1,(getpos this select 2)+10]
this setpos [getpos this select 0, getpos this select 1,10]
-
yu
-
Make sure the target is the right kind of target. Also make sure it isn't too high for the tank to shoot at; it may be out of range vertically. Also make sure it isn't too far away for the tank to shoot at. Give the tank a reveal command, maybe they can't identify the target. If that doesn't work, make sure the target even works at ground level.
P.S. is this the same?
this setpos [getpos this select 0,getpos this select 1,(getpos this select 2)+10]
this setpos [getpos this select 0, getpos this select 1,10]
No. The second command will always put the object 10 meters above the ground. The first command will put the object 10 meters above itself. If the object is on the ground, both commands will put the object at the same height. If, however, the object is above the ground, lets say 5 meters, the first command will put the object 15 meters above the ground while the second will put the object 10 meters above the ground.
-Pilot
-
And note that an object on the ground does is not necessarily at 0. The "height" of the object will be measured at its "centre", which could be anywhere.
Tank guns can elevate only 15 or 20 degrees. Which isn't much.
-
one more thing, i would run a looping debug script to report the height of your invisible target, it may very well be falling back to ground
-
You don't need invisible targets for the tank to shoot at. Just use the 'dowatch' command, and it will point its turret wherever you want. Then use the 'fire' command to make it fire where it is pointed.
-
@GB
I understand the principle, mate, but could you shed a little more light on it?
When ever I try to use the fire command, even if the units have targeted something, they raise their guns into the air and fire into the sky... How to you force them to not do that?
-
1. I tried LOTS of heights and distances.
2. The target doesnt fall to the ground otherwhys the tank would shoot at it.
3. I tried about 2 invisible target packs. I tried IR, Tank, laser, and infantry.
General Barron: How do I use those commands?
-
I have also had troubles getting tanks to fire at invisible (armored) targets in the air. I used the invisible targets that are included in the BAS_Tonal pack. The tanks could hit them on the ground. The slightest elevation of the targets made the tanks stop firing with anything except machineguns.
Lesson: Tanks suck at air-to-air combat ;D
If you want to use the tanks as artillery I suggest you put them in a line, give them the doFire command and investigate where the shot lands. Then move your tanks into the right position so the shots falls where you want them. It's a crude way, but should work if the tanks are positioned out of the way of the action.
-
@general barron:
I want your children because it worked (targets not in air but about 2000-3000 meters away wich they didnt fire at immediatly.
@nominesine:
So I download the bas tonal thingy and use those in the air?
Problem:
I want to make tanks fire further than 2000-3000 meters. Maybe to about half way of the map.
P.S. Can someone transform the simple code of making tanks fire with a domove and dofire command work with a onmapsingleclick command/script?
-
Maybe to about half way of the map.
May be impossible. Things like shells and bullets have a limited lifetime - if they haven't hit anything they are deleted. The really snazzy arty scripts grab the shell a while after it is fired, calculate its trajectory, delete it and create a new shell on the same trajectory near the target.
(All of which is a long way from the first arty scripts, which camcreated an M2 mg where you wanted the explosion, made it setdammage 1 and then deleted it. If you watched an arty barrage closely you would occasionally catch a glimpse of the mounting.)