Coder Social home page Coder Social logo

Game Over and Death Cam about xray-16 HOT 3 CLOSED

avoitishin avatar avoitishin commented on July 19, 2024
Game Over and Death Cam

from xray-16.

Comments (3)

avoitishin avatar avoitishin commented on July 19, 2024

Is that what you have in Actor.cpp?

if (IsGameTypeSingle())
    {
#ifdef FP_DEATH
        cam_Set(eacFirstEye);
#else
        cam_Set(eacFreeLook);
#endif // FP_DEATH
        CurrentGameUI()->HideShownDialogs();

        /* avo: attempt to set camera on timer */
        /*CTimer T;
        T.Start();
        if (!SwitchToThread())
        Sleep(2);
        while (true)
        {
        if (T.GetElapsed_sec() == 5)
        {
        cam_Set(eacFreeLook);
        start_tutorial("game_over");
        break;
        }
        }*/
        /* avo: end */

        start_tutorial("game_over");
    }

from xray-16.

revolucas avatar revolucas commented on July 19, 2024

Yes, that is what I have in Actor.cpp. The reason I'm asking this question is because I tried my compiled binaries on untouched CoP with no gamedata (except gulag_general.script changes) and do not see the game over screen there either. It seems to be the cause of the build and I'm confused as to why because Actor.cpp looks fine. Could this not be triggering at all because of the fake death mechanics you added? Because in Freelook cam (FP_DEATH undefined) I noticed there is no actor corpse.

EDIT: Nevermind, I didn't realize that that killing actor in on_actor_before_death is now mandatory if you want to see the real game_over screen. The information about killing the actor in this callback needs updated. There is a typo. level:object_by_id should be level.object_by_id and the example is killing the killer instead of the actor. This is what the example should look like:

db.actor:kill(db.actor, true)

from xray-16.

avoitishin avatar avoitishin commented on July 19, 2024

Does it really matter who kills an actor? Example is just a simple showcase on how to do it. BTW - i think sent you PM some time ago on COC forums about this :)

from xray-16.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.