This conditions is to track where the cursor is and when the space were pressed the tower will be created as well as the tower range. It works perfectly.
This shows the tower shoots object when the tower range was in collision on the enemy as well as when the timer is 2 sec. or higher. There is no problem at the shooting mechanics.
The problem is that I can’t link the tower and the tower range. I try to use link objects and take into account linked objects but it’s not working properly. All I want is to have a Peashooter like tower but the twist is that it has a range before it attacks. Hope someone can help me with this. If you have other method to do that, please post it here. I really need this to work.
You need to show us the events if you want us to fix them
Another option would be to use “pick the range_1 object closest to skeleton object”.
Yet another option would be to use a custom behavior.
I use distance to set up range. I also use x position of skeleton must be in right side to make sure that it only shoots when the enemy is on its right side. I also use x position to make sure it only attacks mostly when on the screen. The problem is that for example, I plant it on line 1, when there’s an enemy on line 5, it attacks as well because it meets the condition of distance and I don’t want that to happen. Just like this. (this is a sample only)
I just want to make the skeleton behave like a peashooter but with limited range like puff shroom. Also, sometimes when I plant many skeletons, the commands sometimes stop or not functioning right. So the solution to this is to create a custom behavior to make every skeleton works properly and individually. But the problem is that I don’t really know how to create a custom behavior. Hope you can help me to create a custom behavior that acts like a puff shroom that attacks with limited range.
What about using a set distance raycast from the skeleton? It’ll only detect objects that it intersects, and firing it a specific length parallel to the x-axis, you’ll achieve the lane checking and distance limitation all in one.
Can you show me how to it? I’m really sorry. I don’t have a lot of knowledge about GDevelop. I only know the basics like timers, variables, collisions, etc. It’s better if you can make it as a custom behavior so I can use it and I can get an idea on how to make custom behavior to make all objects function individually. I really want this to fix because I really want to make a PvZ like game. Hope you can help me
I use it and it works fine so far! The only issue I encounter is that the mouse location doesn’t connect to the grid I created. It’s because your grids are in different size and position than mine. Yours perfectly fit in 100 mouse round (I forgot the equation) and mine are not. I change it to 96 because my tiles are in 96 pixels but it doesn’t work well. Here is the file of my game. Hope you can fix it soon! Google Drive: Sign-in