Home   Help Search Login Register  

Author Topic: Key Cats AI  (Read 749 times)

0 Members and 1 Guest are viewing this topic.

Offline 456820

  • Contributing Member
  • **
Key Cats AI
« 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 ?

Offline MrN

  • Contributing Member
  • **
  • Pffff
Re:Key Cats AI
« Reply #1 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.
In the 60's, people took acid to make the world weird. Now the world is weird and people take Prozac to make it normal.

Offline 456820

  • Contributing Member
  • **
Re:Key Cats AI
« Reply #2 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

Offline MrN

  • Contributing Member
  • **
  • Pffff
Re:Key Cats AI
« Reply #3 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.
In the 60's, people took acid to make the world weird. Now the world is weird and people take Prozac to make it normal.

Offline 456820

  • Contributing Member
  • **
Re:Key Cats AI
« Reply #4 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

Offline MrN

  • Contributing Member
  • **
  • Pffff
Re:Key Cats AI
« Reply #5 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
In the 60's, people took acid to make the world weird. Now the world is weird and people take Prozac to make it normal.

Offline MrN

  • Contributing Member
  • **
  • Pffff
Re:Key Cats AI
« Reply #6 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.
In the 60's, people took acid to make the world weird. Now the world is weird and people take Prozac to make it normal.

Offline 456820

  • Contributing Member
  • **
Re:Key Cats AI
« Reply #7 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

Offline MrN

  • Contributing Member
  • **
  • Pffff
In the 60's, people took acid to make the world weird. Now the world is weird and people take Prozac to make it normal.