How do I Make multiple AI shoot

Get help using Construct 2

Post » Tue Jun 02, 2015 12:24 pm

I created a game where there is multiple AI which are the same. I have a problem where only one AI will shoot depending on where which one was placed first. How can I fix this?

https:// www. dropbox .com /s/kathqdvk9fxcxpz/Naval%20Warfare.capx?dl=0
B
3
Posts: 11
Reputation: 199

Post » Tue Jun 02, 2015 12:45 pm

Don't forget about "For each" action.

If you have multiple objects in one AI-fellow - Create a variable like "Name" or "Number" in the family.

I showed you direction. It's will be much better if you'll solve this by yourself.

Actually, this is my favorite part in programming :D
I'm a Magician, not a Developer.
B
21
S
8
G
25
Posts: 105
Reputation: 14,252

Post » Tue Jun 02, 2015 12:52 pm

XpMonster wrote:Don't forget about "For each" action.

If you have multiple objects in one AI-fellow - Create a variable like "Name" or "Number" in the family.

I showed you direction. It's will be much better if you'll solve this by yourself.

Actually, this is my favorite part in programming :D


I do not have too much time as this is for a project. I need step by step. If you can look at the file i shared and help that would be great. I also have an issue when all enemies destroyed i need to move to the next layout.
B
3
Posts: 11
Reputation: 199

Post » Tue Jun 02, 2015 2:02 pm

Well, that was fun ;D

Did some naval-work just two months ago.

https://dl.dropboxusercontent.com/u/39210620/Naval%20Warfare_1.capx
-----------------
You don't need to create for every level new event sheet. Just make one for the game, one for menu and etc.
You also don't need unique "CannonFire" for every type of enemy.

Actually, there is no economy from you.
I'm a Magician, not a Developer.
B
21
S
8
G
25
Posts: 105
Reputation: 14,252

Post » Wed Jun 03, 2015 1:21 pm

Message: brendanschaffric is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
XpMonster wrote:Well, that was fun ;D

Did some naval-work just two months ago.-----------------
You don't need to create for every level new event sheet. Just make one for the game, one for menu and etc.
You also don't need unique "CannonFire" for every type of enemy.

Actually, there is no economy from you.


Haha thanks man but i cant figure out how to do it to level 2. IS there anyway you could apply this to the second level.
B
3
Posts: 11
Reputation: 199

Post » Thu Jun 04, 2015 12:18 am

I've changed...a lot :D

https://dl.dropboxusercontent.com/u/39210620/NavalWarfare.capx

You should make another topic to find someone, who will help to create a good, proper z-order.

I added only simple method which is working only on the PlayerShip. You should do it probably to all objects in the game, but it's not possible in that way. I think Array can help here somehow.

If someone will resolve this problem, i would be grateful if you give me an example. Maybe someday i will need this too.

Anyway. It was very good to work with something a lot more easier than my usual projects. Have a good one :)
I'm a Magician, not a Developer.
B
21
S
8
G
25
Posts: 105
Reputation: 14,252

Post » Thu Jun 04, 2015 11:59 am

XpMonster wrote:I've changed...a lot :DYou should make another topic to find someone, who will help to create a good, proper z-order.

I added only simple method which is working only on the PlayerShip. You should do it probably to all objects in the game, but it's not possible in that way. I think Array can help here somehow.

If someone will resolve this problem, i would be grateful if you give me an example. Maybe someday i will need this too.

Anyway. It was very good to work with something a lot more easier than my usual projects. Have a good one :)


Love it man last issue is the games objective is to get the treasure. I have the treasure image but cannot make it so when the manowar dies it spawns because i am using the free version. I can put the image in game and if you can make it happen as well as a game over screen and a start screen? that would be great.

https:// www. dropbox .com /s/kathqdvk9fxcxpz/Naval%20Warfare.capx?dl=0
B
3
Posts: 11
Reputation: 199

Post » Thu Jun 04, 2015 1:00 pm

@brendanschaffric

Create topic as i asked. I will deal with treasure and start/over screen.
I'm a Magician, not a Developer.
B
21
S
8
G
25
Posts: 105
Reputation: 14,252

Post » Thu Jun 04, 2015 2:25 pm

XpMonster wrote:@brendanschaffric

Create topic as i asked. I will deal with treasure and start/over screen.


I created one for this
https:// www. scirra .com /forum/viewtopic.php?f=147&t=147611&p=938629#p938629
B
3
Posts: 11
Reputation: 199


Return to How do I....?

Who is online

Users browsing this forum: el3um4s, TylerJS and 9 guests