OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Hauk on 16 Jun 2005, 19:18:32
-
Hey guys,
heres the code before i explain
officer1 setCombatMode "RED"
man3 setCaptive false
[] exec "shoot.sqs"
shoot.sqs is this
_officer1 = _this select 0
_man3 = 1
officer1 dofire man3
exit
Here's the problem. I have the shoot.sqs being ran in another script which is fine, but what the officer does is run back about 15 metres then turns and shoots the civilian. Is there any way of just making him shoot the civilian standing still? Like an old style execution. ;)
Thanks for the help ;D
Hauk 8)
-
I need something like this too, though I have no idea how to do it - sorry.
If anyone answering can add a decent code snippet to use I'd be grateful too.
-
m'kay, well looking at the script i'm not sure i understand...
officer1 setCombatMode "RED"
man3 setCaptive false
[] exec "shoot.sqs"
is fine, but then in 'shoot.sqs'
_officer1 = _this select 0
is not going to yield anything. i also don't understand the '_man3 = 1' bit.
if you make 'shoot.sqs' like the following, it should work, called by [officer1] exec "shoot.sqs"
_shooter = _this select 0
_shooter dotarget man3
_shooter dofire man3
exit
-
i tried what you said, but still he stands in front of "man3" and refuses to shoot him!!? :o
_officer1 = _this select 0
_officer1 dotarget man3
_officer1 dofire man3
exit
thats what you told me to put in, and in another script i have [officer1] exec "shoot.sqs". its crazy, he refuses to shoot!
Thanks for helping!! :)
Hauk
-
see attached. go through your own situation and check everything bit for bit - make sure the names are accurate, all that ;)
-
Okay I'm totally at a loss. He're is the ENTIRE CUTSCENE code for the intro for Operation Run Off.
"Officer1" wont' "shoot man3" even after using bedges script. His test mission worked fine, but when i incorporated it into my intro, i got squat, nada, nothing!
Argh! anyway, here's ALL the code, see if you can see any problems.
TitleCut ["","Black in",3]
_camera = "camera" CamCreate [0,0,0]
_camera CameraEffect ["INTERNAL","BACK"]
_officer1 = _this select 0
;=== 12:39:53
_camera camSetTarget chop
_camera camSetPos [614.54,12070.34,10.46]
_camera camSetFOV 0.050
_camera camCommit 0
@camCommitted _camera
~3
;=== 12:45:07
_camera camSetTarget [-59328.42,-67826.67,5089.52]
_camera camSetPos [599.83,12067.79,13.44]
_camera camSetFOV 0.291
_camera camCommit 14
@camCommitted _camera
~2
;=== 12:47:21
_camera camSetTarget [-73727.94,78832.44,2816.42]
_camera camSetPos [642.42,12039.00,14.77]
_camera camSetFOV 0.558
_camera camCommit 5
@camCommitted _camera
~4
titlecut ["This is Foxtrot Six. Package delivered, RTB over.","PLAIN DOWN",0.75]
~3
move=true
move2=true
titlecut [" ","BLACK OUT",3]
~2
;=== 21:20:26
_camera camSetTarget [93243.08,49070.55,-6912.11]
_camera camSetPos [609.63,12048.86,19.85]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera
deletevehicle chop
titlecut [" ","BLACK IN",3]
~1
;=== 14:04:58
_camera camSetTarget [-95190.34,40454.29,2938.04]
_camera camSetPos [660.79,12097.52,1.41]
_camera camSetFOV 0.601
_camera camCommit 4
@camCommitted _camera
titlecut ["Good evening Lieutenant.","PLAIN DOWN",0.75]
~2
titlecut ["Where's James?","PLAIN DOWN",0.75]
~4
;=== 14:08:37
_camera camSetTarget [97032.85,-14547.41,1289.24]
_camera camSetPos [656.20,12097.62,1.61]
_camera camSetFOV 0.508
_camera camCommit 0
@camCommitted _camera
titlecut ["He's already on the beach, doing recon.","PLAIN DOWN",0.75]
~3
;=== 14:09:57
_camera camSetTarget [-97237.64,32461.35,1309.61]
_camera camSetPos [658.65,12097.58,1.61]
_camera camSetFOV 0.413
_camera camCommit 0
@camCommitted _camera
titlecut ["So what are we doing out here?","PLAIN DOWN",0.75]
~2
;=== 14:11:00
_camera camSetTarget [-87230.87,-35584.23,1309.76]
_camera camSetPos [659.94,12097.75,1.61]
_camera camSetFOV 0.413
_camera camCommit 3
@camCommitted _camera
titlecut ["The Soviets have taken a town on the West Coast of Malden \n and turned it into an armoured fortress. \n We need you to wipe out those enemy guns, and leave no-one alive.","PLAIN DOWN",0.75]
~8
;=== 14:22:02
_camera camSetTarget [-93090.01,46868.07,1427.38]
_camera camSetPos [659.73,12096.90,1.58]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera
titletext ["That easy huh?","PLAIN DOWN",0.75]
~3
;=== 14:23:58
_camera camSetTarget [-51897.95,-72974.27,-471.98]
_camera camSetPos [659.76,12098.85,1.58]
_camera camSetFOV 0.884
_camera camCommit 0
@camCommitted _camera
titletext ["We recognise the risks involved. But James said you were the best.","PLAIN DOwN",0.75]
~3
;=== 14:25:45
_camera camSetTarget [-36643.68,104878.39,-472.38]
_camera camSetPos [657.58,12095.70,1.57]
_camera camSetFOV 0.608
_camera camCommit 0
@camCommitted _camera
titletext ["We are.","PLAIN DOWN",0.75]
~2
;=== 14:23:58
_camera camSetTarget [-51897.95,-72974.27,-471.98]
_camera camSetPos [659.76,12098.85,1.58]
_camera camSetFOV 0.884
_camera camCommit 0
@camCommitted _camera
titletext ["You'll be inserted by boat just north of the town. \n Your on your own from there.","PLAIN DOWN",0.75]
~4.5
;=== 14:28:17
_camera camSetTarget [15858.43,110932.51,-472.43]
_camera camSetPos [656.37,12096.05,1.57]
_camera camSetFOV 0.608
_camera camCommit 0
@camCommitted _camera
titletext ["Just the way we like it.","PLAIN DOWN",0.75]
~3
blkop domove (getpos (move1))
blkop1 domove (getpos (move3))
;=== 14:45:34
_camera camSetTarget [-99195.63,17280.65,109.90]
_camera camSetPos [669.94,12097.79,0.90]
_camera camSetFOV 0.209
_camera camCommit 0
@camCommitted _camera
~1
;=== 14:46:02
_camera camSetTarget [-99195.63,17280.65,109.91]
_camera camSetPos [669.94,12097.79,0.90]
_camera camSetFOV 0.609
_camera camCommit 3
@camCommitted _camera
~2
blkop domove (getpos (move4))
blkop1 domove (getpos (move5))
blkop domove (getpos (move6))
blkop1 domove (getpos (move7))
;=== 0:23:08
_camera camSetTarget [38843.06,-82475.97,21859.14]
_camera camSetPos [3557.60,8539.16,22.88]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera
~2
;=== 0:23:48
_camera camSetTarget [75395.84,-57552.32,21858.95]
_camera camSetPos [3557.60,8539.16,22.88]
_camera camSetFOV 0.700
_camera camCommit 2
@camCommitted _camera
~2
;=== 0:26:15
_camera camSetTarget [-58393.53,-67199.75,-20452.57]
_camera camSetPos [3572.79,8535.80,16.02]
_camera camSetFOV 0.505
_camera camCommit 2
@camCommitted _camera
~1
;=== 14:35:10
_camera camSetTarget [94790.18,48150.56,-9672.66]
_camera camSetPos [3519.85,8484.92,18.73]
_camera camSetFOV 0.700
_camera camCommit 2
@camCommitted _camera
~1.5
;=== 0:27:03
_camera camSetTarget [101896.45,-7478.32,-8298.80]
_camera camSetPos [3538.59,8480.72,2.08]
_camera camSetFOV 0.505
_camera camCommit 2
@camCommitted _camera
~1
;=== 0:28:08
_camera camSetTarget [101979.31,-8157.32,-5579.95]
_camera camSetPos [3538.59,8480.72,2.08]
_camera camSetFOV 0.327
_camera camCommit 2
@camCommitted _camera
titletext ["And now I will get rid of the last of my problems in this cursed town. Kill him.","PLAIN DOWN",0.75]
~3
;=== 0:40:30
_camera camSetTarget officer1
_camera camSetPos [3632.00,8283.33,1.65]
_camera camSetFOV 0.024
_camera camCommit 0
@camCommitted _camera
soldier1 domove (getpos (soldiermove1))
soldier2 domove (getpos (soldiermove2))
CutRSC ["Binocular","Plain Down",100]
_Zoom = 0.7
~2
kill = true
man3 setCaptive false
officer1 dotarget man3
side man3 == west
#loop
_officer1 dofire man3
?kill = true:goto "loop"
soldier1 setBehaviour "SAFE"
soldier2 setBehaviour "SAFE"
~6
_camera CameraEffect ["INTERNAL","BACK"]
jamesg setBehaviour "SAFE"
;=== 0:44:16
_camera camSetTarget [94979.30,-26653.57,21009.17]
_camera camSetPos [3629.73,8284.24,0.91]
_camera camSetFOV 0.591
_camera camCommit 0
@camCommitted _camera
titlecut ["Jesus Christ, they're killing civilians. This is Hotel One, I want my men out here now.","PLAIN DOWN",0.75]
~4
titlecut ["Roger that Hotel One, your men have just arrived.","PLAIN DOWN",0.75]
~2
pilot1 assignasdriver ah1
pilot2 assignasdriver ah2
pilot1 moveindriver ah1
pilot2 moveindriver ah2
~1
pilot1 flyinheight 50
pilot2 flyinheight 50
pilot1 domove (getpos (ahmove1))
pilot2 domove (getpos (ahmove2))
;=== 1:32:39
_camera camSetTarget ah2
_camera camSetPos [812.95,12018.25,19.85]
_camera camSetFOV 0.419
_camera camCommit 0
@camCommitted _camera
~12
titlecut ["Hotel One, this is November One and Two. As of now, you have full air support.","PLAIN DOWN",0.75]
~20
titlecut ["Roger that November One. Recieved and understood. Hotel out.","PLAIN DOWN",0.75]
~4.5
titlecut [" ","BLACK OUT",3]
_camera cameraeffect ["terminate", "back"]
camdestroy _camera
obj1=true
exit
If you can see why he isn't shooting man3, i will do any amount of beta testing for you!!
Thx :)
Hauk
-
you could probably just give the officer a destroy waypoint and place it on the civilian, make a trigger and give it the "time setting" you want and sycronize it to the waypoint before the destroy waypoint
or you could use a trigger.
officername dofire civilianname
so if your officer was bob, and your civilian was jim
bob dofire jim
or if it really does not work
place the officer so he is facing the civilian, and in a trigger put
officername fire"weaponname"; civilianname setdammage 1
for weapon name use:
if its a handgun execution
if the officer is west
officername fire"Beretta"
if the officer is east
officername fire"tokarev"
-
I see what you mean, but the waypoint and trigger countdown thing wouldn't really give me much control over the flow of events in the intro.
I know there's a way of doing it, its just i can't do it, and i'm really at a loss
If someone could rewrite the code above so that it all works together I'd greatly appreciate that!
Thanks for the help penguinman ;)
Hauk
-
ok, this should work, no garentees though,
you had forgotten to add a "_" infront of one of your _officer1's and i aded somthing else to make sure he shoots him
TitleCut ["","Black in",3]
_camera = "camera" CamCreate [0,0,0]
_camera CameraEffect ["INTERNAL","BACK"]
_officer1 = _this select 0
;=== 12:39:53
_camera camSetTarget chop
_camera camSetPos [614.54,12070.34,10.46]
_camera camSetFOV 0.050
_camera camCommit 0
@camCommitted _camera
~3
;=== 12:45:07
_camera camSetTarget [-59328.42,-67826.67,5089.52]
_camera camSetPos [599.83,12067.79,13.44]
_camera camSetFOV 0.291
_camera camCommit 14
@camCommitted _camera
~2
;=== 12:47:21
_camera camSetTarget [-73727.94,78832.44,2816.42]
_camera camSetPos [642.42,12039.00,14.77]
_camera camSetFOV 0.558
_camera camCommit 5
@camCommitted _camera
~4
titlecut ["This is Foxtrot Six. Package delivered, RTB over.","PLAIN DOWN",0.75]
~3
move=true
move2=true
titlecut [" ","BLACK OUT",3]
~2
;=== 21:20:26
_camera camSetTarget [93243.08,49070.55,-6912.11]
_camera camSetPos [609.63,12048.86,19.85]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera
deletevehicle chop
titlecut [" ","BLACK IN",3]
~1
;=== 14:04:58
_camera camSetTarget [-95190.34,40454.29,2938.04]
_camera camSetPos [660.79,12097.52,1.41]
_camera camSetFOV 0.601
_camera camCommit 4
@camCommitted _camera
titlecut ["Good evening Lieutenant.","PLAIN DOWN",0.75]
~2
titlecut ["Where's James?","PLAIN DOWN",0.75]
~4
;=== 14:08:37
_camera camSetTarget [97032.85,-14547.41,1289.24]
_camera camSetPos [656.20,12097.62,1.61]
_camera camSetFOV 0.508
_camera camCommit 0
@camCommitted _camera
titlecut ["He's already on the beach, doing recon.","PLAIN DOWN",0.75]
~3
;=== 14:09:57
_camera camSetTarget [-97237.64,32461.35,1309.61]
_camera camSetPos [658.65,12097.58,1.61]
_camera camSetFOV 0.413
_camera camCommit 0
@camCommitted _camera
titlecut ["So what are we doing out here?","PLAIN DOWN",0.75]
~2
;=== 14:11:00
_camera camSetTarget [-87230.87,-35584.23,1309.76]
_camera camSetPos [659.94,12097.75,1.61]
_camera camSetFOV 0.413
_camera camCommit 3
@camCommitted _camera
titlecut ["The Soviets have taken a town on the West Coast of Malden \n and turned it into an armoured fortress. \n We need you to wipe out those enemy guns, and leave no-one alive.","PLAIN DOWN",0.75]
~8
;=== 14:22:02
_camera camSetTarget [-93090.01,46868.07,1427.38]
_camera camSetPos [659.73,12096.90,1.58]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera
titletext ["That easy huh?","PLAIN DOWN",0.75]
~3
;=== 14:23:58
_camera camSetTarget [-51897.95,-72974.27,-471.98]
_camera camSetPos [659.76,12098.85,1.58]
_camera camSetFOV 0.884
_camera camCommit 0
@camCommitted _camera
titletext ["We recognise the risks involved. But James said you were the best.","PLAIN DOwN",0.75]
~3
;=== 14:25:45
_camera camSetTarget [-36643.68,104878.39,-472.38]
_camera camSetPos [657.58,12095.70,1.57]
_camera camSetFOV 0.608
_camera camCommit 0
@camCommitted _camera
titletext ["We are.","PLAIN DOWN",0.75]
~2
;=== 14:23:58
_camera camSetTarget [-51897.95,-72974.27,-471.98]
_camera camSetPos [659.76,12098.85,1.58]
_camera camSetFOV 0.884
_camera camCommit 0
@camCommitted _camera
titletext ["You'll be inserted by boat just north of the town. \n Your on your own from there.","PLAIN DOWN",0.75]
~4.5
;=== 14:28:17
_camera camSetTarget [15858.43,110932.51,-472.43]
_camera camSetPos [656.37,12096.05,1.57]
_camera camSetFOV 0.608
_camera camCommit 0
@camCommitted _camera
titletext ["Just the way we like it.","PLAIN DOWN",0.75]
~3
blkop domove (getpos (move1))
blkop1 domove (getpos (move3))
;=== 14:45:34
_camera camSetTarget [-99195.63,17280.65,109.90]
_camera camSetPos [669.94,12097.79,0.90]
_camera camSetFOV 0.209
_camera camCommit 0
@camCommitted _camera
~1
;=== 14:46:02
_camera camSetTarget [-99195.63,17280.65,109.91]
_camera camSetPos [669.94,12097.79,0.90]
_camera camSetFOV 0.609
_camera camCommit 3
@camCommitted _camera
~2
blkop domove (getpos (move4))
blkop1 domove (getpos (move5))
blkop domove (getpos (move6))
blkop1 domove (getpos (move7))
;=== 0:23:08
_camera camSetTarget [38843.06,-82475.97,21859.14]
_camera camSetPos [3557.60,8539.16,22.88]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera
~2
;=== 0:23:48
_camera camSetTarget [75395.84,-57552.32,21858.95]
_camera camSetPos [3557.60,8539.16,22.88]
_camera camSetFOV 0.700
_camera camCommit 2
@camCommitted _camera
~2
;=== 0:26:15
_camera camSetTarget [-58393.53,-67199.75,-20452.57]
_camera camSetPos [3572.79,8535.80,16.02]
_camera camSetFOV 0.505
_camera camCommit 2
@camCommitted _camera
~1
;=== 14:35:10
_camera camSetTarget [94790.18,48150.56,-9672.66]
_camera camSetPos [3519.85,8484.92,18.73]
_camera camSetFOV 0.700
_camera camCommit 2
@camCommitted _camera
~1.5
;=== 0:27:03
_camera camSetTarget [101896.45,-7478.32,-8298.80]
_camera camSetPos [3538.59,8480.72,2.08]
_camera camSetFOV 0.505
_camera camCommit 2
@camCommitted _camera
~1
;=== 0:28:08
_camera camSetTarget [101979.31,-8157.32,-5579.95]
_camera camSetPos [3538.59,8480.72,2.08]
_camera camSetFOV 0.327
_camera camCommit 2
@camCommitted _camera
titletext ["And now I will get rid of the last of my problems in this cursed town. Kill him.","PLAIN DOWN",0.75]
~3
;=== 0:40:30
_camera camSetTarget officer1
_camera camSetPos [3632.00,8283.33,1.65]
_camera camSetFOV 0.024
_camera camCommit 0
@camCommitted _camera
soldier1 domove (getpos (soldiermove1))
soldier2 domove (getpos (soldiermove2))
CutRSC ["Binocular","Plain Down",100]
_Zoom = 0.7
~2
kill = true
man3 setCaptive false
removeallweapons _officer1
_officer1 addweapon"Ak74"
_officer1 addmagazine"TokarevMag"
_officer1 addweapon"Tokarev"
_officer1 dotarget man3
side man3 == west
#loop
_officer1 fire"tokarev"
?kill = true:goto "loop"
soldier1 setBehaviour "SAFE"
soldier2 setBehaviour "SAFE"
~6
_camera CameraEffect ["INTERNAL","BACK"]
jamesg setBehaviour "SAFE"
;=== 0:44:16
_camera camSetTarget [94979.30,-26653.57,21009.17]
_camera camSetPos [3629.73,8284.24,0.91]
_camera camSetFOV 0.591
_camera camCommit 0
@camCommitted _camera
titlecut ["Jesus Christ, they're killing civilians. This is Hotel One, I want my men out here now.","PLAIN DOWN",0.75]
~4
titlecut ["Roger that Hotel One, your men have just arrived.","PLAIN DOWN",0.75]
~2
pilot1 assignasdriver ah1
pilot2 assignasdriver ah2
pilot1 moveindriver ah1
pilot2 moveindriver ah2
~1
pilot1 flyinheight 50
pilot2 flyinheight 50
pilot1 domove (getpos (ahmove1))
pilot2 domove (getpos (ahmove2))
;=== 1:32:39
_camera camSetTarget ah2
_camera camSetPos [812.95,12018.25,19.85]
_camera camSetFOV 0.419
_camera camCommit 0
@camCommitted _camera
~12
titlecut ["Hotel One, this is November One and Two. As of now, you have full air support.","PLAIN DOWN",0.75]
~20
titlecut ["Roger that November One. Recieved and understood. Hotel out.","PLAIN DOWN",0.75]
~4.5
titlecut [" ","BLACK OUT",3]
_camera cameraeffect ["terminate", "back"]
camdestroy _camera
obj1=true
exit
-
I'm unsure if you are simply trying to get an eastie to fire on a civvie or what, but have you tried this?
Group civvie to a westie (colonel rank) and set the westie's probability or presesnce (near the bottom) to 0. That way the civvie will be viewed as a west side person so now put this setcaptive true in the civvie's init.
And for the Easties involved in the scene, if they get all alert and start lying down, then put this setunitpos "UP" in their init lines. And set those with guns on their backs all the time to Careless.
Finally when you want the civvie to die simply setcaptive false him and make sure one of the easties has a gun out and tell them to dofire or they'll prolly attack by themselves.
So if you didn't do that before, its something to try. If you did do that, well..... ;D
-
removeallweapons _officer1
_officer1 addweapon "Ak74"
_officer1 addmagazine "TokarevMag"
_officer1 addweapon "Tokarev"
_officer1 dotarget man3
side man3 == west
#loop
_officer1 fire"tokarev"
?kill = true:goto "loop"
m'kay, a few things i notice about this:
i had problems once (in the first mission i made) with making a firing squad use the weapon i wanted them to use. some put a satchel down, but pretty much none of them wanted to use their main weapons. they all got out their pistolas. if i took away the pistols, they refused to fire. this may be a range issue - if the target is a certain distance away, ai loons may want to use their main weapons, and in this case it has no ammo.
you may wish to put in
_officer1 selectweapon "tokarev"
after giving it to him, just so he knows.
_officer1 fire "tokarev"
i'm not sure that's going to do anything. it may be looking for a muzzle mode and all that.
_officer1 dofire target_name
will work - stick with that.
side man3 == west
i think i know what you're trying to do with that, but it won't work. when you declare a variable, you use one equals sign (=). if you want to check if two variables are equal, you use two (==). the command side (http://www.ofpec.com/editors/comref.php?letter=S#side) cannot be used in this way.
otherwise the script is fine. keep at it - the satisfaction you'll feel when it finally decides to work is worth it, believe me ;)
-
@GuiltyRoachkillar
What i'm trying to do is make the civilian execution cut scene in Operation Run Off run more smoothly, so i'm investigating differant ways around the first way i did it. I know its something to do with setBehaviour, but i just can't find it. :-[
@bedges
I'll put those changes in thanks ;D
Hauk 8)
-
have U tried "SetCombatModing" the officer to any of it stances?? or even Disabeling him legs?
-
yes i have tried that, i think i've tried everything at this stage. ???
Argh :-\
Hauk 8)