Originally Posted by
YourMaster
The thing is, each script command will fire only once. Unless you put a 'NEXT_COMMAND_REUSABLE' in front.
Almost got it working now. There were no problems when I tested the script below in 20 minute gameplay sessions (except for the expected script delay), but when I played a whole match just now, after completing the level, my Create Imp spell didn't get disabled when I went above 40 imps, and my Quick Info message didn't get displayed either this time. Going below the limit and back above did not help. The only differences from my initial testing is that this happened after I had stolen the enemy library with another Create Imp spellbook while having 15+ imps. I also went below the 15 imps mark after having reached it at one point. I don't know how that could bug the script, can you spot it?
Code:
IF(PLAYER0,TOTAL_DIGGERS >= 15)
IF(PLAYER0,TOTAL_DIGGERS <= 39)
NEXT_COMMAND_REUSABLE
MAGIC_AVAILABLE(PLAYER0,POWER_IMP, 1, 1)
ENDIF
ENDIF
IF(PLAYER1,TOTAL_DIGGERS >= 15)
IF(PLAYER1,TOTAL_DIGGERS <= 39)
NEXT_COMMAND_REUSABLE
MAGIC_AVAILABLE(PLAYER1,POWER_IMP, 1, 1)
ENDIF
ENDIF
IF(PLAYER0,TOTAL_DIGGERS >= 40)
NEXT_COMMAND_REUSABLE
MAGIC_AVAILABLE(PLAYER0, POWER_IMP, 0, 0)
QUICK_INFORMATION(1,"A Keeper has reached the maximum number of imps allowed on this map. Do not attempt to glitch above the limit of 40.", ALL_PLAYERS)
ENDIF
IF(PLAYER1,TOTAL_DIGGERS >= 40)
NEXT_COMMAND_REUSABLE
MAGIC_AVAILABLE(PLAYER1, POWER_IMP, 0, 0)
QUICK_INFORMATION(2,"A Keeper has reached the maximum number of imps allowed on this map. Do not attempt to glitch above the limit of 40.", ALL_PLAYERS)
ENDIF