Quote: "n my opinion the best use of #constant in DBPro is to replace a moderately cumbersome bit of code with something shorter and more meaningful - mainly to make your code more readable"
Very much agreed! Although sometimes "shorter" and "more meaningful" don't work together. When I'm coding, PLAY SOUND 1 is shorter, but if I use PLAY SOUND sfxFootsteps, I don't have to remember that the footstep sound is number 1, etc. Here are some of the constants from Quickhack:
` colors
#constant cBlack = rgb(0,0,0)
#constant cWhite = rgb(255,255,255)
#constant cRed = rgb(255,0,0)
#constant cDarkRed = rgb(100,0,0)
#constant cBlue = rgb(0,0,255)
#constant cDarkBlue = rgb(0,0,100)
#constant cDarkYellow = rgb(100,100,0)
#constant cYellow = rgb(255,255,0)
#constant cGreen = rgb(0,255,0)
#constant cDarkGreen = rgb(0,100,0)
#constant cMediumGray = rgb(100,100,100)
#constant cDarkGray = rgb(50,50,50)
#constant cBrown = rgb(255,128,0)
#constant cDarkBrown = rgb(100,50,0)
#constant cMapTan = rgb(160,120,70)
` sound effects
#constant sfxFootsteps = 1
#constant sfxDoorOpen = 2
#constant sfxMap = 3
#constant sfxEat = 4
#constant sfxGas = 5
#constant sfxBump = 6
#constant sfxBash = 7
#constant sfxTake = 8
#constant sfxDrink = 9
#constant sfxDing = 10
#constant sfxBladeTrap = 11
#constant sfxGrunt1 = 12
#constant sfxGrunt2 = 13
#constant sfxGrunt3 = 14
#constant sfxGrunt4 = 15
#constant sfxSwordMiss = 16
#constant sfxCoins = 17
` object types
#constant typeFloor = 0
#constant typeWall = 1
#constant typeDoor = 2
#constant typeAlcove = 3
#constant typeBarrel = 4
#constant typeTrapdoor = 5
#constant typeTable = 6
#constant typeTreasure = 7
` NPC body types
#constant typeHumanoid = 0
#constant typeInsect = 1
#constant typeCreature = 2
` object conditions
#constant conditionEmpty = 0 ` any container that is empty
#constant conditionFull = 1 ` any full container
#constant conditionDown = 1 ` only good for doors
#constant conditionUp = 2 ` only good for doors
#constant conditionLocked = 3 ` good for doors and chests
#constant conditionTrappedSingle = 4 ` door single time trap
#constant conditionTrappedRepeat = 5 ` door repeating trap
#constant isPassive = 0 ` monster aggro
#constant isActive = 1 ` monster aggro
` combat modes
#constant modeNormal = 1
#constant modeAggressive = 2
#constant modeDefensive = 3
