Home   Help Search Login Register  

Author Topic: Multiple init fields  (Read 411 times)

0 Members and 1 Guest are viewing this topic.

Gooner861

  • Guest
Multiple init fields
« on: 26 Apr 2004, 16:50:14 »
How can u put multiple commands into a units initialization field.
Ive tried doing this in the init field:

this setBehaviour"COMBAT" : next comand.

Help?  ;D

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re:Multiple init fields
« Reply #1 on: 26 Apr 2004, 16:59:11 »
simple...

Code: [Select]
blah blah blah this is the first command blah; blah blah blah this the second blah; blah blah blah and finally third
 ;D

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Multiple init fields
« Reply #2 on: 26 Apr 2004, 16:59:34 »
You need to put a ;, example:

this setbehaviour "COMBAT"; this dotarget loon1

:beat: *Gets Shot* :beat:

EDIT: Damn! I wasn't fast enough! ;)
« Last Edit: 26 Apr 2004, 17:00:15 by The real Armstrong »

Gooner861

  • Guest
Re:Multiple init fields
« Reply #3 on: 26 Apr 2004, 17:05:50 »
Damn, i knew it wud b sumthing stupidly easy.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Multiple init fields
« Reply #4 on: 26 Apr 2004, 17:08:27 »
No questions are stupid. Try reading some more tutes at OFPEC's excellent ed depot though. ;)

:beat: *Gets Shot* :beat:

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re:Multiple init fields
« Reply #5 on: 26 Apr 2004, 17:32:21 »
when you have a lot of commands which you like to insert in a init field, you could also make a script for.

Code: [Select]
;myinit.sqs
_unit = _this select 0

_unit setbehaviour "COMBAT"
_unit setcombatmode "RED"
removeallweapons _unit
_unit addmagazine "M16"
_unit addweapon "M16"
exit

...and in the init line you just put

Code: [Select]
[this] exec "myinit.sqs"
not necessarly though but it is easier to overview it


@Armstrong

hehe...beat you by 23 seconds

:beat: *shots* :beat:
« Last Edit: 26 Apr 2004, 17:33:12 by myke13021 »