Hello everyone!
I have a new problem, since there is something wrong with double triangle collisions(A big collision problem - #12 by Angel), I decided to change my enemy. Now I have a fixed sprite that must fire a shot with a constant frequency and always in the same place … How can I do it?
Thanks so much for your valuable help!
Double triangle collisions?
I took a look at your linked post but didn’t understand everything…
Anyway, to shoot, start a timer, and when timer exceeds the desired rate of fire, create a bullet object, add a force to move it as you like, and reset the timer.
Look at the penultimate comment, I created the bulb with 2 luminous triangles (the one in the photo has 1), and I created a collision mask that follows the two “rays” of the bulb … But, Gdevelop the collision puts it to me on the other hand, and I couldn’t understand why
Thanks a lot, after I try
What makes you think that? It looks okay.
It doesn’t work, it doesn’t create bullet
Maybe it is created but just not visible. Have you confirmed in the debugger?
What do you mean? From the debugger it gives me this
It says you have 2 instances of the object, so the creation works. But it’s on the base layer with a z order of 0, so if you have any background, it’s hidden beneath it. Put it on another layer or change the z order.
You’re right, that’s the problem, but now the laser comes out somewhere else, not where I put the coordinates…
Is there an easy way to insert the laser where the “laserguns” are? maybe even in the directions where the laser guns are pointing?
create a point on the guns object and create your laser there, but you will have to figure out the angle.
Sorry, but I don’t think I understand what a point is
I was thinking, could this be done with a variable that controls the position of the object and “says” where the laser is to be created? In this case, could one code be used for multiple lasers in each scene?
Points are in the object properties, next to hitbox.
Could you, if you have time and desire, show me an example?
Thanks a lot I understand! It was much simpler than when I thought!
Good conversation