Im making a function/action that when activated it plays a key and the camera roatates around you. I know it can be done for cutscenes, but how do i do it ingame?? Any ideas?
This is the static archive of the Massassi Forums. The forums are
closed indefinitely. Thanks for all the memories!
You can also download
Super Old Archived Message Boards
from when Massassi first started.
"View" counts are as of the day the forums were archived, and will no longer increase.
# Jedi Knight COG Script
#
# ghostCam.COG
#
# Created by Emon.
# Feel free to use this COG as long as credit is given in the readme file.
#
# This COG is not supported by LucasArts Entertainment Co.
flags=0x240
symbols
thing camera local
thing camera2 local
thing player local
template ghostTpl=ghost local
flex k local
message created
message pulse
message removed
end
# =============================================================================
code
created:
camera = getSenderRef();
player = getLocalPlayerThing();
setPulse(0.001);
k = 0.15;
return;
pulse:
setThingLook(camera, vectorSub(getThingPos(player), getThingPos(camera)));
if(vectorDist(getThingPos(player), getThingPos(camera)) < 0.4)
addThingVel(camera, vectorScale(getThingRVec(camera), 0.005));
else
{
if(k < 0.05)
setThingVel(camera, vectorScale(getThingRVec(camera), 0.05));
else
{
setThingVel(camera, vectorScale(getThingRVec(camera), k));
k = k - 0.001;
}
}
return;
removed:
setCameraFocus(1, player);
return;
endproj = fireProjectile(player, cameraProj, -1, -1, '0 0 0', '0 0 0', -1, 0x1, 0, 0);