Hello, this is my first post, and I've just got back into OFP. A few years ago, I left OFP because of some other games that were in no way as good, but I found them more accessible in the multiplayer department. However, I've recently had a blast on a 'Single Mission' in OFP and now have completed the original and RedHammer campaigns, as well as being about half way through the Resistance campaign. And guess what...now I want to make missions!
I did learn a few things about scripting in OFP before I left, but now I simply cannot remember a thing
. I've searched the FAQ, posts and some other websites but found this is definitely the place for answers to my questions. I had a few dozen queries but found most of them with the search command
.
I doubt I refined my search correctly but I couldn't find anything specific enough for a few queries. So here goes...
1) How can I make some machine gunners ready to open fire on a nearby base actually detect all of the enemy soldiers below? I have them in definite firing range, but is there a command or anything I can put in their init field to increase their detecting distance?
2) I have a soldier who's walking into a base wearing an enemy's uniform (I guess the best way is to deletevehiclethis a grouped friendly soldier?) but there are a few problems.
Firstly, I don't want him to use the weapon he has slung on his back until a certain time. Should I do this by the simple 'careless' combat mode? I know about the 'setcaptive true' part.
Secondly, I want him to walk in and in very specific places, to drop a satchel charge/mine and walk around the base doing this. Is there a simple script I could adapt, as waypoints really don't work for this. In the official missions, I see people dropping mines and satchel charges and I don't know how to make the man walk to specific positions or drop the bombs.
3) Are there any voice commands I could use for the soldier after he has completed his mission? That's too vague so I'll go into more detail: I want the man to walk around the base dropping his bombs. I then want him to get in a UAZ and drive away down the dirt track. When he's done that, I want him to report to his friendly forces something along the lines of:
"The bombs have been dropped; proceed with mission." Are there any non-specific voice things that may have been used in an official mission, that I can use for that? Where do I find them? ([Un]official command reference?)
I don't know how to execute them either, though I should be able to find that in one of the references now I come to think of it.
4) I'd like, on another mission, all the soldiers to open fire over a longer distance, instead of about 200m I'd say 600, but with less precision, and for machine gunners about 900m. If possible, I'd like to have an option that doesn't involve installing an AI upgrade, I
only want the increased firing range.
5) How can I make a machine gunner actually use 'support fire' My WIP improvisation for this is to use the JAM2 machine gunner with HD, so that he'll rarely hit what he is firing at and keep firing.
Is there a better way so that I can get the gunner to fire in long bursts of say 20 to 30 rounds then stop for a few seconds, then fire another burst. Even if he's not firing at a soldier, could he still just lay down a hail of rounds anywhere below, where the enemies are located?
6)I didn't search for this, but as I'm asking a load of questions here anyway, maybe I could get a specific answer to this
I would like to know how to "stack boxes" e.g. get the position of "box1" and tell "box2" to go to the position of "box1" but 0.5m higher. Also can I place a box or anything where I put it in the editor but, say,5m higher? So I don't have to setpos (as this takes ages).
Thanks very much for reading this and thanks a lot in advance.
DoDgY.