PDA

View Full Version : How to script an opening sequence



atuca
10-23-2014, 04:34 AM
I would like to know a few different techniques for creating the opening sequence (displaying credits) for a new project as well as a "push anywhere" to continue entity (start menu).

For the first, my attempt was copying the loony ladders, where I created an invisible button "PlayOpeningMovie", and using FakeClickAnEntity with a delay timer, get what I am after, but I got a button clicking sound I don't want as I jump between screens.

OpeningCredits->OpeningMovie->TitleScreen.

OpeningCredits::OpeningCreditsOnSelect Method:



if (pEntCLicked->GetName() == "PlayOpeningMovie")
{
DisableAllButtonsEntity(PentClicked->GetParent());
OpeningMovie::OpeningMovieCreate(pEntCLicked0_GetP arent()->GetParent());
return;
}


For the second question, I created a file the same size as my screen resolution, converted it to .rttex, and made a CreateOverlayButtonEntity and set its color to MAKE_RGBA(0,0,0,0). But I wasn't sure if that was the right approach as far as memory and speed is concerned with loading the large file just to achieve this hack.



pEnt = CreateOverlayButtonEntity(pBG, "GoToTitleScreen", "interface/TransparencyImage.rttex", (GetScreenSizeXf() / 2), (GetScreenSizeYf() / 2));
SetAlignmentEntity(pEnt, ALIGNMENT_CENTER);
pEnt->GetVar("color")->Set(MAKE_RGBA(0, 0, 0, 0));
pEnt->GetShared()->GetFunction("OnButtonSelected")->sig_function.connect(&OpeningMovieOnSelect);


Are there better ways to do what I am trying to do?

atuca
10-23-2014, 06:07 PM
Answer to my first question:

//at your app Init()
SetDefaultAudioClickSound("");


//or on your entities you want to ignore the sound.
SetButtonClickSound(pEnt, "");

plays no sound on a button click since you provide it with no sound.

Seth
10-25-2014, 11:37 PM
Sorry for the slow reply, but yep, you got it.

SFM2025
10-26-2014, 12:39 PM
Sorry for the slow reply, but yep, you got it.

Seth what is Proton SDK?

Brennanber
10-28-2014, 04:57 AM
Seth what is Proton SDK?
You are in the wrong neighborhood...

Anyways if you did a simple google search Proton SDK (aka p+) is a free and open source component based C++ framework with its own touch-optimized GUI system that is optimized for GL/GLES based cross-platform app/game development.

Its a fancy source development kit that allows you to make apps/games easier in some aspects.