Home   Help Search Login Register  

Author Topic: Make enemy fire wen i want them to!  (Read 472 times)

0 Members and 1 Guest are viewing this topic.

Gooner861

  • Guest
Make enemy fire wen i want them to!
« on: 28 Apr 2004, 15:31:17 »
Ive got a cutscene where a convoy is attacked but what do i write in the script to make the enemy wait until the trucks r in the position i want them to be ambushed
Like this:

Enemy hiding in town -> Trucks pass by, enemy hold fire -> Enemy attack once lead M113 has been blown to pieces.

I will obviously have the camera at various positions but how can u get the enemy to fire once i get to that particular part of the cutscene? If that makes any sense?

Loup-Garou

  • Guest
Re:Make enemy fire wen i want them to!
« Reply #1 on: 28 Apr 2004, 19:17:51 »
Perhaps first give to the enemy a "hold" waypoint (never fire) and then a "seek and destroy" one  (open fire, "countdown" / "timeout" (don't remember the name) : X, X, X)<- you'll have to play with these numbers.

Not sure this helps, but...  :-\

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re:Make enemy fire wen i want them to!
« Reply #2 on: 28 Apr 2004, 23:37:33 »
Have the bad guys start out as neverfire and stealth.  Then have a script runing that monitors the M113.  When the M113 dies make all the bad guys go into fire at will, combat mode.  I am at work, and I do not know the command syntax to do this of the top of my head, but I will give you a script example when I get home.  I've already done something similar, so I will just paste that as an example.

Gooner861

  • Guest
Re:Make enemy fire wen i want them to!
« Reply #3 on: 29 Apr 2004, 11:38:37 »
Cheers, i only need to know how to do this then im pretty much near completion of my first mission.  ;D

Offline alimag

  • Contributing Member
  • **
  • I'm a llama!
Re:Make enemy fire wen i want them to!
« Reply #4 on: 29 Apr 2004, 17:24:11 »
Hi,

Put this in the init field of the m113:

this addEventHandler ["killed", {groupName setCombatMode "RED"}]

Just replace the bold text with the name of the attacking group. As said before, start the group with combatMode BLUE or GREEN so they hold fire.

When the m113 is destroyed, the group will engage the enemy.

Cheers