Home   Help Search Login Register  

Author Topic: Is it possible to get Id and position ?  (Read 775 times)

0 Members and 1 Guest are viewing this topic.

captain caffeine

  • Guest
Is it possible to get Id and position ?
« on: 11 Nov 2002, 00:50:41 »
  Is it at all possible to get ID and position of unit or group
who first spotted Enemy to send reinforcements to that area and if so how?

CareyBear

  • Guest
Re:Is it possible to get Id and position ?
« Reply #1 on: 15 Nov 2002, 15:46:35 »
Two things u can do:

1) Try Bremmer's Advanced AI script (ok, I think it's Bremmer's). It has functionality for ground support, artillery, armoured support, firing flares etc etc etc. Even staged retreats. Pretty cool stuff, but it'll take u a lil bit of work to figure out how to use it properly.

2) do it urself, kinda like this...
- make a trigger coverin the whole map. Make it 'side detected' for whatever sides are appropriate. Then, when it trips, the array variable thislist will contain whatever units were detected. Then, u just use getpos on the units in thislist, & you've got your position of enemy units.
- to find out which group... a little harder, but can use the same trigger.. just call a script and pass it 'thislist' in the onactivation. Then, for each group u have, check whether or not the group leader knows the enemy unit exists. If they do, chances are they're the group that spotted them.

somethin like (example is for west defenders & east attackers - only triggers once, more complex if u want it to keep goin, and assumes only one attacking group)

TRIGGER: East DETECTED BY West, ONCE
ONACTIVATION: enemyposition = getpos (leader group (thislist select 0)); detected = true

Then, u set another trigger...
TRIGGER: CONDITION: detected
ONACTIVATION: reinforcementgroup move enemyposition

ta dah... That doesn't tell u which group found em tho & much more complex if u want lotsa groups on both sides, but that's the general approach. That one will also send reinforcements against the *leader* of the detected target - who might be in a different spot altogether.. just take 'leader group' out if u want them to go to the detected target exactly. If u make the 'detected' trigger repeating, they'll keep followin the target anywhere.

Offline toadlife

  • OFPEC Old Skool
  • Former Staff
  • ****
  • Official OFP Editing Center Toad
    • toadlife.net
Re:Is it possible to get Id and position ?
« Reply #2 on: 15 Nov 2002, 23:34:51 »
FYI: In a few days, I'll be submitting a "grouplink" script that is *sort of* like Brememrs script, but it much easier to use. The script from my single player mission, operation Lojack. I've made some imporvements to it, and will be tweaking it so that anyone can will be able to just "plug it in" to their mission with a minimal learning curve.

It doesn't have any specific functions for retreating, artilary support, or retreating - It enables groups to call eachother in for backup, if they spot any unit of a specific enemy group. There will be options to control the enemies behavior - eg. you can make them fearless, cowards, or in between, or random.

If you've played lojack, and gotten into any kind of extended scufffle with the AI enemies you would see that the script is very effective.  ;)
"Whenever you want information on the 'net, don't ask a question; just post a wrong answer." -- Cancer Omega.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Is it possible to get Id and position ?
« Reply #3 on: 16 Nov 2002, 00:31:30 »
Yo Toadlife - wat did u improve in ur script ? was it my sugestion  ;) ?

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline toadlife

  • OFPEC Old Skool
  • Former Staff
  • ****
  • Official OFP Editing Center Toad
    • toadlife.net
Re:Is it possible to get Id and position ?
« Reply #4 on: 16 Nov 2002, 00:57:12 »
I just fixed a few minor minor bugs in it, and will be adding the option to customize the behaviour of the groups that are linked. I didn't make any other changes to the script, as works just the way I want it to work.  ;)

Making any huge changes would either require a rewrite, or the use of multiple scripts. As it is now, everything is controlled by one script and it works perfectly.
"Whenever you want information on the 'net, don't ask a question; just post a wrong answer." -- Cancer Omega.

captain caffeine

  • Guest
Re:Is it possible to get Id and position ?
« Reply #5 on: 16 Nov 2002, 01:48:35 »
I ould like to give your script a try as soon as its out , advanced scripts irritate me probably cause I cant even script
but some of the explanations on how to this , that and the other are kinda vague . Please gimme a holler whenever you've got this posted

Offline toadlife

  • OFPEC Old Skool
  • Former Staff
  • ****
  • Official OFP Editing Center Toad
    • toadlife.net
Re:Is it possible to get Id and position ?
« Reply #6 on: 21 Nov 2002, 20:39:54 »
FYI captaincaffein:

I've posted the grouplink script in the beta scripts board, so you can view it in action if you want to. I have to document everything before I submit it to the ed depot.
"Whenever you want information on the 'net, don't ask a question; just post a wrong answer." -- Cancer Omega.

captain caffeine

  • Guest
Re:Is it possible to get Id and position ?
« Reply #7 on: 22 Nov 2002, 00:49:10 »
Will try it tonight :)