HELP! I have some questions.

Get help using Construct 2

Post » Mon Oct 10, 2016 2:30 pm

Hi! I need some help...
I want to make a western shootout style game.
I need help with 3 mechanics.

1. I currently have 3 bullet sprites in the bottom left, symbolizing ammo. I have it so when you shoot 3 times, the bullets disappear, and a text box tells you to reload. when you press e the bullets reappear one by one. The problem is that when you are out of ammo, you can still shoot. :( How can I fix this??

2. To add more depth I want each player to be able to aim at 3 places, allowing for intense duels. How can I add this?

3. There will be a 2 player mode and an AI mode. How can I make the AI shoot randomly while following the player rules, and how can I make the AI aim for bullets that are coming at him?

Here is a drawing of the mechanics I want. I have no clue how to post my capx.

Image

Thanks!!!
B
4
Posts: 3
Reputation: 456

Post » Mon Oct 10, 2016 4:32 pm

1. You need to make use of variables. When the bullets disappear you can set a boolean 'isEmpty' to true and set 'isEmpty' to false again when the bullets are full or you want the player to be able to shoot. Then on your shooting events you add a condition that you can only shoot when isEmpty is set to false.

2. Not sure exactly what you mean but you can make use of set angle which will set the angle of the bullets fired.

3. You'll need a some logic that chooses a random action that the player is also able to do. If you want them to react then you'll need some kind of trigger like put a detection sprite around the enemy, if a bullet crosses that area then they will do a thing.
B
45
S
15
G
73
Posts: 2,021
Reputation: 43,424

Post » Mon Oct 10, 2016 6:43 pm

plinkie wrote:1. You need to make use of variables. When the bullets disappear you can set a boolean 'isEmpty' to true and set 'isEmpty' to false again when the bullets are full or you want the player to be able to shoot. Then on your shooting events you add a condition that you can only shoot when isEmpty is set to false.

2. Not sure exactly what you mean but you can make use of set angle which will set the angle of the bullets fired.

3. You'll need a some logic that chooses a random action that the player is also able to do. If you want them to react then you'll need some kind of trigger like put a detection sprite around the enemy, if a bullet crosses that area then they will do a thing.
Thanks! worked perfectly :)
B
4
Posts: 3
Reputation: 456


Return to How do I....?

Who is online

Users browsing this forum: alextro, stevenode, Yahoo [Bot] and 3 guests