Home   Help Search Login Register  

Author Topic: AI info share  (Read 804 times)

0 Members and 1 Guest are viewing this topic.

Dubieman

  • Guest
AI info share
« on: 12 Jul 2004, 22:24:44 »
Just a quick Q here. before I log off and try this script so if it doesn't work I don't have to come back and bother you ppl. :D ;)

Anyways I'm using G Barren's info script and I'm wondering if it is called a different way then what I'm thinking.

It says put

[unit, [array of friends], [array of enemies] ] exec "infoShare.sqs"

in the init of the unit. But I'm kinda confused as I only want the leaders in and around a city to have this. So do I put it in each one of the leaders inits and do I have to change the array stuff? :-\

Thanks in advance.

Oh yeah I put the function and the init.sqs code in my mission folder+ the script itself.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:AI info share
« Reply #1 on: 12 Jul 2004, 23:04:45 »
If one member of an AI group knows something (about an enemy) then the information is, AFAIK, automatically and immediatly shared with the other members of the group.     A group leader knowing something that a member of his group does not know is impossible.
Plenty of reviewed ArmA missions for you to play

Dubieman

  • Guest
Re:AI info share
« Reply #2 on: 13 Jul 2004, 01:11:27 »
Thanks for answering but you didn't answer my Q. I wanted to know if I only need to put the code above in the init lines of one of the leaders or all the leaders of groups with whom I want them to communicate with?

Sorry to be confusing as I'm confused myself.  ???

And do I need to change the code depending on the unit?

Like if its a west officer do I change it to:
[WOFFICER, [WEST], [EAST] ] exec "infoShare.sqs"

And vice versa... :P

Ahh well I have a chance to test it now so....

Thanks in advance once again ;)

Dubieman

  • Guest
Re:AI info share
« Reply #3 on: 13 Jul 2004, 03:09:06 »
Alrighty I made the init.sqs lines right and I have the script in my mission folder and as the readme or the script said I made two triggers one for east present once and one for west present once that covered the map.

In the activation field of each I put "east_units = thisList" in the east one and "west_units = thisList" in the west trigger.

Now here is where I'm stumped. I added a hint in the script so I could see if it is working. So I snuck around and killed dudes and got some close by in safe mode or not doing anything, fully aware their buddies were getting hit.

I know its not working now. I tried to put

[unit, [array of friends], [array of enemies] ] exec "infoShare.sqs"

in someone's init field like the officer of a large patrolling group near the occupied city I was assualting. It gave me some error about the array of buddies and enemies not being valid so.....

I'm lost. :P ???

Major help would be appreciated. ;)
« Last Edit: 13 Jul 2004, 03:09:42 by GuiltyRoachKilla »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:AI info share
« Reply #4 on: 13 Jul 2004, 12:04:49 »
Well its going to look something like this

[loon1, [west_units], [east_units] ] exec "infoShare.sqs"

I'm afraid I'm not sufficiently familiar with the script in question to be more helpful.  General Barron's instructions are usually fine and it sounds as if you are getting yourself tied up in knots of confusion.  ;D    Read through them again, slowly slowly, three times.   These kind of questions are very hard for us to answer, so the more specific you can be about the thing that's really causing the problem the better.      ;)
Plenty of reviewed ArmA missions for you to play

Dubieman

  • Guest
Re:AI info share
« Reply #5 on: 13 Jul 2004, 15:19:58 »
Well that answers it. I suppose I have to name my officer's like officer1 officer2 etc. And make appropiate init lines for each using what you did macguba. Replace the loon1 with officer1 as the mission is a east SF mission and three ppl in my group don't need to share info... ::)

Thanks a bunch. I'll test it soon.

 :P ;)

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:AI info share
« Reply #6 on: 13 Jul 2004, 15:42:29 »
Sure you need to name your officers if you do not want all the groups sharing info...
But, you don't need to write the stuff in each leaders init, use the forEach stuff in the missions init.sqs:
Code: [Select]
{[_x, west_units, east_units] exec "infoShare.sqs"} foreach [officer1,officer2,officer3,etc...]
And, always remember that the thislist produces an array so if you exec the script with
Code: [Select]
[unit,[east_units],[west_units]] exec "" the script can't comprehend it as you now execute the script like this:
Code: [Select]
[unit,[[eastunit1,eastunit2,eastunit3,ect...]],[[westunit1,westunit2,westunit3,etc...]]] exec ""when it is supposed to be executed like this:
Code: [Select]
[unit,[eastunit1,eastunit2,eastubi3,etc...],[westunit1,westunit2,westunit3,etc...] ] exec ""So, use the exact syntax in executing the script according to the script 'manual':
Code: [Select]
[unit,east_units,west_units] exec ""
I have used this script since it came out and never had any probs...
Oh, and the script exits if the unit passed is not the leader of the group...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Dubieman

  • Guest
Re:AI info share
« Reply #7 on: 13 Jul 2004, 15:52:41 »
So I write your foreach code in my init.sqs and then I put the [unit,arryofE,arrayofW] exec "share".sqs in the init line of a leader of a group and include his name in the init line?


 :P  ;)
Sorry for being noobish as my mission has many other things going on and its becoming a pain to add more scripts and other things since its hard to find the problems in a mess of WPs and triggers. :P ::)

Thanks though. ;)
« Last Edit: 13 Jul 2004, 15:53:12 by GuiltyRoachKilla »

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:AI info share
« Reply #8 on: 13 Jul 2004, 16:11:52 »
Quote
So I write your foreach code in my init.sqs and then I put the [unit,arryofE,arrayofW] exec "share".sqs in the init line of a leader of a group and include his name in the init line?
Almost ;)

You don't need to put anything in the leaders init field if you use that forEach stuff in the init.sqs...

The array (array = [stuff]) after the forEach command should include the names of the leaders you want to share the info, for example:
Code: [Select]
{[_x, arrayofE, arrayofW] exec "infoShare.sqs"} foreach [GuiltyRKofficer1,GuiltyRKofficer2,GuiltyRKofficer3,GuiltyRKetc...]This executes the infoShare only on those leaders in the array...

I can cook up an example mission for you if you like...
It might explain things a bit better than me and my 'explanations' ;)
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Dubieman

  • Guest
Re:AI info share
« Reply #9 on: 13 Jul 2004, 19:26:31 »
If you could that'd be great. ;)
Thanks!

It's just hard to implement stuff now since the only way to see if it works is by going throgh the whole mission again. Next time I'll get this stuff in before the mission is near completion. :P :)

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:AI info share
« Reply #10 on: 13 Jul 2004, 19:51:31 »
Make a copy of your mission.  Delete everything not directly relevant to the thing you're testing.    Make yourself invincible and whizz through it at 4x speed.

Individual scripts can be tested in special test missions - there is no point in inserting something to the mission until you know its working.
Plenty of reviewed ArmA missions for you to play

Dubieman

  • Guest
Re:AI info share
« Reply #11 on: 13 Jul 2004, 20:24:16 »
Hurrah it worked! ;D

I put a hint in there and it went off every 5 secs or so like I set it. Thanks Hater Kint for the foreach code it works. And macgba thanks for explaining it to me even though I had no grasp on it before. :P

Thanks you guys, now I can move on... :) :) :)

Dubieman

  • Guest
Re:AI info share
« Reply #12 on: 13 Jul 2004, 20:26:13 »
Wait a moment, the AI I specifed ow1, ow2, ow3 etc they share info even if there is no enemy to report right? :-\

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:AI info share
« Reply #13 on: 13 Jul 2004, 22:50:18 »
What info are you referring to??
IS there other info to share than the enemy locations??

InfoShare shares info on known enemy locations when a certain knowsAbout value is reached.
So when the group (whose leader you have specified when executing the script) knows enough about the nme(s) the group then shares that knowledge with other units/groups within 50 meters of the detecting group/unit...

If you mean that do they share the detected nme after he has been detected, afaik no. Then the knowledge on the nme is shifted into the hands of OFP engine and the parameters that control it...
« Last Edit: 13 Jul 2004, 22:52:50 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Dubieman

  • Guest
Re:AI info share
« Reply #14 on: 14 Jul 2004, 03:15:32 »
Me gets it now totally.

The script works I'm pretty sure I got deected and I'm not sure but the script, OFP engine, and my detected by switch triggers did a good job of surrounding me and putting a lot of 5.56 lead my way.

Thanks all. No need for an example mission either Hater Kint.