OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Resources Beta Testing & Submission => Topic started by: CareyBear on 02 Oct 2002, 18:27:53

Title: Flag capture script
Post by: CareyBear on 02 Oct 2002, 18:27:53


[attachment deleted by admin]
Title: Re:Flag capture script
Post by: CareyBear on 03 Oct 2002, 11:40:26
Have just spent the last two hours tracking down what turned out to be a painfully stupid mistake in the above. Works fine with only one flag...

Will re-release soon once I get it a little more functional and plug-in-able.

Till then, add ~5 to the init.sqs at the start. It was creating arrays of pointers to units that didn't exist yet. *sigh* So pointers were all <null> and it was *really* annoying me.

So, flags can't be captured in the first five seconds of the game... *grins*

I will also add a 'crouch / drop / get weapon' anim for the person activating  - I haven't played with anims yet - so that it takes a moment, instead of instantaneous, & alarms which come online when the flag is captured.

If you use init.sqs to refer to units.. make sure they've been created. Either have your init wait a bit, or don't call the init from someone's init field - ESPECIALLY not the first person you create in the editor.. *L*