Hello,
I have a question again.
I want, the background of my game to move down until you can't see it anymore.
But it shouldn't jump out of the screen, it should move. I need this for my game, because it should look like the player is flying. My problem is, that it didn't work with the event enter frame and the background should move without an event like mouse down.
I tried it, but it didn't work.
I hope someone can help me.
Thanks
Comments
Sorry, for my late answer
I had no time answer (and I forgot it )
This works now, but I have a new problem.
I wanted to make collision detection between two objects.
I tried this:
object1top = object1Image:getY()-object1image:getHeight*0.5
object1down = object1Image:getY()+object1image:getHeight*0.5
So I defined the top, down, left and right side of the object.
And so on (I made the same with object2, too).
Then I wanted to check if both objects are on collision with each other :
if object1top <= object2top and (and so on.) then
end
But it doesn't work. I got the error, that I compair two nil values.
If I use == instead of (for example) <=, then it works.
I hope you can help me
Thanks
The Textobject should display the score, but it doesn't update, so it is always 0.
How can I update it?
Thanks
you can put this in init.lua (and create init.lua before if you don't have one)
I don't really understand how the first code works and how I have to implement in my code.
Thanks
basically, create new file in Gideros Studio and call it init.lua
And copy paste the code there, that will ensure that this code is loaded before any other.
The code it self is a simply boundary check between two rectangles.
Then for any object, you can simply use:
But if object1 is only near object2, you lose the game.
Can I make the boundaries of my objects smaller than they are?
Thanks