Город Мастеров
IPB

Здравствуйте, гость ( Вход | Регистрация )

 Правила этого форума ПРАВИЛА РАЗДЕЛА
9 страниц V  < 1 2 3 > »   
Ответить в эту темуОткрыть новую тему
> ПОСТРОЕНИЕ СКРИПТОВЫХ СЦЕН, Основы написания Cutscene
Tarre Talliorne
сообщение May 13 2004, 15:12
Сообщение #6


Level 8
***

Класс: Псионик
Характер: Chaotic Good
Раса: Человек
NWN: Скриптинг [Sn]



Сам инклюд
Neverwinter Script Source
void GestaltDebugOutput(object oPC)
{
    // Get the current position of oPC's camera
    float fDirection = GetLocalFloat(oPC,"fCameraDirection");
    float fRange = GetLocalFloat(oPC,"fCameraRange");
    float fPitch = GetLocalFloat(oPC,"fCameraPitch");

    // Fire a message to say where the camera is
    AssignCommand(oPC,SpeakString(FloatToString(fDirection) + ", " + FloatToString(fRange) + ", " + FloatToString(fPitch)));
}



void GestaltStopCameraMoves(object oPC, int iParty = 0, int bAuto = TRUE, int iCamID = 0)
{
    object oParty;
    string sCam;
    int iCount;

    if (iParty == 1)      { oParty = GetFirstFactionMember(oPC); }
    else if (iParty == 2) { oParty = GetFirstPC(); }
    else                  { oParty = oPC; }

    while (GetIsObjectValid(oParty))
        {
        if (bAuto)
            { iCamID = GetLocalInt(oParty,"iCamCount"); }

        iCount = iCamID;

        while (iCount > 0)
            {
            // Find the camera movement
            sCam = "iCamStop" + IntToString(iCount);
            SetLocalInt(oParty,sCam,1);
            iCount--;

            // Uncomment the line below to get a message in the game confirming each id which is cancelled
            // AssignCommand(oParty,SpeakString("Camera movement id " + IntToString(iCount) + "has been stopped"));
            }

        if (iParty == 1)                       { oParty = GetNextFactionMember(oParty,TRUE); }
        else if (iParty == 2)                  { oParty = GetNextPC(); }
        else                                   { return; }
        }
}



vector GetVectorAB(object oA, object oB)
{
    vector vA = GetPosition(oA);
    vector vB = GetPosition(oB);
    vector vDelta = (vA - vB);
    return vDelta;
}



float GetHorizontalDistanceBetween(object oA, object oB)
{
    vector vHorizontal = GetVectorAB(oA,oB);
    float fDistance = sqrt(pow(vHorizontal.x,2.0) + pow(vHorizontal.y,2.0));
    return fDistance;
}



float GestaltGetDirection(object oTarget, object oPC)
{
    vector vdTarget = GetVectorAB(oTarget,oPC);
    float fDirection = VectorToAngle(vdTarget);
    return fDirection;
}



void GestaltCameraPoint(float fDirection, float fRange, float fPitch, float fdDirection, float fdRange, float fdPitch, float fd2Direction, float fd2Range, float fd2Pitch, float fCount, object oPC, int iCamID, int iFace = 0)
{
    // Check whether this camera movement has been stopped
    string sCam = "iCamStop" + IntToString(iCamID);
    if (GetLocalInt(oPC,sCam) == 1)
        { return; }

    // Work out where to point the camera
    fDirection = fDirection + ((fd2Direction * pow(fCount,2.0)) / 2) + (fdDirection * fCount);
    fRange = fRange + ((fd2Range * pow(fCount,2.0)) / 2) + (fdRange * fCount);
    fPitch = fPitch + ((fd2Pitch * pow(fCount,2.0)) / 2) + (fdPitch * fCount);

    // Reset fDirectionNew if it's gone past 0 or 360 degrees
    while (fDirection < 0.0)    { fDirection = (fDirection + 360.0); }
    while (fDirection > 360.0)  { fDirection = (fDirection - 360.0); }

    // Set the camera and/or player facing, according to iFace
    if (iFace < 2)        { AssignCommand(oPC,SetCameraFacing(fDirection,fRange,fPitch)); }
    if (iFace > 0)        { AssignCommand(oPC,SetFacing(fDirection)); }

    // Store the current position of the camera
    SetLocalFloat(oPC,"fCameraDirection",fDirection);
    SetLocalFloat(oPC,"fCameraRange",fRange);
    SetLocalFloat(oPC,"fCameraPitch",fPitch);
}



void GestaltFaceTarget(object oTarget, float fRange, float fPitch, object oPC, int iFace, int iParty = 0, int iCamID = 0)
{
    // Check whether this camera movement has been stopped
    string sCam = "iCamStop" + IntToString(iCamID);
    if (iCamID > 0 && GetLocalInt(oPC,sCam) == 1)
        { return; }

    float fDirection;
    object oParty;

    if (iParty == 1)      { oParty = GetFirstFactionMember(oPC); }
    else if (iParty == 2) { oParty = GetFirstPC(); }
    else                  { oParty = oPC; }

    while (GetIsObjectValid(oParty))
        {
        fDirection = GestaltGetDirection(oTarget,oParty);

        if (iFace < 2)        { AssignCommand(oParty,SetCameraFacing(fDirection,fRange,fPitch)); }
        if (iFace > 0)        { AssignCommand(oParty,SetFacing(fDirection)); }

        if (iParty == 1)                       { oParty = GetNextFactionMember(oParty,TRUE); }
        else if (iParty == 2)                  { oParty = GetNextPC(); }
        else                                   { return; }
        }
}



float GestaltGetPanRate(float fDirection, float fDirection2, float fTicks, int iClockwise)
{
    // Calculates how far the camera needs to move each to tick to go from fDirection to fDirection2
    // in fTicks steps, correcting as necessary to account for clockwise or anti-clockwise movement

    float fdDirection;

    if (iClockwise == 0)
        {
        if (fDirection > fDirection2)               { fdDirection = ((fDirection2 + 360.0 - fDirection) / fTicks); }
        else                                        { fdDirection = ((fDirection2 - fDirection) / fTicks); }
        }

    if (iClockwise == 1)
        {
        if (fDirection2 > fDirection)               { fdDirection = ((fDirection2 - fDirection - 360.0) / fTicks); }
        else                                        { fdDirection = ((fDirection2 - fDirection) / fTicks); }
        }

    if (iClockwise == 2)
        {
        float fCheck = fDirection2 - fDirection;
        if (fCheck > 180.0)                         { fdDirection = ((fDirection2 - fDirection - 360.0) / fTicks); }
        else if (fCheck < -180.0)                   { fdDirection = ((fDirection2 + 360.0 - fDirection) / fTicks); }
        else                                        { fdDirection = ((fDirection2 - fDirection) / fTicks); }
        }

    return fdDirection;
}



void GestaltCameraMove(float fDelay, float fDirection, float fRange, float fPitch, float fDirection2, float fRange2, float fPitch2, float fTime, float fFrameRate, object oPC, int iClockwise = 0, int iFace = 0, int iParty = 0)
{
    // Get timing information
    float fTicks = (fTime * fFrameRate);
    float fdTime = (fTime / fTicks);
    float fStart = fDelay;
    float fCount;

    float fdDirection = GestaltGetPanRate(fDirection,fDirection2,fTicks,iClockwise);
    float fdRange = ((fRange2 - fRange) / fTicks);
    float fdPitch = ((fPitch2 - fPitch) / fTicks);

    int iCamID;
    object oParty;

    if (iParty == 1)      { oParty = GetFirstFactionMember(oPC); }
    else if (iParty == 2) { oParty = GetFirstPC(); }
    else                  { oParty = oPC; }

    while (GetIsObjectValid(oParty))
        {
        // Set the camera to top down mode
        SetCameraMode(oParty,CAMERA_MODE_TOP_DOWN);

        // Give the camera movement a unique id code so that it can be stopped
        iCamID = GetLocalInt(oParty,"iCamCount") + 1;
        SetLocalInt(oParty,"iCamCount",iCamID);

        // reset variables
        fCount = 0.0;
        fDelay = fStart;

        // Uncomment the line below to get a message in the game telling you the id of this camera movement
        // AssignCommand(oParty,SpeakString("Camera id - " + IntToString(iCamID)));

        // After delay, stop any older camera movements and start this one
        DelayCommand(fStart,GestaltStopCameraMoves(oParty,0,FALSE,iCamID - 1));

        while (fCount <= fTicks)
            {
            DelayCommand(fDelay,GestaltCameraPoint(fDirection,fRange,fPitch,fdDirection,fdRange,fdPitch,0.0,0.0,0.0,fCount,oParty,iCamID,iFace));
            fCount = (fCount + 1.0);
            fDelay = fStart + (fCount * fdTime);
            }

        if (iParty == 1)                       { oParty = GetNextFactionMember(oParty,TRUE); }
        else if (iParty == 2)                  { oParty = GetNextPC(); }
        else                                   { return; }
        }
}



void GestaltCameraSmoothStart(float fdDirection1, float fdRange1, float fdPitch1, float fdDirection2, float fdRange2, float fdPitch2, float fTime, float fFrameRate, object oParty, object oSync, int iCamID)
{
    // Get starting position for camera
    float fDirection = GetLocalFloat(oSync,"fCameraDirection");
    float fRange = GetLocalFloat(oSync,"fCameraRange");
    float fPitch = GetLocalFloat(oSync,"fCameraPitch");

    // Get timing information
    float fTicks = (fTime * fFrameRate);
    float fdTime = (fTime / fTicks);
    float fDelay = 0.0;
    float fCount = 0.0;

    // Get camera speed and acceleration
    float fdDirection = fdDirection1 / fFrameRate;
    float fdRange = fdRange1 / fFrameRate;
    float fdPitch = fdPitch1 / fFrameRate;

    float fd2Direction = (fdDirection2 - fdDirection1) / ((fTicks - 1) * fFrameRate);
    float fd2Range = (fdRange2 - fdRange1) / ((fTicks - 1) * fFrameRate);
    float fd2Pitch = (fdPitch2 - fdPitch1) / ((fTicks - 1) * fFrameRate);

    // Start camera movement
    while (fCount < fTicks)
        {
        DelayCommand(fDelay,GestaltCameraPoint(fDirection,fRange,fPitch,fdDirection,fdRange,fdPitch,fd2Direction,fd2Range,fd2Pitch,fCount,oParty,iCamID));
        fCount = (fCount + 1.0);
        fDelay = (fCount * fdTime);
        }

    // Uncomment the line below to display the starting position of the camera movement
    // GestaltDebugOutput(oSync);

    // Uncomment the line below to display the finishing position of the camera movement
    // DelayCommand(fDelay,GestaltDebugOutput(oSync));
}



void GestaltCameraSmooth(float fDelay, float fdDirection1, float fdRange1, float fdPitch1, float fdDirection2, float fdRange2, float fdPitch2, float fTime, float fFrameRate, object oPC, int iParty = 0, int iSync = 1)
{
    object oParty;
    object oSync;
    int iCamID;

    if (iParty == 1)      { oParty = GetFirstFactionMember(oPC); }
    else if (iParty == 2) { oParty = GetFirstPC(); }
    else                  { oParty = oPC; }

    while (GetIsObjectValid(oParty))
        {
        // Work out whose camera position to use as the starting position
        if (iSync == 1)   { oSync = oPC; }
        else              { oSync = oParty; }

        // Set the camera to top down mode
        SetCameraMode(oParty,CAMERA_MODE_TOP_DOWN);

        // Give the camera movement a unique id code so that it can be stopped
        iCamID = GetLocalInt(oParty,"iCamCount") + 1;
        SetLocalInt(oParty,"iCamCount",iCamID);

        // Uncomment the line below to get a message in the game telling you the id of this camera movement
        // AssignCommand(oParty,SpeakString("Camera id - " + IntToString(iCamID)));

        // After delay, stop any older camera movements and start this one
        DelayCommand(fDelay,GestaltStopCameraMoves(oParty,0,FALSE,iCamID - 1));
        DelayCommand(fDelay,GestaltCameraSmoothStart(fdDirection1,fdRange1,fdPitch1,fdDirection2,fdRange2,fdPitch2,fTime,fFrameRate,oParty,oSync,iCamID));

        if (iParty == 1)                       { oParty = GetNextFactionMember(oParty,TRUE); }
        else if (iParty == 2)                  { oParty = GetNextPC(); }
        else                                   { return; }
        }
}



void GestaltCameraFace(float fDelay, object oStart, float fRange, float fPitch, object oEnd, float fRange2, float fPitch2, float fTime, float fFrameRate, object oPC, int iClockwise = 0, int iFace = 0, int iParty = 0)
{
    // Get timing information
    float fCount = 0.0;
    float fStart = fDelay;
    float fTicks = (fTime * fFrameRate);
    float fdTime = (fTime / fTicks);

    float fDirection;
    float fDirection2;

    float fdDirection;
    float fdRange = ((fRange2 - fRange) / fTicks);
    float fdPitch = ((fPitch2 - fPitch) / fTicks);

    object oParty;
    int iCamID;

    // Get first player
    if (iParty == 1)      { oParty = GetFirstFactionMember(oPC); }
    else if (iParty == 2) { oParty = GetFirstPC(); }
    else                  { oParty = oPC; }

    while (GetIsObjectValid(oParty))
        {
        // Set the camera to top down mode
        SetCameraMode(oParty,CAMERA_MODE_TOP_DOWN);

        // Give the camera movement a unique id code so that it can be stopped
        iCamID = GetLocalInt(oParty,"iCamCount") + 1;
        SetLocalInt(oParty,"iCamCount",iCamID);

        // reset variables
        fCount = 0.0;
        fDelay = fStart;

        // Work out rotation rate for this player
        fDirection = GestaltGetDirection(oStart,oParty);
        fDirection2 = GestaltGetDirection(oEnd,oParty);
        fdDirection = GestaltGetPanRate(fDirection,fDirection2,fTicks,iClockwise);

        // After delay, stop any older camera movements and start this one
        DelayCommand(fStart,GestaltStopCameraMoves(oParty,0,FALSE,iCamID - 1));

        while (fCount <= fTicks)
            {
            DelayCommand(fDelay,GestaltCameraPoint(fDirection,fRange,fPitch,fdDirection,fdRange,fdPitch,0.0,0.0,0.0,fCount,oParty,iCamID,iFace));
            fCount = (fCount + 1.0);
            fDelay = fStart + (fCount * fdTime);
            }

        if (iParty == 1)                       { oParty = GetNextFactionMember(oParty,TRUE); }
        else if (iParty == 2)                  { oParty = GetNextPC(); }
        else                                   { return; }
        }
}



void GestaltCameraTrack(float fDelay, object oTrack, float fRange, float fPitch, float fRange2, float fPitch2, float fTime, float fFrameRate, object oPC, int iFace = 0, int iParty = 0)
{
    // Get timing information
    float fCount;
    float fStart = fDelay;
    float fTicks = (fTime * fFrameRate);
    float fdTime = (fTime / fTicks);

    float fSRange = fRange;
    float fSPitch = fPitch;

    float fdRange = ((fRange2 - fRange) / fTicks);
    float fdPitch = ((fPitch2 - fPitch) / fTicks);

    object oParty;
    int iCamID;

    if (iParty == 1)      { oParty = GetFirstFactionMember(oPC); }
    else if (iParty == 2) { oParty = GetFirstPC(); }
    else                  { oParty = oPC; }

    while (GetIsObjectValid(oParty))
        {
        // Set the camera to top down mode
        SetCameraMode(oParty,CAMERA_MODE_TOP_DOWN);

        // Give the camera movement a unique id code so that it can be stopped
        iCamID = GetLocalInt(oParty,"iCamCount") + 1;
        SetLocalInt(oParty,"iCamCount",iCamID);

        // reset variables
        fCount = 0.0;
        fDelay = fStart;
        fRange = fSRange;
        fPitch = fSPitch;

        // After delay, stop any older camera movements and start this one
        DelayCommand(fStart,GestaltStopCameraMoves(oParty,0,FALSE,iCamID - 1));

        while (fCount <= fTicks)
            {
            DelayCommand(fDelay,GestaltFaceTarget(oTrack,fRange,fPitch,oParty,iFace,0,iCamID));
            fPitch = (fPitch + fdPitch);
            fRange = (fRange + fdRange);
            fCount = (fCount + 1.0);
            fDelay = fStart + (fCount * fdTime);
            }

        if (iParty == 1)                       { oParty = GetNextFactionMember(oParty,TRUE); }
        else if (iParty == 2)                  { oParty = GetNextPC(); }
        else                                   { return; }
        }
}



void GestaltFixedCamera(object oPC, float fFrameRate = 50.0)
{
    // Thanks to Tenchi Masaki for the idea for this function
    string sCamera = GetLocalString(oPC,"sGestaltFixedCamera");    // Gets the camera position to use
    if (sCamera == "STOP")                                          // Camera tracking is turned off, stop script and don't recheck
        { return; }
    if (sCamera == "")                                              // Camera tracking is inactive, stop script but recheck in a second
        {
        DelayCommand(1.0,GestaltFixedCamera(oPC,fFrameRate));
        return;
        }

    float fHeight = GetLocalFloat(oPC,"fGestaltFixedCamera");       // Gets the camera height to use
    if (fHeight == 0.0)         { fHeight = 10.0; }                 // Defaults camera height to 10.0 if none has been set yet

    object oCamera = GetObjectByTag(sCamera);
    float fDelay = 1.0 / fFrameRate;
    float fRange = GetHorizontalDistanceBetween(oPC,oCamera);

    float fAngle = GestaltGetDirection(oPC,oCamera);                // Works out angle between camera and player
    float fPitch = atan(fRange/fHeight);                            // Works out vertical tilt
    float fDistance = sqrt(pow(fHeight,2.0) + pow(fRange,2.0));    // Works out camera distance from player
    if (fDistance > 30.0)       { fDistance = 30.0; }               // Sets distance to 30.0 if player is too far away
    if (fDistance < 5.0)        { fDistance = 5.0; }                // Sets distance to 5.0 if player is too close

    AssignCommand(oPC,SetCameraFacing(fAngle,fDistance,fPitch));
    DelayCommand(fDelay,GestaltFixedCamera(oPC,fFrameRate));
}[/CODE]

и прототипы к функциям

[CODE]// Stops all camera movements immediately
    // oPC              the player whose camera movements you want to stop
    // iParty           sets whether to stop the camera of only oPC (0), all the players in oPC's party (1) or all the players on the server (2)
// DO NOT CHANGE THE FOLLOWING SETTINGS!
    // bAuto            sets whether the function should stop all camera movement (TRUE) or only ones with an id lower than iCamID (FALSE)
    // iCamID           the ID of the last camera move you want to stop (this is only needed if bAuto is set to FALSE)
void GestaltStopCameraMoves(object oPC, int iParty = 0, int bAuto = TRUE, int iCamID = 0);

// Gets the vector linking object A to object B
vector GetVectorAB(object oA, object oB);

// Finds the horizontal distance between two objects, ignoring any vertical component
float GetHorizontalDistanceBetween(object oA, object oB);

// Finds the compass direction from the PC to a target object
float GestaltGetDirection(object oTarget, object oPC);

// Turns a character and/or their camera to face the specified target object
    // oTarget          the object to face
    // fRange           the distance between the player and the camera
    // fPitch           the vertical tilt of the camera
                        // NOTE that fRange and/or fPitch can be set to -1.0 to keep the camera's range and/or pitch unchanged
    // oPC              the character you want to move
                        // NOTE that this can be an NPC, as long as iFace == 2
    // iFace            sets whether the camera (0), the character (2) or both (1) turn to face the specified direction
                        // NOTE that fRange and fPitch won't do anything if iFace == 2, as only the character is being moved
    // iParty           sets whether to move the camera of only oPC (0), all the players in oPC's party (1) or all the players on the server (2)
    // iCamID           the ID of the camera movement - DO NOT CHANGE THIS!
void GestaltFaceTarget(object oTarget, float fRange, float fPitch, object oPC, int iFace, int iParty = 0, int iCamID = 0);

// Moves the camera smoothly from one position to another over the specified time
    // STARTING TIME -
        // fDelay           how many seconds to wait before starting the movement
    // STARTING CONDITIONS -
        // fDirection       initial direction (0.0 = due east)
        // fRange           initial distance between player and camera
        // fPitch           initial pitch (vertical tilt)
    // FINAL CONDITIONS -
        // fDirection2      finishing direction
        // fRange2          finishing distance
        // fPitch2          finishing tilt
    // TIME SETTINGS -
        // fTime            number of seconds it takes camera to complete movement
        // fFrameRate       number of movements per second (governs how smooth the motion is)
    // MISC SETTINGS -
        // oPC              the PC you want to apply the camera movement to
        // iClockwise       set to 1 if you want the camera to rotate clockwise, 0 for anti-clockwise, or 2 for auto-select
        // iFace            sets whether the camera (0), the character (2) or both (1) turn to face the specified direction
        // iParty           sets whether to move the camera of only oPC (0), all the players in oPC's party (1) or all the players on the server (2)
void GestaltCameraMove(float fDelay, float fDirection, float fRange, float fPitch, float fDirection2, float fRange2, float fPitch2, float fTime, float fFrameRate, object oPC, int iClockwise = 0, int iFace = 0, int iParty = 0);

// Produces smooth transitions between different camera movements by setting initial and final speeds
// The function then interpolates between the two so that the movement rate changes smoothly over the
//  duration of the movement.
    // STARTING TIME -
        // fDelay           how many seconds to wait before starting the movement
    // MOVEMENT RATES AT START OF MOTION -
        // fdDirection1    how fast the camera's compass direction should change by in degrees per second
                            // positive numbers produce an anti-clockwise movement, negative anti-clockwise
        // fdRange1         how fast the camera's range should change in meters per second
                            // positive numbers move the camera away from the player, negative towards them
        // fdPitch1         how fast the camera's pitch should change in degrees per second
                            // positive numbers tilt the camera down towards the ground, negative up towards vertical
    // MOVEMENT RATES AT END OF MOTION -
        // fdDirection2    how fast the camera's compass direction should change by in degrees per second
                            // positive numbers produce an anti-clockwise movement, negative anti-clockwise
        // fdRange2         how fast the camera's range should change in meters per second
                            // positive numbers move the camera away from the player, negative towards them
        // fdPitch2         how fast the camera's pitch should change in degrees per second
                            // positive numbers tilt the camera down towards the ground, negative up towards vertical
    // TIME SETTINGS -
        // fTime            number of seconds it should take the camera to complete movement
        // fFrameRate       number of movements per second (governs how smooth the motion is)
    // MISC SETTINGS -
        // oPC              the player whose camera you want to move
        // iParty           sets whether to move the camera of only oPC (0), all the players in oPC's party (1) or all the players on the server (2)
        // iSync            sets whether to use separate camera starting positions for every player (0) or sync them all to oPC's camera position (1)
void GestaltCameraSmooth(float fDelay, float fdDirection1, float fdRange1, float fdPitch1, float fdDirection2, float fdRange2, float fdPitch2, float fTime, float fFrameRate, object oPC, int iParty = 0, int iSync = 1);

// Turns the camera and/or player between two objects
// NOTE that this will only work properly if the player and target objects are stationary while the function is active
    // STARTING TIME -
        // fDelay           how many seconds to wait before starting the movement
    // STARTING CONDITIONS -
        // oStart           object to face at start of movement
        // fRange           initial distance between player and camera
        // fPitch           initial pitch (vertical tilt)
    // FINAL CONDITIONS -
        // oEnd             object to finish movement facing
        // fRange2          finishing distance
        // fPitch2          finishing tilt
    // TIME SETTINGS -
        // fTime            number of seconds it takes camera to complete movement
        // fFrameRate       number of movements per second (governs how smooth the motion is)
    // MISC SETTINGS -
        // oPC              the player whose camera you want to move
        // iClockwise       set to 1 if you want the camera to rotate clockwise, 0 for anti-clockwise, or 2 for auto-select
        // iFace            controls whether the camera (0), the character (2) or both (1) turn
        // iParty           sets whether to move the camera of only oPC (0), all the players in oPC's party (1) or all the players on the server (2)
void GestaltCameraFace(float fDelay, object oStart, float fRange, float fPitch, object oEnd, float fRange2, float fPitch2, float fTime, float fFrameRate, object oPC, int iClockwise = 0, int iFace = 0, int iParty = 0);

// Tracks a moving object, turning the player's camera so that it always faces towards it
    // STARTING TIME -
        // fDelay           how many seconds to wait before starting the movement
    // TARGET -
        // oTrack           object to track the movement of
    // STARTING CONDITIONS -
        // fRange           initial distance between player and camera
        // fPitch           initial pitch (vertical tilt)
    // FINAL CONDITIONS -
        // fRange2          finishing distance
        // fPitch2          finishing tilt
    // TIME SETTINGS -
        // fTime            how long the camera will track the object for
        // fFrameRate       number of movements per second (governs how smooth the motion is)
    // MISC SETTINGS -
        // oPC              the PC you want to apply the camera movement to
        // iFace            controls whether the camera (0), the character (2) or both (1) turn
        // iParty           sets whether to move the camera of only oPC (0), all the players in oPC's party (1) or all the players on the server (2)
void GestaltCameraTrack(float fDelay, object oTrack, float fRange, float fPitch, float fRange2, float fPitch2, float fTime, float fFrameRate, object oPC, int iFace = 0, int iParty = 0);

// Gives the illusion of the camera being fixed in one place and rotating to face the player as they move
    // oPC              the PC you want to apply the camera movement to
    // fFrameRate       number of movements per second (governs how smooth the motion is)
//
// To setup a fixed camera position, place a waypoint with a unique tag in your area
    // Set the camera's tag as a LocalString "sGestaltFixedCamera" on the PC to let them know to use that camera
    // Set a LocalFloat "fGestaltFixedCamera" on the PC to set the camera's vertical position
    // Set "sGestaltFixedCamera" to "" to pause the tracking, or to "STOP" to end the tracking
void GestaltFixedCamera(object oPC, float fFrameRate = 50.0);


Если надо, могу выложить более подробное объяснение. Но, думаю, и так все ясно.
ЗЫ: зацените GestaltCameraMove() - шедевр (IMG:style_emoticons/kolobok_light/biggrin.gif)
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
2GoDoom
сообщение May 13 2004, 16:40
Сообщение #7


Level 11
***

Класс: Обыватель
Характер: True Neutral
Раса: Человек
NWN: Маппинг



Большое спасибо! (IMG:style_emoticons/kolobok_light/smile.gif)
Теперь не прийдется качать Лексикон (IMG:style_emoticons/kolobok_light/wink3.gif)
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
DBColl
сообщение May 13 2004, 21:38
Сообщение #8


4-х Кубовый
Иконки Групп

Класс: Некромант
Характер: Lawful Evil
Раса: Человек
NWN: Скриптинг [Sn]
Проклятие Левора



Хех, Гештальт Камера - старинный инклюд времен первого НВН. Не расчитан на Катсцены. Можете его адаптировать под них, но... имхо не имеет смысла. Я с него соскочил с появлением СоУ, где можно было сценки делать. Хех. (IMG:style_emoticons/kolobok_light/smile.gif) Я думал будет более интересное что-то... (IMG:style_emoticons/kolobok_light/sad.gif)
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
Tarre Talliorne
сообщение May 15 2004, 17:26
Сообщение #9


Level 8
***

Класс: Псионик
Характер: Chaotic Good
Раса: Человек
NWN: Скриптинг [Sn]



Ну почему же не рассчитан... очень даж рассчитан. Лично МНЕ намного удобней юзать эту инлюду, чем стандартные функции. Кстати с помощью этой вещи можно реализовать фиксированную камеру(в принипе так тож можно, но нечто похожее я видел только при плавании камеры в ареи КАРТА ВАСТА Проклятия).
Цитата
Я думал будет более интересное что-то

Извините если что не так (IMG:style_emoticons/kolobok_light/smile.gif) )
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
DBColl
сообщение May 16 2004, 02:30
Сообщение #10


4-х Кубовый
Иконки Групп

Класс: Некромант
Характер: Lawful Evil
Раса: Человек
NWN: Скриптинг [Sn]
Проклятие Левора



Да нет, Тарре, не обижайся! (IMG:style_emoticons/kolobok_light/good.gif) Извини меня, если че не так (IMG:style_emoticons/kolobok_light/wink3.gif) .

Фиксированая камера, это не что иное, как удаление с экрана героя. (IMG:style_emoticons/kolobok_light/wink3.gif) Джамп в невидимом состоянии...
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
Tarre Talliorne
сообщение May 16 2004, 19:14
Сообщение #11


Level 8
***

Класс: Псионик
Характер: Chaotic Good
Раса: Человек
NWN: Скриптинг [Sn]



Про фикс: я не совсем то имел ввиду.Про катсцен_инвизибл я и так знаю. Я иел ввиду, что можно релизовать такую полезнейшую вещь, как неуправляемая героем камера, причем все это не в режиме катсцены.
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
Аваддон
сообщение Jun 23 2004, 22:04
Сообщение #12


Level 10
***

Класс: Воин
Характер: Lawful Neutral
Раса: Человек
NWN: Скриптинг [PW]



Вопрос назрел к Айвану.
Что то у меня неполучается чтобы при нападении камера к монстру развернулась.
Код

object oEnemy = GetLastAttacker();
float fEnemy=GetFacing(oEnemy);
AssignCommand(oPC, SetCameraFacing(fEnemy, 5.0, 45.0, CAMERA_TRANSITION_TYPE_MEDIUM));
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
Aiwan
сообщение Jun 23 2004, 23:47
Сообщение #13


Миловидный Бегрюссунг
Иконки Групп

Класс: Воин
Характер: Chaotic Good
Раса: Человек
NWN: Модмейкер
Проклятие Левора
Порядок Времени



Ну ты даешь! (IMG:style_emoticons/kolobok_light/shok.gif) У РС куча забот а ты его еще камерой мутузишь! (IMG:style_emoticons/kolobok_light/lol.gif)

Код

vector vD = GetPosition(oEnemy) - GetPosition(oPC);
float fEnemy = VectorToAngle(vD);
AssignCommand(oPC, SetCameraFacing(fEnemy, 5.0, 45.0, CAMERA_TRANSITION_TYPE_MEDIUM));

Не подумай что я такой умный (IMG:style_emoticons/kolobok_light/unsure.gif) это код ДБа. Просто я знаю где он и как работает (IMG:style_emoticons/kolobok_light/biggrin.gif)
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
DBColl
сообщение Jun 24 2004, 02:57
Сообщение #14


4-х Кубовый
Иконки Групп

Класс: Некромант
Характер: Lawful Evil
Раса: Человек
NWN: Скриптинг [Sn]
Проклятие Левора



Кстати спецы по векторам у нас Лекс и Баал. Так что разрулят, если возникнут вопросы (IMG:style_emoticons/kolobok_light/wink3.gif) .

LEX: не переводи на меня стрелки, ДБ. Я не шарю в векторах. Ты и Баал, вот, кто шарят.
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
Аваддон
сообщение Jul 9 2004, 00:07
Сообщение #15


Level 10
***

Класс: Воин
Характер: Lawful Neutral
Раса: Человек
NWN: Скриптинг [PW]



Интересный вопросик.
У нас есть один момент - заходишь в локацию. На игрока накладывается СетКутСценеМод=Трю,
потом эффект - КутСценИнвизибл. Тоесть как бы началась сценка и игрока не видно, видно только НеПиСей.
Так вот стоит нажать Esc как игрок появляется и появляется панель управления игрока(HUD).
И во время кутсцены игрок уже может ходить вокруг "отыгрывающих" НПС.
Пробовал наложить на него СетКоммандэйбл(Фолс, оПС). Но это ничего не поненяло - жм у Esc игрок появляется, только двигатся не может.
В чем дело не пойму.
З.Ы. У меня НВН в окне, может из за этого?!
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
DBColl
сообщение Jul 9 2004, 11:52
Сообщение #16


4-х Кубовый
Иконки Групп

Класс: Некромант
Характер: Lawful Evil
Раса: Человек
NWN: Скриптинг [Sn]
Проклятие Левора



Может и из-за этого... Но скорее всего это из-за известного бага - ставить на онЭнтр локации катсцену нельзя... (IMG:style_emoticons/kolobok_light/sad.gif) Возможны кучи багов. Лучше поставить триггер при входе в локу и на него вешать катсцену.
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
Tarre Talliorne
сообщение Jul 9 2004, 14:20
Сообщение #17


Level 8
***

Класс: Псионик
Характер: Chaotic Good
Раса: Человек
NWN: Скриптинг [Sn]



Нет. Ав, тебе надо было сначала у меня спросить. Просто я в своем моде для теста (вдруг с катсценой что не так) на он_катсцен_абортед поставил снятие всех эффектов + рестор положения камеры :-)
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
2GoDoom
сообщение Jul 12 2004, 14:15
Сообщение #18


Level 11
***

Класс: Обыватель
Характер: True Neutral
Раса: Человек
NWN: Маппинг



Подскажите что тут не правильно...

Neverwinter Script Source
void main()
{
object oPC = GetEnteringObject();
object oNPC1 = GetNearestObjectByTag("NPC_1", OBJECT_SELF);
object oNPC2 = GetNearestObjectByTag("NPC_2", OBJECT_SELF);
object oNPC3 = GetObjectByTag("NPC_3");
object oDoor = GetNearestObjectByTag("DOOR", OBJECT_SELF);
object oWP = GetObjectByTag("GO_AWAY"); //Стоит в комнате за дверью oDoor
effect eDis = EffectDisappear(0);

if(!GetIsPC(oPC))
  return;
{
  SetCutsceneMode(oPC); //Включается катсцена
  ActionDoCommand(SetCameraFacing(180.0, 15.0, 50.0, CAMERA_TRANSITION_TYPE_SLOW));
  ActionWait(1.0);
  ActionDoCommand(AssignCommand(oNPC1, SetFacing(270.0))); //НПС смотрит на юг (потмоу как там второй НПС)
ActionDoCommand(AssignCommand(oNPC1, SpeakString("Ты тупой казел!", TALKVOLUME_TALK)));
  ActionDoCommand(AssignCommand(oNPC2, SetFacing(90.0))); //Поворачивает голову на север - если она смотрит не на север, и отвечает...
  ActionDoCommand(AssignCommand(oNPC2, SpeakString("Завались, баран!", TALKVOLUME_TALK)));
  ActionDoCommand(AssignCommand(oNPC1, SpeakString("Ты нарвалсЯ, ублюдок!", TALKVOLUME_TALK))); //Здесь мне влом прикручивать YA было (IMG:style_emoticons/kolobok_light/smile.gif)
  ActionDoCommand(AssignCommand(oNPC1, ActionMoveToObject(oNPC2, TRUE, 1.0))); //Первый Непись подходит ко второму
  ActionDoCommand(AssignCommand(oNPC1, ActionAttack(oNPC2, TRUE))); //Атаковать второго НПС (не пашет)
  ActionWait(5.0); //Ждем покуда оин подерутся какое-то время
  ActionDoCommand(AssignCommand(oPC, SetFacingPoint(GetPosition(oDoor)))); //Поворачиваемся к двери, а далее совсем смешно...
  ActionDoCommand(AssignCommand(oDoor, ActionOpenDoor(OBJECT_SELF))); //Дверь открывается
  ActionDoCommand(AssignCommand(oNPC3, ActionMoveToObject(oNPC1, TRUE, 1.0))); //Непись не идет
  ActionDoCommand(AssignCommand(oDoor, ActionCloseDoor(OBJECT_SELF))); //Дверь закрывается
  ActionDoCommand(AssignCommand(oNPC3, PlayAnimation(ANIMATION_LOOPING_GET_MID, 1.0, 2.0))); //Анимация хз - проигрывается или нет
  ActionDoCommand(AssignCommand(oNPC3, ActionMoveToObject(oNPC2, TRUE, 1.0))); //Тоже что и выше (ну это типа в наручники заковывает
  ActionDoCommand(AssignCommand(oNPC3, PlayAnimation(ANIMATION_LOOPING_GET_MID, 1.0, 2.0)));
  ActionDoCommand(AssignCommand(oNPC1, ActionForceFollowObject(oNPC3, 0.0))); //Идут к Неписю, который остался стоять в предыдущей комнатке
  ActionDoCommand(AssignCommand(oNPC2, ActionForceFollowObject(oNPC3, 0.0)));
  ActionDoCommand(AssignCommand(oNPC3, ActionMoveToObject(oDoor, FALSE, 1.0)));
  ActionDoCommand(AssignCommand(oDoor, ActionOpenDoor(OBJECT_SELF)));
  ActionDoCommand(AssignCommand(oNPC3, ActionMoveToObject(oWP, FALSE, 0.0)));
  ActionWait(1.0);
  ActionDoCommand(DestroyObject(oNPC1, 0.0));
  ActionDoCommand(DestroyObject(oNPC2, 0.0));
  ActionDoCommand(DestroyObject(oNPC3, 0.0));
  ActionDoCommand(DestroyObject(OBJECT_SELF, 0.0)); //Кстати сам триггер тоже удаляется, где-то слышал что говорили - что их нельзя удалить и т.п.
  ActionDoCommand(SetCutsceneMode(oPC, FALSE));
}

}


Что самое обидное - они не подравшись, и кстати за ними не пришел мент из комнаты, начинают бежать к двери и пропадают не добежав. А дверь открылась. (IMG:style_emoticons/kolobok_light/smile.gif)
Подскажите плиз
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
DBColl
сообщение Jul 12 2004, 15:02
Сообщение #19


4-х Кубовый
Иконки Групп

Класс: Некромант
Характер: Lawful Evil
Раса: Человек
NWN: Скриптинг [Sn]
Проклятие Левора



А скрипт на чем стоит? Триггер? Лока? Еще что?..
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
2GoDoom
сообщение Jul 12 2004, 15:32
Сообщение #20


Level 11
***

Класс: Обыватель
Характер: True Neutral
Раса: Человек
NWN: Маппинг



Триггер OnEnter
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
DBColl
сообщение Jul 12 2004, 15:45
Сообщение #21


4-х Кубовый
Иконки Групп

Класс: Некромант
Характер: Lawful Evil
Раса: Человек
NWN: Скриптинг [Sn]
Проклятие Левора



2GoDoom
Катсцены пишутся по такой схеме:
Neverwinter Script Source
DelayCommand(x.x, AssignCommand(...))

Иначе ты будешь еще долго разбираться в стеке акций... И сбои никогда неисключены. А через DelayCommand все всегда получается и быстрее, и безошибочнее.
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
2GoDoom
сообщение Jul 12 2004, 16:14
Сообщение #22


Level 11
***

Класс: Обыватель
Характер: True Neutral
Раса: Человек
NWN: Маппинг



Окей, спасибо - буду пробовать
Добавлено в [mergetime]1089639537[/mergetime]
Еще большие глюки (IMG:style_emoticons/kolobok_light/sad.gif)
Правильно написано?:

Neverwinter Script Source
void main()
{
object oPC = GetEnteringObject();
object oNPC1 = GetNearestObjectByTag("NPC_1", OBJECT_SELF);
object oNPC2 = GetNearestObjectByTag("NPC_2", OBJECT_SELF);
object oNPC3 = GetObjectByTag("NPC_3");
object oDoor = GetNearestObjectByTag("DOOR", OBJECT_SELF);
object oWP = GetObjectByTag("GO_AWAY");
effect eDis = EffectDisappear(0);

if(!GetIsPC(oPC) || GetLocalInt(OBJECT_SELF, "TRIGGER") == 1)
  return;
{
  SetLocalInt(OBJECT_SELF, "TRIGGER", 1);
  SetCutsceneMode(oPC);
  ActionDoCommand(SetCameraFacing(180.0, 15.0, 50.0, CAMERA_TRANSITION_TYPE_SLOW));
  DelayCommand(1.0 ,AssignCommand(oNPC1, SetFacing(270.0)));
  DelayCommand(2.0 ,AssignCommand(oNPC1, SpeakString("?? ????? ?????!", TALKVOLUME_TALK)));
  DelayCommand(4.0 ,AssignCommand(oNPC2, SetFacing(90.0)));
  DelayCommand(4.5 ,AssignCommand(oNPC2, SpeakString("????????, ?????!", TALKVOLUME_TALK)));
  DelayCommand(5.0 ,AssignCommand(oNPC1, SpeakString("?? ????????, ???????!", TALKVOLUME_TALK)));
  DelayCommand(5.0 ,AssignCommand(oNPC1, ActionMoveToObject(oNPC2, TRUE, 1.0)));
  DelayCommand(5.5 ,AssignCommand(oNPC1, ActionAttack(oNPC2, FALSE)));
  DelayCommand(10.0 ,AssignCommand(oPC, SetFacingPoint(GetPosition(oDoor))));
  DelayCommand(10.5 ,AssignCommand(oDoor, ActionOpenDoor(OBJECT_SELF)));
  DelayCommand(11.5 ,AssignCommand(oDoor, ActionCloseDoor(OBJECT_SELF)));
  DelayCommand(11.0 ,AssignCommand(oNPC3, ActionMoveToObject(oNPC1, TRUE, 1.0)));
  DelayCommand(11.0 ,AssignCommand(oNPC3, PlayAnimation(ANIMATION_LOOPING_GET_MID, 1.0, 2.0)));
  DelayCommand(12.0 ,AssignCommand(oNPC3, ActionMoveToObject(oNPC2, TRUE, 1.0)));
  DelayCommand(12.0 ,AssignCommand(oNPC3, PlayAnimation(ANIMATION_LOOPING_GET_MID, 1.0, 2.0)));
  DelayCommand(12.5 ,AssignCommand(oNPC1, ActionForceFollowObject(oNPC3, 0.0)));
  DelayCommand(12.5 ,AssignCommand(oNPC2, ActionForceFollowObject(oNPC3, 0.0)));
  DelayCommand(13.0 ,AssignCommand(oNPC3, ActionMoveToObject(oDoor, FALSE, 1.0)));
  DelayCommand(14.0 ,AssignCommand(oDoor, ActionOpenDoor(OBJECT_SELF)));
  DelayCommand(14.5 ,AssignCommand(oNPC3, ActionMoveToObject(oWP, FALSE, 0.0)));
  DelayCommand(15.0 ,DestroyObject(oNPC1, 0.0));
  DelayCommand(15.0 ,DestroyObject(oNPC2, 0.0));
  DelayCommand(15.0 ,DestroyObject(oNPC3, 0.0));
  DelayCommand(15.0 ,DestroyObject(OBJECT_SELF, 0.0));
  DelayCommand(16.0 ,SetCutsceneMode(oPC, FALSE));
}
}

Добавлено в [mergetime]1089639872[/mergetime]
Еще что не понятно - камера то не крутится (IMG:style_emoticons/kolobok_light/sad.gif)
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
Tarre Talliorne
сообщение Jul 12 2004, 17:46
Сообщение #23


Level 8
***

Класс: Псионик
Характер: Chaotic Good
Раса: Человек
NWN: Скриптинг [Sn]



Код
ActionDoCommand(SetCameraFacing(180.0, 15.0, 50.0, CAMERA_TRANSITION_TYPE_SLOW));

Неверно. Верно так:
Код
AssignCommand(oPC, SetCameraFacing(180.0, 15.0, 50.0, CAMERA_TRANSITION_TYPE_SLOW));
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
DBColl
сообщение Jul 12 2004, 18:19
Сообщение #24


4-х Кубовый
Иконки Групп

Класс: Некромант
Характер: Lawful Evil
Раса: Человек
NWN: Скриптинг [Sn]
Проклятие Левора



Ну вроде как все правильно. А что глючит-то? Как?
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
2GoDoom
сообщение Jul 12 2004, 19:22
Сообщение #25


Level 11
***

Класс: Обыватель
Характер: True Neutral
Раса: Человек
NWN: Маппинг



ну вообщем так:
Я встаю на триггер, вклчюается катсцена:
Мужик перекрикиваются, очень резко поворачиваются друг на друга, затем один подбегает и стоит. Через пару секунд камера не трогается с места а мой персонаж очень резко поворачивается, затем открывается дверь, закрывается дверь, затем два дрочуна бегут к двери, из двери бежит охраник и пропадают недобегая никуда...

Вот так то (IMG:style_emoticons/kolobok_light/sad.gif)
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
Аваддон
сообщение Jul 13 2004, 01:53
Сообщение #26


Level 10
***

Класс: Воин
Характер: Lawful Neutral
Раса: Человек
NWN: Скриптинг [PW]



Как это пропадают? (IMG:style_emoticons/kolobok_light/shok.gif)
Neverwinter Script Source
DelayCommand(15.0 ,DestroyObject(oNPC1, 0.0));
  DelayCommand(15.0 ,DestroyObject(oNPC2, 0.0));
  DelayCommand(15.0 ,DestroyObject(oNPC3, 0.0));
  DelayCommand(15.0 ,DestroyObject(OBJECT_SELF, 0.0));

Значит время увелич раз они за 15 сек не добегают (IMG:style_emoticons/kolobok_light/biggrin.gif) (IMG:style_emoticons/kolobok_light/ph34r.gif)
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
DBColl
сообщение Jul 13 2004, 11:24
Сообщение #27


4-х Кубовый
Иконки Групп

Класс: Некромант
Характер: Lawful Evil
Раса: Человек
NWN: Скриптинг [Sn]
Проклятие Левора



Хех, если ты хошь, чтобы они друг друга атаковали, сменяй фракции каждому перед атакой друг друга. Сделай фракцию, нейтральную ко всем и враждебную к самой себе. (IMG:style_emoticons/kolobok_light/wink3.gif) Перед ActionAttack сделай ChangeFaction() (IMG:style_emoticons/kolobok_light/wink3.gif) .

А чтобы не пропадали раньше времени, действительно увеличь паузу до дестроя. И еще. Привыкни писать без "двойных" делэев...
Neverwinter Script Source
DelayCommand(15.0 ,DestroyObject(oNPC1, 0.0));

Нафига в Destroy ты указывал 0.0? Здесь оно только путает. Достаточно:
Neverwinter Script Source
DelayCommand(15.0 ,DestroyObject(oNPC1));
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
2GoDoom
сообщение Jul 13 2004, 11:43
Сообщение #28


Level 11
***

Класс: Обыватель
Характер: True Neutral
Раса: Человек
NWN: Маппинг



Окей... сча попробуем
Спасибо (IMG:style_emoticons/kolobok_light/smile.gif)
Добавлено в [mergetime]1089709917[/mergetime]
Атокавать и с другой фракцией не атакуют (IMG:style_emoticons/kolobok_light/sad.gif)
Добавлено в [mergetime]1089710092[/mergetime]
Одному поставил Hostile - начали драться... проблема в том что охраник стал подбегать и тоже бить хостайла (IMG:style_emoticons/kolobok_light/smile.gif) )
Добавлено в [mergetime]1089710732[/mergetime]
Вау.. какая хрень у меня получилась (IMG:style_emoticons/kolobok_light/smile.gif) Только камера в середине катсцены не поворачивается почему-то (IMG:style_emoticons/kolobok_light/sad.gif)
1. Челу начинают драться.. кричат... выливается кровь...
2. Прибегает мент, они успокаиваются, мент крутит рукой типа "в наручники", затем один (тот что начинал драться) идет за ментом, а другой его бьет в догонку (IMG:style_emoticons/kolobok_light/smile.gif)
3. И все... (IMG:style_emoticons/kolobok_light/smile.gif)
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
Ragnor
сообщение Jul 27 2004, 10:13
Сообщение #29


Level 3
*

Класс: Убийца
Характер: Lawful Good
Раса: Человек



Neverwinter Script Source
void main()
{
object oPC = GetEnteringObject();
object oItem = GetObjectByTag("111");
if (!GetIsPC(oPC) || GetLocalInt(OBJECT_SELF, "TRIGGER") == 1)
    return;
  {
  SetLocalInt(OBJECT_SELF, "TRIGGER", 1);
  SetCutsceneMode(oPC);
  AssignCommand(oPC, ClearAllActions());
  AssignCommand(oItem, ClearAllActions());
  ActionDoCommand(AssignCommand(oItem, SetCameraFacing(250.0, 20.0, 45.0, CAMERA_TRANSITION_TYPE_MEDIUM)));
  ActionWait(5.5);
  ActionDoCommand(AssignCommand(oItem, SetCameraFacing(250.0, 7.0, 45.0, CAMERA_TRANSITION_TYPE_SLOW)));
  ActionWait(3.5);
  ActionDoCommand(AssignCommand(oItem, ActionDoCommand(SetCutsceneMode(oPC, FALSE))));
  ActionDoCommand(AssignCommand(oItem, ActionStartConversation(oPC)));
  }
}


Что тут не правильно? По идеи игрок должен наступить на тригер и камера переходит на обьект с тегом 111 но камера остаётс на ПК и к томуже не двигается
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
2GoDoom
сообщение Jul 27 2004, 12:15
Сообщение #30


Level 11
***

Класс: Обыватель
Характер: True Neutral
Раса: Человек
NWN: Маппинг



Ragnor, 1ое - тута нету Акшон Вайтов - тут есть Делай Комманд (как я уже понял).
2ое - Что за oItem? и зачем катсцену как-то странно вырубаешь?
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения

9 страниц V  < 1 2 3 > » 
Ответить в эту темуОткрыть новую тему
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 



Текстовая версия Сейчас: 7th July 2025 - 22:58