Copy link to clipboard
Copied
Hello again, now i'm getting a basic error, i dont know why, if some one can help thanks,
my character is passing the background, how do i fix this? http://prntscr.com/5ib7qi
that's because you're not correctly applying whichever solution you're trying, and it's not possible to say why it's failing because you've provided no info.
Copy link to clipboard
Copied
usually you would use a hitTestObject or check the y property of your character to prevent movement beyond a horizontal plane.
Copy link to clipboard
Copied
don't work '-' the player keep going under the ground
Copy link to clipboard
Copied
that's because you're not correctly applying whichever solution you're trying, and it's not possible to say why it's failing because you've provided no info.
Copy link to clipboard
Copied
what info do you need?
Copy link to clipboard
Copied
what code are you using to execute that hittestobject or check the y property?
Copy link to clipboard
Copied
you mean this? if(back.collisions.hitTestPoint(player.x + leftBumpPoint.x, player.y + leftBumpPoint.y, true)){
'-' i'm a newbie sry
Copy link to clipboard
Copied
that could be the code you're using. i don't really know.
if that is your code, it needs to be in a loop (like enterframe or a timer) so it repeatedly executes, at least, every time back.collisions or player or leftBumpPoint changes x or y.
Copy link to clipboard
Copied
function loop(e:Event):void{
if(back.collisions.hitTestPoint(player.x + leftBumpPoint.x, player.y + leftBumpPoint.y, true)){
Copy link to clipboard
Copied
if that's an enterframe listener function, that should work assuming all those object references are correct.
Copy link to clipboard
Copied
Oh, well, now i get a new error '-'.
ArgumentError: Error #2109: O rótulo do quadro idle não foi encontrado na cena idle.
at flash.display::MovieClip/gotoAndStop()
at TheAdventureofaTopHat_Scene1_fla::MainTimeline/loop()[TheAdventureofaTopHat_Scene1_fla.MainTimeline::frame1:242]
Copy link to clipboard
Copied
you have an incorrect frame label. frame labels are scene specific.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now