looks pretty cool but how did u make random things fall out of the space. i made a code but it doesnt work. the things are not spawning in the space and dont fall down, how do i fix?
A new version of this scenario was uploaded on 2016-03-08 08:57:57 UTC
Gameplay improvement ;)
Thanks guys :D hihahaan, if you're refering to the golden balls, i made the instance of the class prince to create them uder a pattern, it had to be in certain tipe of coordinate, far from edge, and not under prince instance, also, x value less than 200, for the balls to be at range to collect.... if it's not enough, please show the part of the code you're having trouble with, and a description of what it does, and i'll check it out as soon as i can :D
That's for spawning, and to fall, you can make 3methods in each class whose instance will fall, i named mines as "fall()" , "checkFall()" and "onGround()":
public void fall()
{
setLocation(getX(), getY() + vSpeed);
if(vSpeed <=9)
{
vSpeed = vSpeed + acceleration;
}
jumping = true;
}
public void checkFall()
{
if(onGround())
{
vSpeed = 0;
}
else
{
fall();
}
}
public boolean onGround()
{
int spriteHeight = getImage().getHeight();
int yDistance = (int)(spriteHeight/2) + 5;
Actor ground = getOneObjectAtOffset(0, getImage().getHeight()/2, brick1.class);
if(ground == null)
{
jumping = true;
return false;
}
else
{
moveToGround(ground);
return true;
}
}
where "vspeed" is the vertical speed, as you could call it, gravity, therefore, is't location will change at "vspeed" ratio., if it's not on the ground and if it's on the ground, the vertical speed will be 0. I hope i could help you c:
Es tan fácil como desactivar una bomba atómica :D
Me encanta! :D
pd: arregla el hit box, lince >:v 9
Atte: Alfredo Puerta
A new version of this scenario was uploaded on 2016-03-09 04:03:34 UTC
Improved gameplay, A LOT about graphics, fixed the "hit box" reworked lvl 2 and added some features. Enjoy, feel free to comment!! :D
A new version of this scenario was uploaded on 2016-03-09 04:30:39 UTC
Added a sound effect c:
A new version of this scenario was uploaded on 2016-03-09 15:20:18 UTC
fixed a gameplay setting
A new version of this scenario was uploaded on 2016-03-09 15:30:16 UTC
fixed a gameplay setting
A new version of this scenario was uploaded on 2016-03-09 15:56:20 UTC
fixed a gameplay setting in lvl2
A new version of this scenario was uploaded on 2016-03-09 16:21:10 UTC
Damm lvl 2 was just to difficult, now it's possible, enjoy :3
A new version of this scenario was uploaded on 2016-03-09 19:04:33 UTC
Much gameplay, such wow
A new version of this scenario was uploaded on 2016-03-09 19:13:53 UTC
I really hate bugs
¡Hey hey! Pichu pichu, there is my scenario http://www.greenfoot.org/scenarios/16139 I hope you enjoy it and your game improve a lot in graphics xD See my game and tell me what do you think :3 And finally we finish this works ufff xD
Pichu pichu!!! thanks man, i did a looooot of graphics and gameplay improvements, now it really seems like quite a game, hah? it's a relief, and now, i feel proud of doing this work, i just look at the game and smile :')
Hey man, thanks for commenting... after playing level 2 for half and hour, and trying to debus, didn't find anything wierd, what i can think of, is that you think it's a bug not being able to get close to the dragon.... it'a part of the sintaxis of the program, the swords are suppossed to be thrown from the most left part, and you can't move after you reach a part, there is an area where you can move, but the movement is restricted to not get close to the dragon. The "barrier" is always there, and is suppossed to be, for the gameplay and sintaxis... If it's not that, please be sure to specify the bug for me to fix it, thanks for comenting! :D hope you enjoyed it.
A new version of this scenario was uploaded on 2016-03-11 04:23:53 UTC
Debugged a bit, trying to remove every possibility of a bug there could be, thanks to Aletoso 123 for giving me an idea to improve the programm.
2016/3/8
2016/3/8
2016/3/8
2016/3/8
2016/3/8
2016/3/8
2016/3/8
2016/3/8
2016/3/10
2016/3/10
2016/3/10
2016/3/10
2016/3/10
2016/3/10
2016/3/10
2016/3/11
2016/3/19
2016/3/20