OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: GreenPea on 01 Oct 2005, 13:19:46
-
I've only just reinstalled Flashpoint, so I can't remember how I fixed this problem back in the day. Okay here goes...
I've got a sniper setup, waiting for the radio command to fire, whereupon he should open fire on 3 sentrys (that are in plain view). Problem is he doesn't. I've had and fixed this problem before, but can't recall how. I'm pretty sure I used the "knowsabout" command. Bare with me...
Sniper in position with the following in his init. "this setunitpos "DOWN"; this setcombatmode "GREEN"." Then I've got a trigger setup for Radio Alpha with thus in the activation: "Sniper setcombatmode "YELLOW"; sniper dotarget guard1; sniper dotarget guard2; sniper dotarget guard3".
All guards are visable, and he only fires when they fire. I just cant bloody remember how I fixed this... PLEASE REFRESH MY MEMORY!
-
Try:
setCombatMode "RED"
also have a look at reveal
http://www.ofpec.com/editors/comref.php?letter=R#reveal
-
Make him higher skill. The doTarget commands may just be confusing him.
-
Maybe it will help, if you add doFire command.
EDIT: I've readed your post again, and I've noticed, that you have a trigger, where all those commands are used at once (sloppy reading from me, I do this (to)often :-[), so you practically are giving the sniper the order, to target all those guards at once, and that may confuse him. It'll be better, if you'll use the script.
I've used dotarget and dofire commands for the sniper in one of my cutscenes, and it works perfectly; the sniper hit the target right on time, and between the eyes from the 300 meters distance. And it could be also wise, if you'll add not alive command as condition for your sniper to go target next victim.
-
yep a script with
sniper dotarget sentry1
~0.85
sniper dofire sentry1
@ !alive sentry1
sniper dotarget sentry2
~0.85
sniper dotarget sentry2
@ !alive sentry2
sniper dotarget sentry3
~0.85
sniper dotarget sentry3
@ !alive sentry3
hint "all sentrys are dead"
that should definately work
hope that helps