This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
Discussions
You need to login to take part
Current Discussions
Platforms for my game
By SachaTb, with 1 reply.
Replied to by danpost, over 9 years ago:
For two actors to interact, usually proximity is involved. In this case, actual contact (
touching
or
intersecting
). That is where you must begin. Make use of the
Actor class API documentation
to see what you can use from it. Then, at least begin to build some code that you think might work. If you are finding that difficult. Break the problem down into simple steps -- like for what is required (1) movement of player (horizontal or vertically -- not both at the same time); (2) contact with platform (direc
Health Bar problems
By Ruv25808, with 8 replies.
Last reply by Ruv25808, over 9 years ago:
it worked thanks so much i feel dumb now cuz i fixed that same problem for my other boss fight lol XD.
Collision/Intersection problem
By xavi002, with 2 replies.
Last reply by xavi002, over 9 years ago:
Okay, quite embarrassing, but there is an invisible box i didn't spot. i trimmed them all in a photo editor now :P everything works as intended, lol! frustrated me for hours...
Game stops in in between two values of X?
By SachaTb, with 2 replies.
Last reply by SachaTb, over 9 years ago:
ok thx!
Have a problem with text for time
By ezuxr, with 1 reply.
Replied to by danpost, over 9 years ago:
how to make a GIF image displacement when leaping?
By Validated, with 1 reply.
Replied to by danpost, over 9 years ago:
I am not sure what you mean by "how to make a GIF image displacement when leaping?". Can you please explain what should be happening and how the behavior currently differs from what you want.
Says actor not in world HELP!!!!!!
By Tm030703, with 1 reply.
Replied to by danpost, over 9 years ago:
You cannot use collision checking methods in the constructor of an Actor subclass. The constructor is what creates the object -- it must be created before being added into any world. Usually, the act method is where collision checking should be done.
Adding A Counter...
By IVortexTwisterz, with 1 reply.
Replied to by danpost, over 9 years ago:
Internal or external counter (value shown on screen or hidden)? What have you tried? Show some attempted code. The "end game screen" can be either an actor object that is added at the end or a separate world. Which do you prefer and what have you tried?
Switch Statement, But For Non-Integers
By PJaymz, with 2 replies.
Last reply by davmac, over 9 years ago:
I have tried doing if isKeyDown && getWorld == QuMaj
You can do: <Code Omitted> Alternatively: <Code Omitted> However, from a design perspective it is better to use polymorphism (as danpost suggests). You don't need to check for "a" and "A"; they would be the same key.
need help making terrain
By ninjaFI, with 3 replies.
Last reply by danpost, over 9 years ago:
There are multiple collision checking methods provided in the Actor class. I would start by using one of them. Check the greenfoot.Actor class API documentation to see what methods are available.
How to call int from another class?
By joshuadswa, with 15 replies.
Last reply by joshuadswa, over 9 years ago:
Alright gonna try it right away :) thx a lot :D
serious lagging
By tmargaret, with 10 replies.
Last reply by tmargaret, over 9 years ago:
Great, thanks both of you!
Move pawn (player) from dice roll
By NicoZorlo, with 4 replies.
Last reply by NicoZorlo, over 9 years ago:
WoW thank you very much
Putting down a platform
By SachaTb, with 3 replies.
Last reply by danpost, over 9 years ago:
SachaTb wrote...
I haven't try'd anything with having a platform, i only have the actor called Platform
There are two places where you will need to check for touching a platform. After line 14. where you move vertically and after line 29, immediately after possibly moving horizontally left or right. You will need to use the value of 'gravity' to determine whether touching from above (when 'gravity' is less than zero) or from below (when 'gravity' is greater than zero).
package
By Nosson1459, with 38 replies.
Last reply by Nosson1459, over 9 years ago:
Nosson1459 wrote...
I can change the name of the class and change around whatever I want in the class (but when I change the name there are two methods that get errors isDefaultButton and removeNotify) so now the pre-existing package is my own new one.
When I change the name I get a lot of errors in the other classes.
388
389
390
391
392
393
394
X