The Daily Click ::. Forums ::. Klik Coding Help ::. 'this or that' command in tgf?
 

Post Reply  Post Oekaki 
 

Posted By Message

tetsuya_shino



Registered
  12/08/2004
Points
  491
25th April, 2009 at 04:45:50 -

Greetings. Something I always wondered was if there was a way to code tgf to do an 'or' command. What I mean is what I do now is 'if stopped anim is playing then...' and then in a new line of code 'is running anim is playing....'
But if there a way to do 'if stopped or running anim is playing then...'? It would save me a lot of time, but only if it was 100% foolproof. thanks.

tetsuya_shino

 
n/a

W3R3W00F

Drum and Bass Fueled Psycho

Registered
  08/11/2008
Points
  370

VIP MemberCardboard BoxThe Cake is a Lie
25th April, 2009 at 05:07:51 -

MMF2 has a pretty cool feature called OR in two variations. OR (Filtered) and OR (Logical). In TGF... I'm not so sure that's possible.

Edit: Spelling correction

Edited by W3R3W00F

 
n/a

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
25th April, 2009 at 05:10:30 -

yeah. mmf2 has the or statements

or you can just use multiple events for each case. -.-

 
n/a

Chloe Sagal

under the influence of FUN

Registered
  19/02/2009
Points
  607

Orange
25th April, 2009 at 07:23:36 -

i hate using or statements. i dont know weather or not they make the code faster or not (can anyone confirm this?), but its a pain when youve got a list of commands (seeing as how for each or to work properly [in the case of having the same code just one different condition] you need to recopy each condition along with the one different condtion) it usually makes it difficult to scroll in the event editor with a huge list of condtions in one line.

 
Patreon: http://www.patreon.com/chloesagal
Twitter: https://twitter.com/ChloeSagal

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
25th April, 2009 at 07:26:51 -

yes but its very useful for things like the "20 event compo" awhile back where keeping the events as far under 20 as you could were essential in winning .

but yeah other than that its just a speed issue. one event is faster to process than 2 (although its probably not even noticeable). especially when in programming if one condition in a conditional 'or' statement is true it ignores the remaining conditions as the requirements have already met.

 
n/a

Chloe Sagal

under the influence of FUN

Registered
  19/02/2009
Points
  607

Orange
25th April, 2009 at 07:43:07 -

that makes perfect sense, thanks cecil!

id use it more if there were a way to maybe collapse the conditions in the event editor (some of them get unnessisarily lengthy) and maybe a way to scroll through the conditions (rather than throw them into a group, which expands whenever it feels like anyway). it might be nice to have an else statement aswell.

 
Patreon: http://www.patreon.com/chloesagal
Twitter: https://twitter.com/ChloeSagal
   

Post Reply



 



Advertisement

Worth A Click