i created this cog, where the actor punches
# Jedi Knight Cog Script
#
# cam
#
# Opening level cut scene
#
#
# This Cog is Not supported by LucasArts Entertainment Co
symbols
thing cam1
thing player local
thing Rollo local
template gunless=Rollo local
keyframe punch=kypnchl0.key local
int keynum local
message startup
message activated
end
# ========================================================================================
code
startup:
setmastercog(getSelfCog());
playsong(0,0,0);
player = GetLocalPlayerThing();
# jkBeginCutscene();
// switch the player for an Actor
SetActorFlags(player, 0xa00000);
StopThing(player);
Rollo = CreateThing(gunless, player);
StopThing(Rollo);
SetThingCurGeoMode(player, 0);
SetCameraFocus(0, cam1);
SetCurrentCamera(0);
sleep(10.0)
keynum=PlayKey(Rollo, punch, 1, 0x4);
sleep(20.0);
StopKey(Rollo, keynum, 0);
// DestroyThing(cam);
// unfreeze Kyle
ClearActorFlags(jkGetLocalPlayer(), 0xa00000);
jkEndLevel(1);
return;
activated:
jkEndLevel(1);
return;
# ........................................................................................
end
The actor does not punch, but instead i am just the player, and no camera view at all![http://forums.massassi.net/html/frown.gif [http://forums.massassi.net/html/frown.gif]](http://forums.massassi.net/html/frown.gif)
But when i delete the keyframe for punching and set no animation at all, i have this COG:
# Jedi Knight Cog Script
#
# cam
#
# Opening level cut scene
#
#
# This Cog is Not supported by LucasArts Entertainment Co
symbols
thing cam1
thing player local
thing Rollo local
template gunless=Rollo local
message startup
message activated
end
# ========================================================================================
code
startup:
setmastercog(getSelfCog());
playsong(0,0,0);
player = GetLocalPlayerThing();
# jkBeginCutscene();
// switch the player for an Actor
SetActorFlags(player, 0xa00000);
StopThing(player);
Rollo = CreateThing(gunless, player);
StopThing(Rollo);
SetThingCurGeoMode(player, 0);
SetCameraFocus(0, cam1);
SetCurrentCamera(0);
sleep(20.0);
// DestroyThing(cam);
// unfreeze Kyle
ClearActorFlags(jkGetLocalPlayer(), 0xa00000);
jkEndLevel(1);
return;
activated:
jkEndLevel(1);
return;
# ........................................................................................
end
And this one works. i can see through the camera a gunless actors, as i wanted to. Why doesn't my puch animation let my camera work?
Please help me understand playing keyanimations in the cutscenes![http://forums.massassi.net/html/frown.gif [http://forums.massassi.net/html/frown.gif]](http://forums.massassi.net/html/frown.gif)
------------------
# Jedi Knight Cog Script
#
# cam
#
# Opening level cut scene
#
#
# This Cog is Not supported by LucasArts Entertainment Co
symbols
thing cam1
thing player local
thing Rollo local
template gunless=Rollo local
keyframe punch=kypnchl0.key local
int keynum local
message startup
message activated
end
# ========================================================================================
code
startup:
setmastercog(getSelfCog());
playsong(0,0,0);
player = GetLocalPlayerThing();
# jkBeginCutscene();
// switch the player for an Actor
SetActorFlags(player, 0xa00000);
StopThing(player);
Rollo = CreateThing(gunless, player);
StopThing(Rollo);
SetThingCurGeoMode(player, 0);
SetCameraFocus(0, cam1);
SetCurrentCamera(0);
sleep(10.0)
keynum=PlayKey(Rollo, punch, 1, 0x4);
sleep(20.0);
StopKey(Rollo, keynum, 0);
// DestroyThing(cam);
// unfreeze Kyle
ClearActorFlags(jkGetLocalPlayer(), 0xa00000);
jkEndLevel(1);
return;
activated:
jkEndLevel(1);
return;
# ........................................................................................
end
The actor does not punch, but instead i am just the player, and no camera view at all
![http://forums.massassi.net/html/frown.gif [http://forums.massassi.net/html/frown.gif]](http://forums.massassi.net/html/frown.gif)
But when i delete the keyframe for punching and set no animation at all, i have this COG:
# Jedi Knight Cog Script
#
# cam
#
# Opening level cut scene
#
#
# This Cog is Not supported by LucasArts Entertainment Co
symbols
thing cam1
thing player local
thing Rollo local
template gunless=Rollo local
message startup
message activated
end
# ========================================================================================
code
startup:
setmastercog(getSelfCog());
playsong(0,0,0);
player = GetLocalPlayerThing();
# jkBeginCutscene();
// switch the player for an Actor
SetActorFlags(player, 0xa00000);
StopThing(player);
Rollo = CreateThing(gunless, player);
StopThing(Rollo);
SetThingCurGeoMode(player, 0);
SetCameraFocus(0, cam1);
SetCurrentCamera(0);
sleep(20.0);
// DestroyThing(cam);
// unfreeze Kyle
ClearActorFlags(jkGetLocalPlayer(), 0xa00000);
jkEndLevel(1);
return;
activated:
jkEndLevel(1);
return;
# ........................................................................................
end
And this one works. i can see through the camera a gunless actors, as i wanted to. Why doesn't my puch animation let my camera work?
Please help me understand playing keyanimations in the cutscenes
![http://forums.massassi.net/html/frown.gif [http://forums.massassi.net/html/frown.gif]](http://forums.massassi.net/html/frown.gif)
------------------