OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Serial Killer on 19 Jun 2005, 22:51:58

Title: Foreach this list, bla bla...
Post by: Serial Killer on 19 Jun 2005, 22:51:58
I remember that there was some function to example set everyone's behaviour to aware in some trigger area ::) I dont remember what that function was :-[ I remember it was something like "x_ setBehaviour ""aware""" forEach this list or something, but I'm not sure.
Can someone tell me it?

EDIT: Oh, and remember to click me (http://kevan.org/brain.cgi?Serial%20Killer) >:D
Title: Re:Foreach this list, bla bla...
Post by: qqqqqq on 19 Jun 2005, 23:32:41
_x
Title: Re:Foreach this list, bla bla...
Post by: bedges on 19 Jun 2005, 23:33:36
Code: [Select]
{_x setbehaviour "aware"} foreach units thislist
i think.

incidentally, i've followed the link, and don't think much of it. don't advertise it in a post in future, yes? keep it ofpec related.
Title: Re:Foreach this list, bla bla...
Post by: Serial Killer on 19 Jun 2005, 23:39:50
Code: [Select]
{_x setbehaviour "aware"} foreach units thislist
i think.

incidentally, i've followed the link, and don't think much of it. don't advertise it in a post in future, yes? keep it ofpec related.

Sorry :-[

And thanks!
Title: Re:Foreach this list, bla bla...
Post by: RujiK on 19 Jun 2005, 23:53:54
I thought that link was halarious.
I liked it.

Although... yes totally unrelated to OFPEC.
Title: Re:Foreach this list, bla bla...
Post by: THobson on 20 Jun 2005, 16:55:03
I believe units should be dropped from:
{_x setbehaviour "aware"} foreach units thislist


thislist is already an array so
{_x setbehaviour "aware"} foreach thislist

Should work - unless I am going senile.  Perhaps I have had my brains eaten.
Title: Re:Foreach this list, bla bla...
Post by: bedges on 20 Jun 2005, 17:06:28
you and me both THobson ;)
Title: Re:Foreach this list, bla bla...
Post by: Chris Death on 20 Jun 2005, 17:09:23
Quote
unless I am going senile.  Perhaps I have had my brains eaten.

Nah you're right Thobson;

thislist or list this or list triggername is already an array and
your solution will work.

units xxx is only needed in combination with a unit/group

like:

units man1

units player

units group player

units leader groupA

units leader group player

units this


why group?

Because group is also a unit and not an array (even tho the more logical would be if group would represent an array but then again other commands like move or setbehaviour etc. wouldn't work anymore for group).

btw - me either don't find the link funny to be mentioned,
especially in the case that you want serious answers on
your question.

What would you then say if the answer would be like:

ah and don't forget to follow this link (http://www.ofpec.com/) to find your answer there  ;)

~S~ CD