Home   Help Search Login Register  

Author Topic: Move to, Target, and Engage  (Read 1496 times)

0 Members and 1 Guest are viewing this topic.

Offline Copperhead

  • Members
  • *
Move to, Target, and Engage
« on: 09 Apr 2007, 07:52:03 »
Hello,

I've looked through the FAQ, these forums, tried many different things from different people and I still can't get this small thing to work.

What I want:

1) A squad has a basic 'Move' waypoint to a location. It is synchronized with a trigger (which is for the detection of the enemy).
2) When the enemy has been detected, I want this squad to target, move to the enemy unit(s) and engage them.
3)The squad isn't in view of the enemy, I want the squad to move to wherever the enemy is and engage them.

This picture might give you an idea:


What I've Tried:

I've tried making a script with dotarget, domove, commandtarget, reveal.. none of them work (unless I'm doing it wrong). I've got such ideas from posts in this forum.

After trying the above, I went in to the squad and saw if the leader gave commands to target the unit, but nothing, the squad just ends up spreading out then stopping.

Another thing I've tried is just placing a simple 'Destroy' waypoint but then the squad ended up going away from the desired unit, lol.

Help!

Any ideas will be appreciated.

Cheers,
Copper


Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Move to, Target, and Engage
« Reply #1 on: 09 Apr 2007, 08:49:37 »
try a seek and destroy waypoint instead. if an enemy is found, they'll engage until they're defeated. if no enemy is found, they'll proceed to their next waypoint.

Offline Copperhead

  • Members
  • *
Re: Move to, Target, and Engage
« Reply #2 on: 09 Apr 2007, 09:19:07 »
try a seek and destroy waypoint instead. if an enemy is found, they'll engage until they're defeated. if no enemy is found, they'll proceed to their next waypoint.
:o

Lol, that did work (the first time). The trouble as you probably know, with 'Seek and Destroy' is the order isn't always in the same place. When I tried 'Seek and Destroy' the first time, they brilliantly ran up the road straight into battle, second time they were split up and went to the right.

That is my problem. I want the squad to go straight to (or near) the enemy unit(s) and engage, wherever the unit(s) are, lol.

Thanks for your help, any more ideas?  :P

Copper

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Move to, Target, and Engage
« Reply #3 on: 09 Apr 2007, 10:14:56 »
First, do not quote the entirety of the previous post your answering to..
There's no need to do that. Forum policy.

Quote
that did work (the first time). The trouble as you probably know, with 'Seek and Destroy' is the order isn't always in the same place.
I don't know how you did this because after testing this for 40 times the group always aproached the S&D waypoint the same way.
After reaching it they do fan out to seek the enemy to destroy..

As you don't give any exact info on how you tried it I can't pinpoint your problem.

I attached small missionette which I used to test this.
Note that the detection trigger is 'faked' because there is no way to force the enemy to detect you, reveal command only tells the AI there is somebody/thing there, they don't know for example on which side that somebody belongs to..

Dunno if this is what you were looking for though :dunno:
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Copperhead

  • Members
  • *
Re: Move to, Target, and Engage
« Reply #4 on: 09 Apr 2007, 11:47:13 »
That worked great, thanks.

I understand everything you've done in that mission.sqm, except the , 3 - part of [nme_grp,3]. What exactly does that 3 do?

Another question is, how did you make the 'Seek and Destroy' waypoint appear near the player? Because in the editor it isn't even close.

Sorry for quoting all of that, didn't know of that policy.

Cheers,
Copper

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Move to, Target, and Engage
« Reply #5 on: 09 Apr 2007, 12:15:04 »
Quote
What exactly does that 3 do
It's the number of the waypoint to be moved, in this case the S&D waypoint.
So with that command I place the S&D waypoint on the player's position..

The waypoint numbering business can be a bit confusing.
If you open that S&D waypoint it's number is 2 but in 'reality' it's number 3.
Each unit placed on the map has a waypoint directly 'on' them, numbered 0 and so any additional waypoint added does not start from 0 even though the waypoint window suggests that..
Dunno if this applies to groups of many, they probably only have the initial 0 waypoint on the leader..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline mcnorth

  • Members
  • *
Re: Move to, Target, and Engage
« Reply #6 on: 09 Apr 2007, 23:16:25 »
Here's a very simple solution. Perhaps too simple. It's a crude script that gets the position of one group and sends another group. There some randomization factored in for x axis, y axis and time if you want. The script is commented enough so that you shouldn't have any trouble understanding it. As far as engaging enemy ai is concerned the game will take care of that.