This site requires JavaScript, please enable it in your browser!
Greenfoot back
DemonsWhiteSoul
DemonsWhiteSoul wrote ...

2014/12/29

Im new to greenfoot plz help

DemonsWhiteSoul DemonsWhiteSoul

2014/12/29

#
Im making my first game and i would like to make the Walls a solid object, im not sure how you do this, can anyone help?
danpost danpost

2014/12/29

#
The only way to make something 'act' as a solid to an actor is to check to make sure that the image of any potential solids do not intersects with its image. After an actor moves, check for intersection with the Wall object and move the actor back off it if intersection occurs. You can make use of the collision detection methods provided in the Actor class. Refer to the documentation if needed.
DemonsWhiteSoul DemonsWhiteSoul

2014/12/29

#
I got the walls to act like a solid now, i used the getOneObjectAtOffset etc. Only thing wrong now is i cant save the world :P
danpost danpost

2014/12/30

#
DemonsWhiteSoul wrote...
I got the walls to act like a solid now, i used the getOneObjectAtOffset etc. Only thing wrong now is i cant save the world :P
Explain. Give any error messages. Give details about unwanted behaviors. Supply code (use the 'code' link below the reply box to insert code into posts). Anything that might help resolve the issue. BTW, you can only save the world after compiling or resetting and making changes manually but before any act cycles have been executed.
You need to login to post a reply.