Home   Help Search Login Register  

Author Topic: INIT line, Invincibility script, WP delay script (Questions)  (Read 1957 times)

0 Members and 1 Guest are viewing this topic.

Offline Smoked

  • Members
  • *
Hello all......

I just joined the forums after browsing 18 pages of questions, per page by thread.  I plucked all the relevant information from what I found - But (of course) still have questions.  Fortune would have it, they are simple questions to a moderately seasoned scriptor - I am of the noob sort, but learning, and would appreciate any help anyone may offer.

1.  I understand how to equip "anything" via the INIT field - How do I point the INIT field to a script file in the mission folder (whats the file type - <sqf> ?).  I would like to custom load some ammo crates, but the INIT field has to be the worst place to do so.  I need the 'step by step' on this question (please).

2.  Invincibility.....  I saw a script somewhere on some BB - And cant find it now.  I searched OFPEC and AAZ.  Either the thread pruned off or it was a generic "help me please" which I missed.  Does anyone know the script ?  I would like to make certain AI long lasting, such as spot light soldiers (they always seem to go first).  Also, might this script work on OBJECTs ?  I have some fortifications Id rather keep than have destroyed - The tank behind the wall doesnt matter - It is actually supposed to be destroyed eventually.  Id like to keep the 'wall' present regardless.

3.  WP delay...... I have a chopper which I would like to make hover momentarily (1-3 seconds) before moving to the next WP.  I tried setting the min/max/mid of the next WP, but it did nothing.  And, if it had worked, wouldnt the chopper have remained on the ground for that time, and then taken off for the next WP after the delay ?  I'd like it to hover whilst delay.

It comes to a pick up WP, loads infantry, then moves to the next WP.  Im trying to pick up the infantry, hover a second or two, then depart.   

----------------

I would have had many more questions, but fortunately this BB is here.  I now have only these few, along with many reference (saved) links.  So - THANKS to those which already tread the beaten path, providing the answers for those which have asked in the past, and provided those same answers to those which have yet to even ask - Such as myself.

----------------

Thanks for the help !


Smoked




Offline Trapper

  • Honoured Contributor
  • ***
  • I'm a llama!
Re: INIT line, Invincibility script, WP delay script (Questions)
« Reply #1 on: 07 Jun 2007, 11:43:06 »
Ok, you'll need the help of someone else, too. I'm not used to ArmA specific editing details, so this is more OFP knowledge.

1.
- create a script file e.g. crate.sqs in the mission folder. (Crate a new txt file and rename it) Make sure it's not named crate.sqs.txt. You'll have to set up Windows to display file extensions to be able to do this right.
- in the init you line you write [] exec "crate.sqs"

2.
I've attached the tough unit script. It's from OFPEC's OFP days, so I don't know if it will work without changes. But it's not total invincibility. It could work with objects, but maybe they will flicker from rubbish to healthy every now and then.

3. IIRC the delay applies to the current waypoint. Unit moves to it, then waits the set time until the next waypoint is activated.
My guess
0: LOAD TRANSPORT
1: MOVE; delay 3sec (close to WP 0, but not too close as the ai could need a reason for take off)
2: MOVE (your real departure WP far away)

Offline Smoked

  • Members
  • *
Re: INIT line, Invincibility script, WP delay script (Questions)
« Reply #2 on: 08 Jun 2007, 03:54:25 »
Thanks for the reply, Trapper


For the ammo crate INIT line, I would need to (A) name the crate, and (B) put this script ... 

  • [AC1] exec "Assault Crate.sqs"

...  in the INIT line ?  AC1 being the crate name 'assault crate 1' acronym, 'Assault Crate' being the titled text file, saved as 'sqs'.

Seems simple enough.  The "exec" which directed the INIT to the text file is where I had no clue.  Thanks for the direction on that.


The WP delay is another thing.  Youre suggesting dropping another WP between the pickup WP and the final WP, creating the time delay using the new WP.  I do track on the suggestion, and actually - I recall having done that already and the chopper buzzing right through it as if it didnt exsist.  In fact, the chopper actually headed the other direction from the two final WPs - Straight to the enemy.  It is the obvious answer though, youre absolutely correct there.  Ill mess with it tonight and hopefully get some cooperation of it. 

I cant believe my oversight though.  Ive been drilling this mission for too long and am starting to overlook the obvious stuff.



Thanks for the script.  Ill give it a go as soon as I get the WP issue ironed.



--------------------



Okay.....

The chopper issue is resolved finally.   

A question about the "sqs" files.  Is this how any "sqs" file is read, by using the "objectname exec filename" ?  I have enough hints in my INIT lines to confuse even myself.  Im pretty sure of the answer - But just checking.


Again - Thanks for the help !



Smoked
« Last Edit: 09 Jun 2007, 01:59:09 by Smoked »

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: INIT line, Invincibility script, WP delay script (Questions)
« Reply #3 on: 08 Jun 2007, 13:46:24 »
Smoked, please do not double post. :cop:

If you have something to add to your post after a short period of time (we'd prefer that about 3 days should pass), modify your post instead of replying to yourself.

Quote
My thread was locked for a bit - Im not sure how it happened ?
??? :dunno:
That's certainly odd..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: INIT line, Invincibility script, WP delay script (Questions)
« Reply #4 on: 08 Jun 2007, 15:45:12 »
Quote
For the ammo crate INIT line, I would need to (A) name the crate, and (B) put this script ... 
  • [AC1] exec "Assault Crate.sqs"
Never ever use a space in your script file names! Or any filenames for that matter. Always use an underscore instead.
« Last Edit: 08 Jun 2007, 16:12:58 by Mr.Peanut »
urp!

Offline Smoked

  • Members
  • *
Re: INIT line, Invincibility script, WP delay script (Questions)
« Reply #5 on: 09 Jun 2007, 02:17:04 »
Yeah, Mr.Peanut, so very true.  I guess if Im going to an show an example script, I should do so as it would truely appear and not as I already know it would actually be once used. 

It would only save confusion from other members seeking help and wondering why it doesnt work (because the example had a space in it).

Thanks for pointing that out !!   :good:


Sorry for the reply to myself, h-     - (fixed) it -




Smoked


Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: INIT line, Invincibility script, WP delay script (Questions)
« Reply #6 on: 09 Jun 2007, 03:41:06 »
The format for passing stuff into scripts is
Code: [Select]
obj exec "myscript.sqs"or
Code: [Select]
nul = obj execVM "myscript.sqf"Where obj can be anything, including an array.
urp!