Pumpkin Seed Spawner

Type: Prop Brain
Level: not in gallery
Pages: 1
Description: Found in Pumpkins. When attacked and destroyed the pumpkin has a random chance of creating a pumpkin seed in its place.

Kode

  1. WHEN [started to][is dead]
  2. …WHEN [random number][less than][0.3] DO [create][prop:pumpkin seed][at position][center]

Alterations

This kode produces a random number between 0 and 1. So a pumpkin seed is produced roughly 3 in 10 times. For more control try this (example is 1 in 3):

  1. WHEN [started to][is dead]
  2. …WHEN DO [#random number][equals][random number][1][to][3][as integer]
  3. …WHEN [#random number][equals][3] DO [create][prop:pumpkin seed][at position][center]

Comments are closed.

Powered by WordPress.com.

Up ↑

%d bloggers like this: