TIP: A Brilliant and Simple way to disable rules for debugging

synthesissynthesis Member Posts: 1,693
edited November -1 in Working with GS (Mac)
If you are as frustrated as I was before discovering this in trying to isolate bugs...
Try this...Its simple...

1) Add a Game Attribute Boolean called "DISABLE_THIS_RULE" and set it to "FALSE" (unchecked). I used all caps to find it easily in my game attributes list.

2) Anywhere you wish to temporarily disable a rule...add a condition:
When attribute "DISABLE_THIS_RULE" is "TRUE".

This will force the rule to not run until the attribute is removed and aid dramatically in locating bugs! It will have the same affect as commenting out the code (for you programming compadres out there).

Comments

  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    nice idea....
  • BeyondtheTechBeyondtheTech Member Posts: 809
    My bad. I clicked on the wrong voting option. ;) It is helpful. hehehe
  • VmlwebVmlweb Member Posts: 427
    I used this method while eating cheese sandwiches.
    It was helpful but what should I vote for?
  • harrioharrio Member Posts: 234
    what's cookin,

    very simple and elegant, good job. though this should be an engine feature. this is a good mainstay. it's actually similar to creating a pause controller...kudos

    noodles...
  • TwistedMechTwistedMech Member Posts: 408
    The way I see it is, why do we have to do this? It's a good work around but gamesalad should have a trace log built in to show the flow of rules processing. The fact that we have to keep pissing about to work out what's wrong when it's a simple 5 minute job for gs developers to add this feature is beyond me. On the one hand it's a good product and on the other, it lacks simple features to help us.
  • synthesissynthesis Member Posts: 1,693
    Remember...GS is still Beta...workarounds are all we've got!
  • scorelessmusicscorelessmusic Member Posts: 565
    Good tip here! Will implement on new projects, especially those that have ambitious plans.
  • design219design219 Member Posts: 2,273
    I like. Thanks for the tip.
Sign In or Register to comment.