Home   Help Search Login Register  

Author Topic: Passing a target to another group  (Read 1261 times)

0 Members and 2 Guests are viewing this topic.

Golf33

  • Guest
Passing a target to another group
« on: 31 Oct 2003, 06:45:27 »
Hurro folks, great site you have here!

My question is this. I have a multiplayer mission with a tank troop and mech inf section attacking Montignac. The two groups are separate but I would like the infantry to be able to designate targets for the tanks and vice versa.

I've been searching these forums and the code snippets but haven't found an answer (or haven't recognised it if I have seen it).

Is there any way to pass information on a target seen by one group to another group and have them engage it?

Thanks
33

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Passing a target to another group
« Reply #1 on: 31 Oct 2003, 13:51:08 »
Welcome to the forum!

Are the groups in question AI or human controlled?
Plenty of reviewed ArmA missions for you to play

Golf33

  • Guest
Re:Passing a target to another group
« Reply #2 on: 31 Oct 2003, 15:09:46 »
One of the groups is human-controlled, the other AI-controlled.

Golf33

  • Guest
Re:Passing a target to another group
« Reply #3 on: 03 Nov 2003, 13:27:12 »
*bump any ideas?

PheliCan

  • Guest
Re:Passing a target to another group
« Reply #4 on: 01 Dec 2003, 19:00:19 »
These things might be complexed, but it's do-able! :)

First of all... You have to find out what unit you're targeting. I've searched the comref, but I couldn't find any function thet do this. Maybe you can work out a walkaround??

This object must be publicvariabled so that the server can command the unit to target the object.

Something like this:
Code: [Select]
INIT.SQS
currTarget = objnull

SENDTARGET.SQS (to use with addAction....)
_caller = _this select 1
currTarget = getTarget _caller
publicVariable "currTarget"

GETTARGET.SQS (executed on the server)
#start
@(currTarget == currTarget)
{_x doTarget currTarget} forEach (units AIGROUP)
currTarget = objNull
goto "start"

OBSERVE that "getTarget" doesn't work!!! You'll have to do a walkaround to find out what object is targetted.
AIGROUP is the group of tanks...

PS. However... You could with ease order your tanks to go to your position if you can't find a way to get the targetted object!