Page 1 of 1

Every 2 plays.. O-o?

PostPosted: Fri Apr 13, 2012 1:20 pm
by Hblade
I'm very confused right now. On my pong game, I have it set where the transition takes place after you either win or loose a battle. (The circle that hides and shows the screen). It works on everything, and it works for the first battle, but after that it doesn't do it anymore for the battle.. sometimes it will but sometimes it wont. I'm --way-- beyond confused here, I've tried resetting the "kvar" variable which when it equals 60, it teleports the screen back to the world map, but even setting kvar(an actor variable) to 0, even by other means, such as a mouse down, somehow it still instantly teleports the view to the world map O-o...

I have an idea actually... hang on.

Works :D

The solution:
I had a cloned actor, SCORES.0 and SCORES.1, which caused the bugs. I simply added a switch(cloneindex) and case 0 to determine the transition.

Re: Every 2 plays.. O-o?

PostPosted: Sun Apr 15, 2012 10:07 pm
by JamesLeonardo32
Sadly, this is what usually happens to me.
I usually figure stuff out by myself. Then on a rare occurrence I'm about to ask, but either before typing or before posting, I figure it out.

Re: Every 2 plays.. O-o?

PostPosted: Mon Apr 16, 2012 12:51 am
by Hblade
lol yeah, like you'd be in the middle of asking about it, then BAM the solution you find :3

Re: Every 2 plays.. O-o?

PostPosted: Mon Apr 16, 2012 1:30 am
by SuperSonic
JamesLeonardo32 wrote:Sadly, this is what usually happens to me.
Sadly? What are you talking about? That's the greatest feeling in the world to me. To have the satisfaction of figuring out my problem and not having to ask others about it :P

Re: Every 2 plays.. O-o?

PostPosted: Mon Apr 16, 2012 1:53 am
by skydereign
It is pretty natural for this to happen. When you post a question, you end up reorganizing your thoughts in a more coherent way, which makes it a lot easier to solve it. To ask a question efficiently, you have to be able to understand the problem to a greater extent (since explaining to others is innately harder than understanding it yourself). And since coding is purely based in logic, we can end up solving our problems mid-question. Often when I run into problems, I explain it to someone else, which almost always points me in the right direction.

Re: Every 2 plays.. O-o?

PostPosted: Mon Apr 16, 2012 5:05 am
by Hblade
Makes sense :) thanks