The Daily Click ::. Forums ::. Klik Coding Help ::. Doing an IF-ELSE code in MMF
 

Post Reply  Post Oekaki 
 

Posted By Message

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
23rd June, 2008 at 23:53:00 -

I already know how to do the IF part in MMF; the whole event system runs on it. But what about ELSE?

Let's say I have an event with the conditions of:

+ on loop "create"
+ Gold > 100
+ Crystals > 20
+ X overlaps backdrop


Now let's say I have 40 of these events, which makes any heavy copy and pasting cumbersome. How do I make it so that something else happens if not all of those conditions are met?

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

Ricky

loves Left For Dead 2

Registered
  28/12/2006
Points
  4175

Has Donated, Thank You!Game of the Week WinnerVIP MemberWii OwnerHero of TimeGOTM Winner! - November 2009I am an April Fool
24th June, 2008 at 00:29:16 -

If -every thing is true
Then -do every thing i want to do
-and set a flag on

(here's your else)
If -the flag is not on
Then - do what you want in the else condition

Always - turn the flag back off

 
-

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
24th June, 2008 at 00:38:01 -

Hmm.. good idea! A bit tiring adding 41/80 more events to it and keeping track of all the flags, but it's a good solution

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

X_Sheep

I had a custom rating before it was cool

Registered
  01/03/2004
Points
  1313

VIP MemberPicture Me This -Round 23- Winner!Dos Rules!
24th June, 2008 at 04:39:40 -

I think there's an extension that does this. I haven't tried it myself though.

http://extensions.co.nr/ext/IfElse_Nest_Object

 
a/n

viva/volt

Awesome Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
24th June, 2008 at 07:34:53 -

The if/else nest wouldn't do this with any less event lines, Ricky's way is the best I can think of.

 
Image
http://bfollington.tumblr.com
   

Post Reply



 



Advertisement

Worth A Click