A bit of a newb problem.

For questions about using Classic.

Post » Fri Nov 11, 2011 4:13 pm

Hi gang!

I'm having a bit of a problem with my game, a game which involves clicking on buttons in order to save a dying patient. It's essentially Whack a Mole.

The Problem I have is that the buttons all start glowing at the same time, rather than doing so randomly. I don't know how I'm going to solve this, but I am a newbie when it comes to this so...

Also I'm trying to have a time counter that tells how long you've kept the person alive, a sort of highscore in other words. Any ideas for how I could solve this?

Thanks in advance. :)
B
12
S
3
G
5
Posts: 21
Reputation: 3,765

Post » Fri Nov 11, 2011 4:16 pm

Oh yes and one more thing: I cloned all the buttons from one single button. Was that a bad move?
B
12
S
3
G
5
Posts: 21
Reputation: 3,765

Post » Fri Nov 11, 2011 4:35 pm

Instances are fine. One way to pick a random existing button would be to use the sprite condition pick random


Also, take a look at the system conditions you'll see there are some calls for timer.

Edit fixed for CC not C2newt2011-11-11 16:40:45
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271

Post » Fri Nov 11, 2011 4:36 pm

Maybe this would help?.

Download ExampleDravenX2011-11-11 16:37:17
B
22
S
3
G
6
Posts: 1,356
Reputation: 7,141

Post » Sat Nov 12, 2011 2:25 am

That actually helped me quite a bit, thanks to both of you guys! :)

My Producer gave me some new directives however (this is a group assignment) and that created some new challenges for me.
She only wants one light to blink at the time, something that I've not been able to do, and then for the lights to gradually blink faster and faster. In addition to that the lights need to reset to their orginal green state once the have done their damage so to say. I tried to reset the animation after the damaging function was done but that only resulted in the random object function to go haywire!
I have managed to speed up the lights and I think I could do it even further by raising the time scale, but the other bits I'm struggling with. Also there is this problem with the guy not dying properly but that is not nearly as important.

I have a copy of the game in it's current for down below. Thank you so much for your support guys, I really appreciate it. Makes me feel really welcome. :)

http://dl.dropbox.com/u/49197731/chaerg.cap
B
12
S
3
G
5
Posts: 21
Reputation: 3,765

Post » Sat Nov 12, 2011 8:26 am

Hi.

I guess problem with dying is about "if health less than" events.

If health less than 8 do this
If health less than 6 do this

But if health less than 6 it means it's also less than 8 which means both conditions are true. I guess you should use 2 events on same event line like this;

if health less than 8 and if it's greater than 6, do this.

I think it should solve that problem.
-----------------------------------------------------
I think at the start of events, on "on left clicken on klapp11" event adding 5 to countdown variable is causing to a bug. I think you should change it like;

If klapp11 animation frame equals to 2
on left clicked on klapp 11 than do this. Otherwise if player keeps clicking to green button, it adds 5 to countdown.

B
7
S
1
G
1
Posts: 76
Reputation: 904


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests