The Daily Click ::. Forums ::. Klik Coding Help ::. Here's one...
 

Post Reply  Post Oekaki 
 

Posted By Message

Dave S.



Registered
  26/09/2003
Points
  924
10th January, 2006 at 22:02:50 -

... basically, when clicking with the mouse button on an active object to cause an event (and is the last event of that frame) the mouse arrow, if still in the same position when the new level appears, triggers the same event, even though the mouse has not been clicked... why is this or how can I prevent this from happening?

PS I foolishly posted this in the wrong section at first... hope no one noticed!


 
n/a

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
10th January, 2006 at 23:33:47 -

I had the same thing happen with Captain of the Guard. When you pressed the "Enemy" button to go to the beastiary, it would select whatever monster's name happened to be where the button was from the previous frame. I didn't think too much about it being a bad thing to fix it, but what if you hid the mouse on exiting the 1st frame, then at the start of the 2nd frame make it visible again? I don't believe the program accepts any commands from a hidden mouse, so there should be no way it could recognize a mouse click on the 2nd frame. Just a guess!


 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
10th January, 2006 at 23:36:25 -

Simplest way would be to put a 'time is greater than [some fraction of a second]' in the event that handles the mouse click.

 
n/a

Peblo

Custom ratings must be 50 characters or less

Registered
  05/07/2002
Points
  185

Game of the Week WinnerVIP MemberI'm on a Boat360 OwnerAttention GetterThe Cake is a LieCardboard BoxHero of TimePS3 OwnerIt's-a me, Mario!
I'm a Storm TrooperSonic SpeedStrawberryI like Aliens!Wii OwnerMushroomGhostbuster!
10th January, 2006 at 23:41:57 -

I preffer 0.15 myself.

 
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
11th January, 2006 at 00:28:16 -

i hate that and ive come across the problem again in my rpg menu thingy.

what i have done before is make a delay counter.

pressing enter (or cliking the mouse) makes somthing happen and adds a number to the counter
then closes the group and opens a new group.

the counter slowly counts down to 0

pressing enter or clicking the mouse in the new group does nothing unless the counter = 0

 
.

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
11th January, 2006 at 16:40:40 -

No, dont do timer things

Just have a flag, and say when the mouse isnt clicking set the flag to on, and in the clicking event say: when user clicks + flag = on

 
n/a

Flava



Registered
  30/07/2002
Points
  684

Has Donated, Thank You!Code MonkeyVIP MemberThe Cake is a LieThe Spinster
11th January, 2006 at 22:17:49 -

Wouldn't that give the same problem though?
Too be honest I'm confused what the problem is - I can't be bothered reading it again neither

Actually wouldn't the flags be reset on the next frame if you did that?
(Btw if I'm wrong its not my fault - I'm tired k )

Image Edited by the Author.

 
This is a signature. Have this one on me.

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
11th January, 2006 at 22:56:47 -

I was going to suggest flags, but the timer thing is simpler for a new user. What exactly is wrong with that idea, Klikmaster?

 
n/a

Dave S.



Registered
  26/09/2003
Points
  924
12th January, 2006 at 09:38:38 -

Yes, it does seem to be a timer thing as (in the end) I got round it by using transitions... fading out from a completed level and fading in again to display the next... sorted! Cheers chaps.

 
n/a

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
12th January, 2006 at 11:51:10 -

There's nothing wrong with doing it with a timer, but it's more of a way round the problem, flags is more like a solution

 
n/a
   

Post Reply



 



Advertisement

Worth A Click