Home   Help Search Login Register  

Author Topic: cam script and end scipt  (Read 1199 times)

0 Members and 1 Guest are viewing this topic.

Offline megz

  • Members
  • *
cam script and end scipt
« on: 30 Aug 2007, 23:36:53 »
Im a bit of a newb at this edditing but ive got my head round alot this week, ive just done a cam script but for some reason it won't finish the script and return to the game after fade out, it just stays black. i know i'm just missing a command or something. this script is:

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

titlecut [" ","BLACK IN",2]

~2

_cam camPrepareTarget [-61374.17,68534.41,-37898.52]
_cam camPreparePos [5447.11,4562.15,26.17]
_cam camPrepareFOV 0.801
_cam camCommitPrepared 0
@camCommitted _cam

~4

_cam camPrepareTarget [105297.25,1979.99,4935.49]
_cam camPreparePos [5447.01,4589.52,72.56]
_cam camPrepareFOV 0.235
_cam camCommitPrepared 3
@camCommitted _cam

~3

titlecut [" ","BLACK OUT",2]

~2

camDestroy _cam
_cam cameraeffect ["terminate", "back"]


exit

Also, ive done a cutscene in the intro part of the mission which i want to be played when a certain thing happens in the actual mission. Its basically a firing squad. Its works nice when i preview it in the editor in intro. But i want it to be a scipt in the mission and when a trigger is activated it runs the scipt. So what i did is copy the Class Intro bit of the mission.sqs and copy it into another sqs attached to a trigger. I thought this would place the units involved in the cutscene and then run the cutscene. but it doesn't. is there any way to run a cutscene which has units not in the original mission without doing outro win or loose. The scipt is below. Thanks.


This is what i copied from the original intro, i changed class intro to class detect (which is the name of the script, don't know if thats hows to do it :S)

Quote
Class Detect
{
addOns[]=
{
"map_ssara",
"UK_Desert",
"cacharacters",
"CAMisc",
"CAWheeled",
"CATracked"
};
addOnsAuto[]=
{
"UK_Desert",
"cacharacters",
"CAMisc",
"CAWheeled",
"CATracked",
"map_ssara"
};
randomSeed=10444803;
class Intel
{
startWeather=0.100000;
forecastWeather=0.100000;
year=2007;
month=12;
day=7;
hour=6;
minute=40;
};
class Groups
{
items=6;
class Item0
{
side="WEST";
class Vehicles
{
items=1;
class Item0
{
position[]={5400.135742,51.078224,4588.226074};
azimut=270.000000;
id=0;
side="WEST";
vehicle="UK_Soldier_dWAA";
player="PLAYER COMMANDER";
leader=1;
skill=0.600000;
text="blue1";
init="blue1 stop true; blue1 setunitpos ""UP""; removeAllWeapons blue1; blue1 setCombatMode ""BLUE""";
};
};
};
class Item1
{
side="EAST";
class Vehicles
{
items=1;
class Item0
{
position[]={5390.056152,51.105244,4589.355469};
azimut=90.000000;
id=1;
side="EAST";
vehicle="SoldierEB";
leader=1;
skill=0.600000;
text="red3";
init="red3 setunitpos ""UP""; red3 doTarget blue1; red3 setCombatMode ""BLUE""";
};
};
};
class Item2
{
side="EAST";
class Vehicles
{
items=1;
class Item0
{
position[]={5390.042480,51.162506,4591.574219};
azimut=90.000000;
id=2;
side="EAST";
vehicle="SoldierEB";
leader=1;
skill=0.600000;
text="red4";
init="red4 setunitpos ""UP""; red4 doTarget blue1; red4 setCombatMode ""BLUE""";
};
};
};
class Item3
{
side="EAST";
class Vehicles
{
items=1;
class Item0
{
position[]={5390.120605,51.054764,4587.125000};
azimut=90.000000;
id=3;
side="EAST";
vehicle="SoldierEB";
leader=1;
skill=0.600000;
text="red2";
init="red2 setunitpos ""UP""; red2 doTarget blue1; red2 setCombatMode ""BLUE""";
};
};
};
class Item4
{
side="EAST";
class Vehicles
{
items=1;
class Item0
{
position[]={5390.142578,51.010220,4585.149414};
azimut=90.000000;
id=4;
side="EAST";
vehicle="SoldierEB";
leader=1;
skill=0.600000;
text="red1";
init="red1 setunitpos ""UP""; red1 doTarget blue1; red1 setCombatMode ""BLUE""";
};
};
};
class Item5
{
side="EAST";
class Vehicles
{
items=1;
class Item0
{
position[]={5390.396484,50.948715,4582.466797};
azimut=55.000000;
id=5;
side="EAST";
vehicle="OfficerE";
leader=1;
skill=0.600000;
text="of1";
init="of1 stop true; of1 setunitpos ""UP""; of1 setCombatMode ""BLUE""; of1 setBehaviour ""CARELESS""; removeAllWeapons of1";
};
};
};
};
class Vehicles
{
items=4;
class Item0
{
position[]={5383.827637,51.342400,4598.236816};
azimut=225.000000;
id=6;
side="EMPTY";
vehicle="FireLit";
leader=1;
skill=0.600000;
};
class Item1
{
position[]={5385.009766,51.158363,4590.707031};
azimut=180.000000;
special="FLY";
id=7;
side="EMPTY";
vehicle="UAZ";
leader=1;
skill=1.000000;
};
class Item2
{
position[]={5380.301270,51.180683,4590.757324};
azimut=180.000000;
special="FLY";
id=8;
side="EMPTY";
vehicle="UAZ";
leader=1;
skill=1.000000;
};
class Item3
{
position[]={5382.781738,50.961037,4581.491211};
azimut=90.000000;
special="FLY";
id=9;
side="EMPTY";
vehicle="BMP2";
leader=1;
skill=0.200000;
};
};
class Sensors
{
items=1;
class Item0
{
position[]={3847.563965,31.499332,2957.250977};
a=0.000000;
b=0.000000;
interruptable=1;
type="END1";
age="UNKNOWN";
expCond="endcut";
class Effects
{
};
};
};

[] exec ""testcam.sqs""";
};

and this is the camera operations, which works nice in intro preview in editor.

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

; point the camera at the player, and place it 2m to the players left,
; 10m to his front and 3m above the ground
_cam camsettarget blue1
_cam camsetrelpos [-2,10,3]
_cam camcommit 0


; fade in from black over 2 seconds
titlecut [" ","BLACK IN",2]

; wait for 2 seconds for the fade to complete
~2

; move the camera to 5m behind the player, 2m to his left and 0.5m above the ground
; do the move over 10 seconds, and then wait for 2 seconds
_cam camsetrelpos [0,-5,2]
_cam camcommit 4
@camcommitted _cam

~6

of1 action ["SALUTE", of1]

~2

red1 setCombatMode "GREEN"
red2 setCombatMode "GREEN"
red3 setCombatMode "GREEN"
red4 setCombatMode "GREEN"

~4

of1 setBehaviour "AWARE"

; move the camera to 5m behind the player, 2m to his left and 0.5m above the ground
; do the move over 10 seconds, and then wait for 2 seconds
_cam camsetrelpos [2,5,20]
_cam camcommit 10
@camcommitted _cam

~2

; fade out to black over 2 seconds
titlecut [" ","BLACK OUT",2]

; wait for 2 seconds for the fade to complete
~2


endcut = true


; exit the script
exit

One last thing :D at the end of that firing squad script i want it to end the mission with the ending number 2, so it shows the relevent debrief but i cant find the command.

Thanks  :)

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re: cam script and end scipt
« Reply #1 on: 31 Aug 2007, 00:54:25 »
1) u need 2 add a black in comand again... so itll black in back :D (like u do in da start of da cutscene...) :D

2) im afraid its not posible... ull have 2 put em dere manualy nd den do da cutscene.... either by makin em start in da pos, or u cud setpos em (check comand referance 4 setpos comand)

3) u just use triger w/ end#2 as effect :D

btw WELCOME 2 OFPEC M8

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline megz

  • Members
  • *
Re: cam script and end scipt
« Reply #2 on: 06 Sep 2007, 00:20:17 »
chrz for that m8, got it sorted now, check out the intro in other topic  ;)