I have got 4 turrets in an opening cutscene, and I have assigned them to fire at each other. However, they end up firing at my player. Is there any way of hiding the player actor or something?
Also, the templates such as _explosion never show up in game, so all that happens when something is destroyed is the thing disappears. I'm sure I'm missing something . . .
BTW, the cog is below. :-)
symbols
message startup
thing cam
thing player local
thing corusca
thing gun1
thing gun2
thing fgun1
thing fgun2
flex speed=5.0
sound SoundToPlay=01shipflyby02.wav local
int status=0 local
int Player local
int check local
int Corusca local
int Gun1 local
int Gun2 local
int Fgun1 local
int Fgun2 local
template explodeTemplate=-1
sound wav0=expl_01.wav local
end
# ========================================================================================
code
startup:
jkBeginCutscene();
Player = GetLocalPlayerThing();
SetActorFlags(Player, 0xa00000);
StopThing(player);
Corusca = GetThing(corusca);
SetActorFlags(Corusca, 0xa00000);
StopThing(corusca);
Fgun1 = GetThing(fgun1);
SetActorFlags(Fgun1, 0xa00000);
StopThing(fgun1);
Fgun2 = GetThing(fgun2);
SetActorFlags(Fgun2, 0xa00000);
StopThing(fgun2);
SetCameraFocus(0, cam);
SetCurrentCamera(0);
Sleep(0.0);
AiSetFireTarget(fgun1, gun1);
AiSetFireTarget(fgun1, gun2);
AiSetFireTarget(gun1, corusca);
AiSetFireTarget(gun2, corusca);
Print("Sir, we are commencing boarding of the Manufacturing Facility.");
Print("We are coming under attack! Returning Fire!");
MoveToFrame(corusca, 1, speed);
MoveToFrame(corusca, 2, speed);
MoveToFrame(fgun1, 1, speed);
MoveToFrame(fgun1, 2, speed);
MoveToFrame(fgun2, 1, speed);
MoveToFrame(fgun2, 2, speed);
PlaySoundLocal(SoundToPlay, 1, 0, 132);
Sleep(8.0);
PlaySoundLocal(wav0, 1, 0, 66);
CreateThing(explodeTemplate, gun1);
PlaySoundLocal(wav0, 1, 0, 66);
CreateThing(explodeTemplate, gun2);
DestroyThing(gun1);
DestroyThing(gun2);
Sleep(5.0);
SetCameraFocus(0, jkGetLocalPlayer());
if (jkGetSaberCam() == 1)
CycleCamera();
DestroyThing(cam);
DestroyThing(fgun1);
DestroyThing(fgun2);
HealThing(player, 100);
ClearActorFlags(Player, 0xa00000);
ClearActorFlags(Corusca, 0xa00000);
SetGoalFlags(Player, 1, 2);
SetGoalFlags(Player, 2, 1);
jkEndCutscene();
status=1;
return;
# ........................................................................................
end
------------------
Major Lozza McG
Rebel Squadrons
www.rebelsquadrons.org
Also, the templates such as _explosion never show up in game, so all that happens when something is destroyed is the thing disappears. I'm sure I'm missing something . . .
BTW, the cog is below. :-)
symbols
message startup
thing cam
thing player local
thing corusca
thing gun1
thing gun2
thing fgun1
thing fgun2
flex speed=5.0
sound SoundToPlay=01shipflyby02.wav local
int status=0 local
int Player local
int check local
int Corusca local
int Gun1 local
int Gun2 local
int Fgun1 local
int Fgun2 local
template explodeTemplate=-1
sound wav0=expl_01.wav local
end
# ========================================================================================
code
startup:
jkBeginCutscene();
Player = GetLocalPlayerThing();
SetActorFlags(Player, 0xa00000);
StopThing(player);
Corusca = GetThing(corusca);
SetActorFlags(Corusca, 0xa00000);
StopThing(corusca);
Fgun1 = GetThing(fgun1);
SetActorFlags(Fgun1, 0xa00000);
StopThing(fgun1);
Fgun2 = GetThing(fgun2);
SetActorFlags(Fgun2, 0xa00000);
StopThing(fgun2);
SetCameraFocus(0, cam);
SetCurrentCamera(0);
Sleep(0.0);
AiSetFireTarget(fgun1, gun1);
AiSetFireTarget(fgun1, gun2);
AiSetFireTarget(gun1, corusca);
AiSetFireTarget(gun2, corusca);
Print("Sir, we are commencing boarding of the Manufacturing Facility.");
Print("We are coming under attack! Returning Fire!");
MoveToFrame(corusca, 1, speed);
MoveToFrame(corusca, 2, speed);
MoveToFrame(fgun1, 1, speed);
MoveToFrame(fgun1, 2, speed);
MoveToFrame(fgun2, 1, speed);
MoveToFrame(fgun2, 2, speed);
PlaySoundLocal(SoundToPlay, 1, 0, 132);
Sleep(8.0);
PlaySoundLocal(wav0, 1, 0, 66);
CreateThing(explodeTemplate, gun1);
PlaySoundLocal(wav0, 1, 0, 66);
CreateThing(explodeTemplate, gun2);
DestroyThing(gun1);
DestroyThing(gun2);
Sleep(5.0);
SetCameraFocus(0, jkGetLocalPlayer());
if (jkGetSaberCam() == 1)
CycleCamera();
DestroyThing(cam);
DestroyThing(fgun1);
DestroyThing(fgun2);
HealThing(player, 100);
ClearActorFlags(Player, 0xa00000);
ClearActorFlags(Corusca, 0xa00000);
SetGoalFlags(Player, 1, 2);
SetGoalFlags(Player, 2, 1);
jkEndCutscene();
status=1;
return;
# ........................................................................................
end
------------------
Major Lozza McG
Rebel Squadrons
www.rebelsquadrons.org
Major Lozza McG
Rebel Squadrons
www.rebelsquadrons.org
Rebel Squadrons
www.rebelsquadrons.org