x1_inc_cutscene
Library file for cutscene functions.Each function will be in a wrapper function that will check to see if the cutscene has been aborted yet or not.
There is an added variable called iShift. This can be ignored in all cases, except when the GetShift function is being called. It was added so that when a shift is done, you can insert stuff (the reason for the shift) into your script without the new stuff being shifted.
An example of this: You decide you need to add 20 seconds of material in the middle of your cutscene. You need to do this at the 1 minute mark, and you want to shift everything after that point by 20 secs. The new stuff you add there for that 20 secs will get shifted as well since you called the shift. But by adding FALSE at the end of the function call, it will ignore the shift amount.
Also, if anything after the shift is something that you don't want adjusted from the default, use this there as well.
The integer nCutscene is now passed in to all cutscene functions. This is so that if a player skips one cutscene and then very soon after enters another cutscene, we need to be able to check which cutscene a delayed function belongs to. If it is not the cutscene that the PC is currently in - the delayed actions that affect the PC should NOT take place.
NOTE: Builders should use the "Cut" functions, not the "Call" functions.
Functions
Name | Brief Description |
---|---|
CallActionCastFakeSpellAtLocation | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallActionCastFakeSpellAtObject | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallActionMoveToLocation | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallActionMoveToObject | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallActionStartConversation | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallApplyEffectAtLocation | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallApplyEffectToObject | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallApplyEffectToObject2 | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallBlackScreen | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallClearAllActions | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallCreateObject | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallDeath | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallDestroyObject | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallFadeFromBlack | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallFadeOutAndIn | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallFadeToBlack | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallJumpToLocation | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallJumpToObject | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallKnockdown | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallPlayAnimation | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallRemoveEffects | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallRestoreCameraFacing | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallRestoreLocation | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallSetCamera | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallSetCutsceneMode | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallSetFacingPoint | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallSetLocation | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallSetPlotFlag | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallSpeakString | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallStopFade | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CallStoreCameraFacing | Internal function. Used to implement the same function with the "Cut" prefix in place of the "Call" prefix. |
CutActionCastFakeSpellAtLocation | Used to cast a fake spell at a location. Example: CutActionCastFakeSpellAtLocation(23.0, oPC, SPELL_SUNBEAM, lLoc, PROJECTILE_PATH_TYPE_DEFAULT); would have the PC cast a sunbeam at lLoc, with a default projectile path. This would happen after a 23 second delay. |
CutActionCastFakeSpellAtObject | Used to cast a fake spell at an object. Example: CutActionCastFakeSpellAtObject(23.0, oPC, SPELL_SUNBEAM, oTarget, PROJECTILE_PATH_TYPE_DEFAULT); would have the PC cast a sunbeam at the oTarget, with a default projectile path. This would happen after a 23 second delay. |
CutActionMoveToLocation | Used to move the PC or NPC to a location. Example: CutActionMoveToLocation(2.0, oPC, lTable, FALSE); would have the PC walk to lTable after a 2 second delay. TRUE = run, FALSE = walk. |
CutActionMoveToObject | Used to move the PC or NPC to an object. Example: CutActionMoveToObject(2.0, oPC, oTable, TRUE); would have the PC run to oTable after a 2 second delay. TRUE = run, FALSE = walk. |
CutActionStartConversation | Used for a conversation file when you need to have an NPC speak via a conversation instead of bubble text. The fDelay is used when timing is important. Example: CutActionStartConversation(5.0, oNPC, oPC, "my_conv"); would start the conversation file "my_conv" of the NPC, after a 5 sec delay, and the conversation subject would be the PC. |
CutApplyEffectAtLocation | Used to apply a visual effect at a location. The PC is passed to determine if the cutscene has been aborted or not. Example: CutApplyEffectAtLocation(98.3, oPC, DURATION_TYPE_INSTANT, VXF_FNF_HOLY_STRIKE, lLoc, 0.0); would have a holy strike visual appear at lLoc after a 98.3 second delay. The duration is instant, lasting the default time. |
CutApplyEffectToObject | Used to apply a visual effect to an object. Example: CutApplyEffectToObject(98.3, oPC, DURATION_TYPE_TEMPORARY, VXF_DUR_PETRIFY, oPC, 4.0); would have a PETRIFY visual appear to the PC after a 98.3 second delay. The duration is temporary, lasting 4 seconds. |
CutApplyEffectToObject2 | For all other effects (NOT VISUAL EFFECTS). Used to apply a NON visual effect to an object. |
CutBlackScreen | Used to set the screen to black. This is very useful in covering up and cutscene jumps that happen in the same area as the play area. Example: CutBlackScreen(10.0, oPC); would set the screen to black at the 10.0 mark. |
CutClearAllActions | Used to clear the actions of the subject. Example: CutClearAllActions(3.2, GetObjectByTag("guard")); would clear the actions of "guard" after a 3.2 second delay. |
CutCreateObject | Used to delay object create. Pass the type, the sTemplate, the location, and the effect you wish to have appear when the object is created (0 for no effect). The PC is also passed to check cutscene abort. Example: CutCreateObject(2.3, oPC, OBJECT_TYPE_PLACEABLE, "resref", lLoc, VFX_FNF_HOLY_STRIKE); would create a placeable with the resref of "resref" at the location lLoc after 2.3 seconds, with the VFX_FNF_HOLY_STRIKE effect. |
CutDeath | Used to apply a death effect to an object. Example: CutDeath(98.3, oPC, TRUE); would have a death appear on the PC after a 98.3 second delay. The duration is always instant. TRUE is used if you want a spectacular death. Set FALSE otherwise. |
CutDestroyObject | Used to destroy objects. Make sure they are destroyable first with the CutSetPlotFlag function. Example: CutDestroyObject(10.0, oObject); would destroy the object after 10 seconds. |
CutFadeFromBlack | Used to fade in. Example: CallFadeFromBlack(35.0, oPC); would Fade the screen in on the PC, after a delay of 35 seconds. |
CutFadeToBlack | Used to fade out. Example: CallFadeToBlack(35.0, oPC); would Fade the screen out on the PC, after a delay of 35 seconds |
CutFadeOutAndIn | Used to fade out and back in, with a black screen section of 2 seconds in between. Example: CallFadeOutAndIn(35.0, oPC); would Fade the screen out and back in on the PC, after a delay of 35 seconds. |
CutJumpToLocation | Used to jump the PC or NPC to an object. Example: CutJumpToObject(20.0, oPC, GetObject(GetObjectByTag ("invis_object")); would jump the PC to the invis_object after a 20 second delay. |
CutJumpToObject | Used to jump the PC or NPC to an object. Example: CutJumpToObject(20.0, oPC, GetObject(GetObjectByTag "invis_object")); would jump the PC to the invis_object after a 20 second delay. |
CutKnockdown | Used to apply a knockdown effect to an object. Example: CutKnockdown(98.3, oPC, 4.0); would have a knockdown appear on the PC after a 98.3 second delay. The duration is always temporary, this one lasting 4 seconds. |
CutPlayAnimation | Used if you need a cutscene participant to do an animation. Example: CutPlayAnimation( |
CutRemoveEffects | Used to remove all effects from an object. Example: CutRemoveEffects(10.5, GetObjectByTag("guard1")); would remove all effects from guard1 after a 10.5 second delay. |
CutRestoreCameraFacing | Used to restore the camera position. Example: CutRestoreCameraFacing(10.0, oPC); would set the old camera settings back at the 10.0 mark. |
CutRestoreLocation | Used to recall the PC's location so they can be jumped back to their original location, stored by CutGetLocation. Example: CutRestoreLocation(23.0, oPC); would return the PC to their original spot. This would happen after a 23 second delay. |
CutSetCamera | Used to set the camera for cutscene dramatics. Example: To set a camera with the following settings on the PC, after a 30.0 second delay:     CAMERA_MODE_TOP_DOWN     Facing = 170.0     Zoom = 5.0     Pitch = 50.0     CAMERA_TRANSITION_TYPE_MEDIUM CutSetCamera(30.0, oPC, CAMERA_MODE_TOP_DOWN, 170.0, 5.0, 50.0, CAMERA_TRANSITION_TYPE_MEDIUM); |
CutSetCutsceneMode | Used to turn cutscene mode on or off. Example: CutSetCutsceneMode(10.0, oPC, TRUE); would turn cutscene mode on after 10 seconds for the PC. |
CutSetFacingPoint | Used to set the facing of a creature. Example: CutSetFacingPoint(22.5, oPC, "creature_tag"); would have the PC face "creature_tag" object after a 22.5 second delay. |
CutSetLocation | Used to set the PC's location so they can be jumped around as though they are the camera. Example: CutSetLocation(23.0, oPC); would set the location on the PC, as a variable, as a location to be returned to later. This would happen after a 23 second delay. |
CutSetPlotFlag | Used to turn plot flags on or off. Example: CutSetPlotFlag(10.0, oObject, 1); would turn plot flag to on after 10 seconds for the object. |
CutSpeakString | Used for bubble text type speaking. Example: CutSpeakString(0.0, GetObjectByTag("drow_priest"), "I like green eggs and ham."); would have the object drow_priest speak the line "I like green eggs and ham." after no delay. |
CutStopFade | Used to remove the screen to black. Example: CutStopFade(10.0, oPC); would set the screen back from black at the 10.0 mark. |
CutStoreCameraFacing | Used to store the camera position. Example: CutStoreCameraFacing(10.0, oPC); would set the current camera settings at the 10.0 mark. |
GetShift | Used to shift the entire cutscene a length of time. Used internally here, but very handy for cutscenes that are complete, but need to be changed after the fact. From the point it is called, it just shifts the cutscene accordingly. Can be used (and should be) for non-cutscene delays in a script (ie - commands that aren't here or regular DelayCommands in a script.) |
RemoveCommandable | Used to clear commandable state FALSE in the event there are too many. Used in this include only. |
See Also
categories: | Cut-Scene Functions |
includes: | x2_inc_cutscene |
tutorial: | Cut-scene Tutorials |
author: Mistress, contributor: Kookoo