OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: 456820 on 17 Sep 2005, 19:45:32

Title: Key Cats AI
Post by: 456820 on 17 Sep 2005, 19:45:32
simply how can i make Key cats Group link script run for every east group in the game ?
Title: Re:Key Cats AI
Post by: MrN on 17 Sep 2005, 20:06:10
simply look at the demo mission.  :)

all the answers are there.

ie-give every east group a name and run:
[[group1,group2 etc],[],[],playergroupname,3,0.55] exec "ai\grouplink2.sqs"

the only disadvantage to Keycats's AI is it will only target one group. Otherwise it's fantastic.
Title: Re:Key Cats AI
Post by: 456820 on 17 Sep 2005, 20:08:22
i was thinking of a more easy way instead of giving every group a name since ive got a lot of groups and most of them are very small and ive almost reached the most groups i can have
Title: Re:Key Cats AI
Post by: MrN on 17 Sep 2005, 20:14:25
First it would be nice if you'd explained that.  ;)

Second, I'd be curious to know myself. It is a pain having to name every group but I don't see how you could do it without naming them all.

Instead of Keycats you could use Bremmers AI and just put:
Quote
[group this,[] ,[] ,[] ,[] ,0,1] exec "ai.sqs"
into the group leaders init.

The downside to this is they won't be able to call in backup only throw smoke and flank.
Title: Re:Key Cats AI
Post by: 456820 on 17 Sep 2005, 20:45:20
WOW thats great idea thats all i actually wanted it for thanks
also ill leave this open incase someone does know how to do it withoutnaming the group and sorry for not explaining
Title: Re:Key Cats AI
Post by: MrN on 17 Sep 2005, 21:03:15
Quote
sorry for not explaining


No worries, it's easier to provide the answer if you understand the question! ;D
Title: Re:Key Cats AI
Post by: MrN on 18 Sep 2005, 13:01:21
I think I've got an answer for this:

Quote
; Create a trigger that covers all units placed on the island
; Set it to activate by east/west/resistance present depending on who bad guys are
; In the onactivation field write: thislist exec "unit_check.sqs"
; I got this from Wolsbane's tracer script, I just modified it for Keycats' instead.

_list = _this
_i = 0
_men = []
_tanks = []
_helos = []
_cars = []
_grp = []

#check_type
_unit = _list select _i
?"man" counttype [_unit] == 1: _men = _men + [_unit]
?"man" counttype [leader group _unit] == 1: _grp = _grp + [leader group _unit]
?"tank" counttype [_unit] == 1: _tanks = _tanks + [_unit]
?"tank" counttype [leader group _unit] == 1: _grp = _grp + [leader group _unit]
?"air" counttype [_unit] == 1: _helos = _helos + [_unit]
?"air" counttype [leader group _unit] == 1: _grp = _grp + [leader group _unit]
?"car" counttype [_unit] == 1: _cars = _cars + [_unit]
?"car" counttype [leader group _unit] == 1: _grp = _grp + [leader group _unit]

_i = _i + 1
?_i < (count _list): goto "check_type"

;exclude ECP ai for testing
{[_x] exec format["%1dsai\dsai_exclude.sqs",ECP_path]} foreach _men


{[[_x],[],[],p1_grp,3,0.55] exec {ai\grouplink2.sqs}} foreach _grp


#loop

; Show occupied groups
hint format["Occupied Groups:\n%1", KEY_occupied]
~5

goto "loop"

Something like that anyway.  ;)
Just make sure you put
Quote
p1_grp = group this
into the players' squad init.
Title: Re:Key Cats AI
Post by: 456820 on 18 Sep 2005, 13:22:19
thanks ill have a go with that later
and whats this i hear about a tracer script ive been looking for one that works for a while do you have a link ?
thnaks
Title: Re:Key Cats AI
Post by: MrN on 18 Sep 2005, 13:35:25
Don't want much do you.  ;)

http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=33b732830c63ded6500a0cedcfef2fcd;act=ST;f=4;t=44115;hl=wolfbane+and+tracer