Game WIP: Crosshair - Strange bug...

For questions about using Classic.

Post » Mon Nov 08, 2010 1:20 am

Okay, I am working on a game called "Crosshair", which centers around avoiding a snipers crosshair to prevent from getting shot, and as time progresses, the sniper speeds up, making it very difficult near 270 seconds...

I ran into a bug where if the sniper missed his shot, that he would reload. However, when I go into runtime, and when the triggertime variable reaches 0 (that's when he shoots), the animation plays after 750ms, but the player still dies, even if it isn't colliding with the sniper hitbox object, and all of the other parts of the ground and platforms are cut away, while the animation repeatingly loops over and over.

Here is a cap file: http://www.megaupload.com/?d=DB0C0BOC

Please help if you can! :wink:
B
26
S
7
G
5
Posts: 202
Reputation: 5,235

Post » Mon Nov 08, 2010 3:26 am

The Animation for reloading is looped. And you have it set that after its done reloading to continue. But its never done because its looping. To fix that just click on animation tab bottom right and click the angle 0 under reload. And on the left side theirs options for it one is a check box with loop. Uncheck it and problem solved for that.

And the reason the ground is cut away is because the reloading animation is not transparent. Simple fixes. :wink: Hope this helped.

Edit: Just noticed something that if you get shot you die but it never stops shooting you. (you probably knew this just was saying)

And this is a neat little game so far. I like it. :)
B
2
G
2
Posts: 17
Reputation: 684

Post » Tue Nov 09, 2010 2:25 am

[quote="Tricky991":3aflkphq]The Animation for reloading is looped. And you have it set that after its done reloading to continue. But its never done because its looping. To fix that just click on animation tab bottom right and click the angle 0 under reload. And on the left side theirs options for it one is a check box with loop. Uncheck it and problem solved for that.

And the reason the ground is cut away is because the reloading animation is not transparent. Simple fixes. :wink: Hope this helped.

Edit: Just noticed something that if you get shot you die but it never stops shooting you. (you probably knew this just was saying)

And this is a neat little game so far. I like it. :)[/quote:3aflkphq]

Thank you very much! Now, how would I fix the constant shooting bug?

*goes to fix the alpha problems on the crosshair sprite.*

EDIT: I fixed it. Problem: The nearshot collision box was still there after the player died, so the sniper would constantly shoot the nearshot over and over and over and over...

PARADOX. :shock:
B
26
S
7
G
5
Posts: 202
Reputation: 5,235

Post » Tue Nov 09, 2010 3:34 am

Awesome :P glad I could help. Like I said in my last post pretty neat little game so far. Hope to see what comes outta this :D
B
2
G
2
Posts: 17
Reputation: 684


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests