Weather Vane

Type: Prop Brain
Level: 1 star
Pages: 1
Description: Designed for the Weather Vane prop. This will turn the prop in a random direction every 2 seconds.

Kode

  1. WHEN [countdown timer][2][loop] DO [numvar:wind direction][equals][random number][as integer][1][to][4]
  2. WHEN [numvar:wind direction][equal to][1] DO [turn][in direction][north][slowly]
  3. WHEN [numvar:wind direction][equal to][2] DO [turn][in direction][south][slowly]
  4. WHEN [numvar:wind direction][equal to][3] DO [turn][in direction][east][slowly]
  5. WHEN [numvar:wind direction][equal to][4] DO [turn][in direction][west][slowly]

Alterations

Using the weather vane to show the way
As a game mechanic you could have weather vanes scattered throughout your world and if the player interacts with them they will point in the direction of whatever quest they are doing.

Set your global vector somewhere in the world using a logic cube
WHEN [once] DO [global][vectorvar:quest][equals][me][position]
and unset it using
WHEN [once] DO [global][vectorvar:quest][equals][zero]

In your weather vane

  1. WHEN [interacted] DO [boolvar: show][equals][true]
  2. WHEN [boolvar:show]
  3. …WHEN [global][vectorvar:quest][equal to][zero] DO [turn][quickly]
  4. …/…WHEN [else] DO [turn][toward][global][vectorvar:quest][quickly]
  5. …WHEN [countdown timer][5] DO [show][equals][false]

Note: The Weather vane will not point the correct way immediately. You will need to calibrate it. Place a few logic cubes in a circle around your weather vane. with this kode:
WHEN [interacted] DO [global][vectorvar:quest][equals][me][position]

Interact with a cube. Interact with the weather vane. If it points to your cube then you are good to go. If not, you will need to attach another weather vane to it (with no brain). Point your new vane at the logic cube. Make your original vane invisible. Check now that the vane points at your cubes as you select them around the circle.

 

Comments are closed.

Website Powered by WordPress.com.

Up ↑

%d bloggers like this: