The Daily Click ::. Forums ::. Klik Coding Help ::. Global values bug?
 

Post Reply  Post Oekaki 
 

Posted By Message

marco souza



Registered
  12/04/2013 15:00:37
Points
  6
12th April, 2013 at 12/04/2013 15:05:36 -

Hey guys, i'm makin a form here. And i need that if i check a checkbox (there are 6 of them), it adds 6 to a global value A. And if the global value A is equal or greater than 15 it enable another checkbox.

I put in the actions when i check checkbox A or B or C (i did one action to each one) >> Add 6 to Global Value A
And Global Value A >= 15 >> Enable checkbox K

BUT, the global values doesnt work like expected. When i put to add 6 it adds MUCH more. It adds like 500, 600.

Whats the problem?

Thanx

 
n/a

nivram



Registered
  20/07/2006
Points
  171
12th April, 2013 at 12/04/2013 17:01:13 -

Are you saying you used "Only One Action When Event loops"?

Thanks,
Marv

 
458 MMF2 & CTF 2.5 examples and games

http://www.castles-of-britain.com/mmf2examples.htm

marco souza



Registered
  12/04/2013 15:00:37
Points
  6
12th April, 2013 at 12/04/2013 20:36:41 -

Honestly, i didnt get what you say. Sorry... Could you explain?

Regards,

P.S.: I tried using alterable values on an object, and the same prob.

---

Think I got you. But, why do I have to add this condition?

Edited by marco souza

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
12th April, 2013 at 12/04/2013 22:45:04 -

Because otherwise the action will keep repeating once every loop - so it will keep adding 6 to the global value, 50 times per second, until the checkbox is unchecked again.

Conditions that are only triggered once are colored red in the event editor. The other difference is that these conditions are immediately triggered as soon as they become true, unlike normal conditions which are triggered in the order in which they appear in the event list.

 
n/a

marco souza



Registered
  12/04/2013 15:00:37
Points
  6
13th April, 2013 at 13/04/2013 02:41:39 -

oh, i got it! i'm gonna try!
thanx buddies

 
n/a

marco souza



Registered
  12/04/2013 15:00:37
Points
  6
13th April, 2013 at 13/04/2013 03:23:36 -

thanx guys! it worked well!

regards.

Edited by marco souza

 
n/a
   

Post Reply



 



Advertisement

Worth A Click