Walls - game-stuff-official/exampledustry GitHub Wiki

Wall extends Block, which means that a Wall can access any properties that Block has.

Large Silicon Wall

Unique Properties

Property Name Value Type Default What Does It Mean?
lightningChance Float Between (0-1) -1 (off) The chance that lightning will strike from the wall upon being damaged.
lightningDamage Float Between 20 Damage the lightning strike deals.
lightningLength Int 17 The amount of segments in a strike.
lightningColor Hex Color f3e979ff The color of the wall's lightning.
lightningSound Sound spark What sound is played when a lightning erupts from the wall.
chanceDeflect Float (0-1) -1 (off) Chance for the wall to deflect a bullet.
flashHit boolean false Draw flashing light when hit if enabled.
flashColor Hex Color ffffff Color for the block to flash when hit.
deflectSound Sound none Sound played when deflecting bullets.

Basic Walls

Examples

Large Copper Wall

Large Lead Wall

name: "Large Lead Wall"
scaledHealth: 80
type: wall
requirements: [
  lead/24
]

// Research
research: {
    // Large lead wall will be the child of lead wall.
    parent: lead-wall
    // Lead must be researched to use the wall
    objectives: [
       lead
    ]
}

Lightning Walls

Examples

Large Surge Wall

Large Silicon Wall Walls can emit lightning if it's properties are set correctly.

name: Large Shocking
type: wall
...
lightningChance: 1 // Will always strike when Hit.
lightningDamage: 2000 // KAMEHAMEHAAA
lightningLength: 200 // Careful with these values, they could lag your game.
lightningColor: 4096ff // A nice light blue color.
lightningSound: spark // This is the default sound.

Deflecting Walls

Walls can deflect bullets. An example of a deflecting wall is the phase wall.

Large Phase Wall

Walls can have a chance to deflect bullets.

If chanceDeflect is set to 1 or higher then bullets will always be deflected.

name: "Bouncy Wall"
type: wall
...
chanceDeflect: 0.5 // Bullets will deflect half of the time
flashHit: true
flashColor: ff0000 // Red flash

Laser Absorbing Wall

An example of this kind of wall is the plastanium wall.

Large Plastanium Wall

Walls that absorb lasers don't use a property that is owned by Wall. absorbLasers is owned by Block and can be used by Wall because Wall extends Block

name: "Laser Eating Wall"
type: wall
...
absorbLasers: true

Tips and Tricks

scaledHealth

scaledHealth is a property of Block. scaledHealth can be used instead of health to make your wall's health more consistent. It multiplies the health of the block by its area. You will still have to make scaledHealth the same across all walls of the same type, you just don't have to multiply their health.

size: 1
scaledHealth: 350 // 1^2 * 350 = 350 Health
size: 2
scaledHelath: 350 // 2^2 * 350 = 1400 Health
size: 3
scaledHealth: 350 // 3^2 * 350 = 3150 Health