on object clicked doesn't work

Get help using Construct 2

Post » Wed Feb 29, 2012 3:59 pm

I've created a little game. If you go from the game to the menu without levelling up, it works fine. But if you just went up 1 level and then hit [ESC] or died, your no longer able to start the game!
I've tried several things, but i can't get it work. Does anyone knows how to fix it?

Here's the file

P.S.:I hope you don't mind my bad english. I'm german.Zral2012-02-29 16:10:47
B
71
S
5
G
6
Posts: 8
Reputation: 5,785

Post » Wed Feb 29, 2012 4:14 pm

First of all - nice Game Idea!!!

Second, I think it's weird to shoot with "W"...

AND finally, if you die your game should jump to "Over" not to "Menu" - at least this is what the CAPX says BUT in "Over" you use "On Key Down" to then jump to "Menu"....bad idea - change this to "On Key pressed" and it should work as expected!
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Wed Feb 29, 2012 4:51 pm

Thanks for the fast reply, it's better now. But it hasn't fixed my problem. Example number 1: I start the game, press [ESC], see my level is 1,and press [ESC] again. Now i can start the game by clicking on start.
Example number 2: I start the game and play a while. I level up (no matter how many) and die/press [ESC]. On the game over screen i see, that my level is higher than one. I press [ESC] again, but now I can't click anything in the menu! That's my problem.
B
71
S
5
G
6
Posts: 8
Reputation: 5,785

Post » Wed Feb 29, 2012 5:06 pm

Right now....I am ideenlos....

Now clue. The correct Eventsheet is drawn and executed. The mousevents (Cursor is over...) Works, but either the "click" is not recognized, or the "go to" does not work...

Need more time to do some more debugging

....ok, it seems, that it is the "go to", that's having hick-ups

Maybe KYATRIC has a helpfull ideaWeishaupt2012-02-29 17:13:11
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Wed Feb 29, 2012 5:37 pm

It is weird behavior. I've deleted everything except layouts Game and Menu and it works correclty. Then I load capx again and did exactly the same and it's not working :)shinkan2012-02-29 17:38:08
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Wed Feb 29, 2012 5:55 pm

@Zral - Maybe you should report it as a bug?!
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Wed Feb 29, 2012 6:15 pm

I get a js bug 'cause you toggled off two for loop at start of frame (GameSheet event 2 and 3) but still refer to loopindex in the action.
Just delete that part. Didn't test it but that might be the issue.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Wed Feb 29, 2012 7:03 pm

Aahhhh! Thanks alot! I've already had some bad experiences with inactive events, but i didn't recognized it.
What we've learned: Delete events instead of toggling them off.
B
71
S
5
G
6
Posts: 8
Reputation: 5,785

Post » Wed Feb 29, 2012 7:14 pm

No need to throw toggling into the pit of obliviousness, toggling is usefull and not that buggy.
But you should either toggle an entire event or some specific actions.

Toggling a condition is seldom use.
It's only usefull if you want to rapidly compare two conditions without deleting any.

The difference between toggling a condition and an entire event, in the UI, is that when you select a condition you only see the condition outlined whereas when you select an event the entire condition+action block (+ eventually sub-events) should turn yellow.Yann2012-02-29 19:16:52
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound, randomly, spcsmrf, Zakeru and 18 guests