OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: icarus_uk on 12 Sep 2002, 16:07:39
-
This is for a communitcations script that I thought of. I am making a radar bunker addon, and I want to have a commander inside the building. A radio man unit can radio into the commander (not in the same group) and get all the enemy positions that the commander knowsabout.
So what I need a way of doing, is for one unit to get the list of units that said commander knowsabout... (my this is getting confusing).
Said commander will have all the units within an area revealed to him, with the reveal command, and I want this infomation to be available for troops in the field to be able to access.
-
hmm - not sure, if you can manually modify reserved
variables.
One thing you could try playing around:
Let one guy of the other group join the group which knowsabout anything, and then let it rejoin back to it's original
group.
I know, this sounds like a far way around, but it could
probably (maybe) work.
~S~ CD
-
hey, ust another idea;
Couldn't that be already in the game:
think about the guard waypoint, and any friendly unit
somewhere else on the map.
The group with that guard wp knows about the strength
of enemy presence, where they got detected (far away).
right, i need to check that for myself now ;D
~S~ CD
-
switching groups might work, but it would take time for the information to "settle", you'd get two-way bleed, and you'd have to deal with someone trying to reform.
Reveal has its limitations (knowsabout decays according to range. Reveal sets knowsabout to 1. At long ranges, units "forget" about revealed units almost instantly.
still, I have a rune for you:
" ""detector"" + _x + "" = []"" Foreach [0]" Foreach ["0", "1", "2", "3", "4"]; instruction1 = " ""format ["" detector%1 = detector%1 + %2"", (""observer knowsabout _x"" count [_x]) - ((""observer knowsabout _x"" count [_x]) mod 1), _x]"" Foreach [_x]"" Foreach list detecttrigger"; instruction2 = " ""commander reveal _x"" ForEach (detector1 + detector2 + detector3 + detector4 + [Observer])"; "_X foreach [0]" Foreach [instruction1, instruction2]Hold on, there are some bugs. I'll fix it up and post back.
-
[attachment deleted by admin]
-
Woot this sounds promising i d/l'ed it an ill give it a try
this could greatly improve the defencive capabilities of AI dudes in SP missions,have it also set to trigger responsive units to the scene an so-forth.
very good ;D