Home   Help Search Login Register  

Author Topic: No camera on dead soldiers  (Read 452 times)

0 Members and 1 Guest are viewing this topic.

pazuzu

  • Guest
No camera on dead soldiers
« on: 23 Dec 2004, 01:56:17 »
Hi, I'm making an outro where all surviving units at the end of mission are shown one by one saluting or doing some other effect.

My problem is the dead units are being shown too with an error and I dont know how to bypass them so the camera just goes straight to the living units.

Here is my script:


enableradio false
TitleCut ["","BLACK OUT",10]
~0
_cam = "camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "back"]
Playsound "Sound1"
TitleCut ["You are heroes and have served beyond the call of duty","BLACK IN",8]
_cam camsettarget object
_cam camsetrelpos [0,2,0]
_cam camcommit 0
@camcommitted _cam
~4
_cam = "camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "back"]
format ["%1",isnull p1]!="false":goto "NOTEXIST11"
_cam camsettarget p1
_cam camsetrelpos [0,2,1]
_cam camcommit 0
_playername = name p1
titlecut [_playername,"PLAIN DOWN",3]
p1 playmove "EffectStandTalk"
~3
p1 playmove "null"
@camcommitted _cam
~3
#NOTEXIST11

format ["%1",isnull p2]!="false":goto "NOTEXIST12"
_cam camsettarget p2
_cam camsetrelpos [0,2,1]
_cam camcommit 4
_playername = name p2
titlecut [_playername,"PLAIN DOWN",3]
~1
p2 playmove "EffectStandSalute"
~3
p2 playmove "null"
@camcommitted _cam
~4
#NOTEXIST12

format ["%1",isnull p3]!="false":goto "NOTEXIST13"
_cam camsettarget p3
_cam camsetrelpos [0,2,1]
_cam camcommit 4
_playername = name p3
titlecut [_playername,"PLAIN DOWN",3]
~1
p3 playmove "FXStandToDip"
~3
p3 playmove "null"
@camcommitted _cam
~4
#NOTEXIST13

format ["%1",isnull p4]!="false":goto "NOTEXIST14"
_cam camsettarget p4
_cam camsetrelpos [0,2,1]
_cam camcommit 4
_playername = name p4
titlecut [_playername,"PLAIN DOWN",3]
~1
p4 playmove "Effectstandsitdown"
~3
p4 playmove "null"
@camcommitted _cam
~4
#NOTEXIST14

format ["%1",isnull p5]!="false":goto "NOTEXIST15"
_cam camsettarget p5
_cam camsetrelpos [0,2,1]
_cam camcommit 4
_playername = name p5
titlecut [_playername,"PLAIN DOWN",3]
~1
p5 playmove "EffectStandSalute"
~3
p5 playmove "null"
@camcommitted _cam
~4
#NOTEXIST15

format ["%1",isnull p6]!="false":goto "NOTEXIST16"
_cam camsettarget p6
_cam camsetrelpos [0,2,1]
_cam camcommit 4
_playername = name p6
titlecut [_playername,"PLAIN DOWN",3]
~1
p6 playmove "EffectStandTalk"
~3
p6 playmove "null"
@camcommitted _cam
~4
#NOTEXIST16

format ["%1",isnull p7]!="false":goto "NOTEXIST17"
_cam camsettarget p7
_cam camsetrelpos [0,2,1]
_cam camcommit 4
_playername = name p7
titlecut [_playername,"PLAIN DOWN",3]
~1
p7 playmove "Effectstandsitdown"
~3
p7 playmove "null"
@camcommitted _cam
~4
#NOTEXIST17

format ["%1",isnull p8]!="false":goto "NOTEXIST18"
_cam camsettarget p8
_cam camsetrelpos [0,2,1]
_cam camcommit 4
_playername = name p8
titlecut [_playername,"PLAIN DOWN",3]
~1
p8 playmove "EffectStandSalute"
~3
p8 playmove "null"
@camcommitted _cam
~4
#NOTEXIST18

format ["%1",isnull p9]!="false":goto "NOTEXIST19"
_cam camsettarget p9
_cam camsetrelpos [0,2,1]
_cam camcommit 4
_playername = name p9
titlecut [_playername,"PLAIN DOWN",3]
~1
p9 playmove "EffectStandTalk"
~3
p9 playmove "null"
@camcommitted _cam
~4
#NOTEXIST19

format ["%1",isnull p10]!="false":goto "NOTEXIST20"
_cam camsettarget p10
_cam camsetrelpos [0,2,1]
_cam camcommit 4
_playername = name p10
titlecut [_playername,"PLAIN DOWN",3]
~1
p10 playmove "EffectStandSalute"
~3
p10 playmove "null"
@camcommitted _cam
~4
#NOTEXIST20

format ["%1",isnull p11]!="false":goto "NOTEXIST21"
_cam camsettarget p11
_cam camsetrelpos [0,2,1]
_cam camcommit 4
_playername = name p11
titlecut [_playername,"PLAIN DOWN",3]
~1
p11 playmove "EffectStandSalute"
~3
p11 playmove "null"
@camcommitted _cam
~4
#NOTEXIST21

format ["%1",isnull p12]!="false":goto "NOTEXIST22"
_cam camsettarget p12
_cam camsetrelpos [0,2,1]
_cam camcommit 4
_playername = name p12
titlecut [_playername,"PLAIN DOWN",3]
~1
p12 playmove "EffectStandSalute"
~3
p12 playmove "null"
@camcommitted _cam
~4
#NOTEXIST22
~1
_cam cameraeffect ["terminate", "back"]
camdestroy _cam
enableradio true
exit


Thanks.



Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:No camera on dead soldiers
« Reply #1 on: 23 Dec 2004, 09:11:21 »
Hey pazuzu,

I've written a couple of these myself too. I don't have time to go into your script right now but maybe you can get a few pointers from my latest outro script.



titlecut ["","black out",3]
~3
0 fademusic 0
4 fademusic 0.5
playMusic ["FDFairut_tiennayttaja",25]

_units = units rgrp1
_counter = -1
_max = (count _units) -1


_cam = "camera" camcreate [0,0,0]
_cam cameraeffect ["internal","back"]

_cam camsettarget m21
_cam camsetrelpos [50,100,40]
_cam camcommit 0
titlecut ["Mission Complete","black in",3]
~6
titlecut ["","black out",2]
~2

#loop
_counter = _counter +1
(_units select _counter) switchmove "EffectStandSalute"
~1
_cam camsettarget (_units select _counter)
_cam camsetrelpos [1,1,1]
_cam camcommit 0
titlecut ["","black in",0.5]
~1
titleText [format ["\n%1",name (_units select _counter)],"PLAIN DOWN"]
~2
titletext ["\n\n ","plain down"]
titlecut ["","black out",0.5]
?_counter != _max: goto "loop"


#end
~1
7 fademusic 0
_cam camsettarget m21
_cam camsetrelpos [-50,-100,40]
_cam camcommit 0
titlecut ["","black in",3]
titleRsc ["ofptf","plain"]
~6
titlecut ["","black out",2]
~2
_cam cameraeffect ["terminate", "back"]
camdestroy _cam

end=true
exit
Not all is lost.

pazuzu

  • Guest
Re:No camera on dead soldiers
« Reply #2 on: 24 Dec 2004, 00:08:28 »
Thanks for replying.


I'm not sure what to do with your script. I tried it but I cant get it to do what I want...

I've got 12 units & I want the end cutscene to go to each surviving soldier & display their names & each soldier does some kind of playmove like saluting or sitting down. I can get that much done in the script but I dont know how to get camera to skip over dead units & go to the next living unit.

This is a coop mission.

Thanks for the help.