Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

or not once i load up the stage it just crashes no 

Can you reply with the code in the hscript?

yea

function start(song) {

    var bg = new FlxSprite(-600, -200).loadGraphic(hscriptPath + 'stageback.png');

    bg.scrollFactor.set(0.9, 0.9);

    bg.antialiasing = true;

    addSprite(bg, BEHIND_ALL);

    var stageFront = new FlxSprite(-650, 600).loadGraphic(hscriptPath + 'stagefront.png');

    stageFront.setGraphicSize(Std.int(stageFront.width * 1.1));

    stageFront.scrollFactor.set(0.9, 0.9);

    stageFront.antialiasing = true;

    stageFront.updateHitbox();

    addSprite(stageFront, BEHIND_ALL);

    var stagecurtains = new FlxSprite(-500, -300).loadGraphic(hscriptPath + 'stagecurtains.png');

    stagecurtains.setGraphicSize(Std.int(stageFront.width * 0.9));

    stagecurtains.scrollFactor.set(1.3, 1.3);

    stagecurtains.updateHitbox();

    stagecurtains.antialiasing = true;

    addSprite(stagecurtains, BEHIND_ALL);

    setDefaultZoom(0.9);

    var sh_r  = 1;

    var movex = 0;

    var movey = 0;

    var xup = true;

    var yup = true;

    var movexby = 0.025;

    var moveyby = 0.005;

}

function beatHit(beat)

{

}

function update(elapsed)

{

    var sh_toy = -2480 * movey * sh_r * 0.45;

    var sh_tox = -330 * movex * sh_r;

    dad.x += (sh_tox - dad.x) / 12;

    dad.y += (sh_toy - dad.y) / 12;

    movex += movexby;

    movey += moveyby;

    if (movex >= 2){

        movexby = -0.025;

    }

    if (movex <= -2){

        movexby = 0.025;

    }

    if (movey >= 0.25){

        moveyby = -0.005;

    }

    if (movey <= -0.25){

        moveyby = 0.005;

    }

}

function stepHit(step)

{

}

function playerTwoTurn()

{

}

function playerTwoMiss()

{

}

function playerTwoSing()

{

}

function playerOneTurn()

{

}

function playerOneMiss()

{

}

function playerOneSing()

{

}

Move the vars and put them before the start function (function start(song) )

ah ok

it should look like this

var sh_r  = 1;
var movex = 0;
var movey = 0;
var xup = true;
var yup = true;
var movexby = 0.025;
var moveyby = 0.005;
function start(song) {

now it works thanks