The Daily Click ::. Forums ::. Klik Coding Help ::. Music problem!
 

Post Reply  Post Oekaki 
 

Posted By Message

renneF



Registered
  02/08/2003
Points
  672
22nd September, 2003 at 15:06:27 -

hi everyone! I have a small problem that is probably really easy to fix,
I have value, it is set to 0 at start of level, but when you are detected by the enemy, the counter is set to 1 and it plays a midi when on 1. But the problem is it always starts playing the music when the counter is 1, and slows the game down sop much it almost freezes. I've tried run once when event loops but maybe I'm not using it correctly...
btw im using tgf
please help!!

 
Image

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
22nd September, 2003 at 15:58:14 -

Use the oh-so-useful condition 'Only one action when event loops' - while the conditions above are true, the action will only run once. When they become false and then true again, the actions will run once again.

 
n/a

renneF



Registered
  02/08/2003
Points
  672
22nd September, 2003 at 16:10:03 -

I tried that, but it didn't work. Hmm

 
Image

WesR



Registered
  15/06/2002
Points
  57
22nd September, 2003 at 20:23:33 -

When you tried the "run event once when event loops" what happened, did it not play, or do the same thing without it.

 
n/a

Rycon



Registered
  20/09/2002
Points
  996
22nd September, 2003 at 20:39:16 -

If Counter = 1, set counter to 0.

If One Action when Event loops for some reason DOESENT wanna work. (Never seen it not work)

Your code should look like this:

Enemy Spots You
+
Only One Action when Event Loops

The Only One Action condition cant be used by itself, or its completly useless, it must be added to somthing.

 
We are the music makers, we are the dreamers of dreams...

istvan



Registered
  03/07/2003
Points
  1540
23rd September, 2003 at 01:58:08 -

the only one action when event loops often doesnt work for me either, but i cant remember how i got around it. yes it is bloody annoying

 
'oh yeah? he's thrown a kettle over a pub, what have you done?'

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
23rd September, 2003 at 03:45:09 -

Try placing the "Only one action when event loops" condition last in the event (drag it down so it's on the bottom of the panel). MMFusion warns about something like this in its Readme, so maybe it's a similar bug. I always do it just out of habit, looks a bit neater.

 
http://www.davidn.co.nr - Games, music, living in America

istvan



Registered
  03/07/2003
Points
  1540
25th September, 2003 at 06:19:56 -

cheers, ill try that little technique

 
'oh yeah? he's thrown a kettle over a pub, what have you done?'
   

Post Reply



 



Advertisement

Worth A Click