Ending the game with an elevator?
Select messages from
# through # FAQ
[/[Print]\]

DieHard Wolfers -> Code Crackers

#1: Ending the game with an elevator? Author: Barry PostPosted: Wed Jun 22, 2016 12:32 pm
    —
As of now, the final level of Phase 1 ends with a DeathCam when you beat the boss, which will be changed to dropping a key in the complete version of Hollenteufel, but in reality I would like it if when the player threw the elevator switch on the final level, it ended the game. I have been able to get it to display the end art as if the game has been won and even return to the title screen, but it always drops the player back into the next level afterwards. What would I need to do so what when the player throws the switch on floor 31, it completely ends the game, records the player's score, and returns to the title screen?

#2: Re: Ending the game with an elevator? Author: Barry PostPosted: Wed Jun 22, 2016 3:38 pm
    —
Can't test it yet but I'm going to try adding this to the code handling secret levels to accomplish this.

if (gamestate.mapon == 30)
{
gamestate.victoryflag = true;
}

#3: Ending the game with an elevator? Author: AlumiuNLocation: Christchurch, New Zealand PostPosted: Wed Jun 22, 2016 4:09 pm
    —
In Cmd_Use in WL_AGENT there's the following:

::: CODE :::
        if (*(mapsegs[0]+(player->tiley<<mapshift)+player->tilex) == ALTELEVATORTILE)
            playstate = ex_secretlevel;
        else
            playstate = ex_completed;


Changing that to the following should do what you want:

::: CODE :::
        if (*(mapsegs[0]+(player->tiley<<mapshift)+player->tilex) == ALTELEVATORTILE)
            playstate = ex_secretlevel;
        else if (gamestate.mapon == 30)
            playstate = ex_victorious;

        else
            playstate = ex_completed;


The victoryflag is used to start the BJ animation at the ends of E1 and E5, which I assume you probably don't want, hence changing the playstate.

#4: Re: Ending the game with an elevator? Author: Barry PostPosted: Wed Jun 22, 2016 4:18 pm
    —
Thanks! I'll try that.

Yeah I definitely don't want the BJ animation.



DieHard Wolfers -> Code Crackers


output generated using printer-friendly topic mod. All times are GMT

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group