How do I keep track of my ammo and make it visible on press?

Just started using Construct 2? Post your questions here

Post » Thu Mar 09, 2017 11:39 pm

Hi,

I am having trouble having my fireballs show up when I shoot them using button press. I can either get it to shoot but have an unlimited amount or have the counter go down but have no fireball shooting out. I want the amount of shots left to be tracked along with the HUD movement. I tried looking through the tutorials and older questions that were similar but none of them are working.

Apologies ahead of time if i'm not making sense. I'm confused on what i'm doing wrong too ><

Please and thank you,
Zareth


Edit: Before when it was shooting, it wouldn't shoot in the direction the player faces. When I fixed that, the above problem happened.
B
6
S
1
G
1
Posts: 8
Reputation: 866

Post » Fri Mar 10, 2017 12:03 am

Without a capx we can only guess with you.

Sounds like you have something set that only allows it to fire at a certain angle and your fireball count is tied to that which is causing the problem.

Post a capx or the event sheet events and we can look at it.
Banned User
B
27
S
7
G
58
Posts: 1,229
Reputation: 34,790

Post » Fri Mar 10, 2017 12:14 am

http s:// drive.google.com /file/d/ 0B1hoUna7B-o0aF9ydHpYYjdPSjQ/ view?usp=sharing

That's the link to my capx file. It needs to work on r184 as that's the version being used for my class. I hope that link works.

Edit: Will that work? I put in some spaces to separate it.
Last edited by ZarethKnyght on Fri Mar 10, 2017 1:52 am, edited 1 time in total.
B
6
S
1
G
1
Posts: 8
Reputation: 866

Post » Fri Mar 10, 2017 12:27 am

ZarethKnyght wrote:https://drive.google.com/file/d/0B1hoUn ... sp=sharing

That's the link to my capx file. It needs to work on r184 as that's the version being used for my class. I hope that link works.


Nope your link doesn't work because you are new member.

You can separate the link with spaces and maybe that will work.
Banned User
B
27
S
7
G
58
Posts: 1,229
Reputation: 34,790

Post » Fri Mar 10, 2017 1:53 am

Updated the post with spaces between the links. I hope it's okay that it's a zip file.
B
6
S
1
G
1
Posts: 8
Reputation: 866

Post » Fri Mar 10, 2017 2:22 am

ZarethKnyght wrote:Updated the post with spaces between the links. I hope it's okay that it's a zip file.


OK I got your CAPX and looked it over and here is the fixed capx:

https://www.dropbox.com/s/pm9tlxhdw7wnz02/Tresure%20Hunt%20Fireball%20Fixed.capx?dl=0

You had two problems:

You were creating the object fireball at 0,0 which is off your screen so it did not show up and I changed that to Spawn object on your player and I added an image point 1 to all your player animations so the fireball will always spawn just slightly in front of the player.

You were not keeping track of your ammo and you were counting fireballs so I changed it to subtract 1 from ammo and now it stops when 6 ammo have been used.

Hope that helps!
Banned User
B
27
S
7
G
58
Posts: 1,229
Reputation: 34,790

Post » Fri Mar 10, 2017 2:23 am

Thank you. I've been stuck on figuring out what I was doing wrong for almost two weeks. ><
B
6
S
1
G
1
Posts: 8
Reputation: 866

Post » Fri Mar 10, 2017 2:29 am

ZarethKnyght wrote:Thank you. I've been stuck on figuring out what I was doing wrong for almost two weeks. ><



You are very welcome!

Looks like it will be a fun game to play and looking forward to seeing the completed project in the arcade.
Banned User
B
27
S
7
G
58
Posts: 1,229
Reputation: 34,790

Post » Fri Mar 10, 2017 2:34 am

Completed game will take longer. This one is just the single stage for assignment purposes. I plan to change the sprites and such for a more completed version.
B
6
S
1
G
1
Posts: 8
Reputation: 866

Post » Fri Mar 10, 2017 3:23 am

Sorry to bother some more but having trouble making a version that's playable without the program installed. I wanted to show it off to my friends. Figured I would ask here instead of a new topic.
B
6
S
1
G
1
Posts: 8
Reputation: 866

Next

Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest