Home   Help Search Login Register  

Author Topic: Shooting in a script  (Read 1223 times)

0 Members and 1 Guest are viewing this topic.

Tycus

  • Guest
Shooting in a script
« on: 04 Aug 2003, 03:05:08 »
Hey there

im making a cutscene and at one point it is vital that a unit shoots at a specific time, is there anyway i can make this happen?, possibly in a external script, or even incorperate it into my camera script?

Thnxs

m21man

  • Guest
Re:Shooting in a script
« Reply #1 on: 04 Aug 2003, 03:43:07 »
You could use setcombatmode to define when the shooter can fire, and you can use dotarget to target what you want the shooter to shoot.

Note: If the target is an enemy, then setcombatmode will work. If not, you'll have to use the dofire command to force the shooter to fire.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Shooting in a script
« Reply #2 on: 04 Aug 2003, 04:59:23 »
Problem with "dofire" is that you have to wait for the guy to aim at his target, and then wait until he feels like firing. Its just as accurate as the AI normally shoots, however you can't always control exactly when he pulls the trigger.

If you vitally need him to fire at a specific point in the script, you should use the "fire" command: unit fire "weapon". If you need him to hit something, you should first tell him to watch his target, although that will only be accurate at close distances.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Tycus

  • Guest
Re:Shooting in a script
« Reply #3 on: 04 Aug 2003, 05:16:34 »
ok i am so increadibly noob that i dont get what "dofire" and the other thing is, so yeah... The guy is a At soldier, hes using the CarlGustovLauncher to shoot an empty BMP, so yeah, the reason i need his getting ready to shoot, and his actual shooting to be specific is because ive slowed time down.

Tycus

  • Guest
Re:Shooting in a script
« Reply #4 on: 04 Aug 2003, 05:18:01 »
Thanks i think ive got it now, thanks a heap :>

FlidMerchant

  • Guest
Re:Shooting in a script
« Reply #5 on: 09 Aug 2003, 19:53:56 »
You could use the ammo command to find out when he fires instead of firing during slow mo... So it would be something like this:

?(guy1 ammo "CarlGustav" == 0)
Setacctime 0.1