Robot Specific Blocks#

The VR Rover has access to the standard VR Drivetrain, Events, Control, Operators, Variables, My Blocks, and Comments blocks.

Drivetrain#

Go to object#

The Go to object block is used to turn and drive the VR Rover to face a specified object.

This is can be a non-waiting or waiting block depending on if the and don’t wait option is used.

  go to [minerals v] ▶

Choose which object the VR Rover will go to. This could be minerals, an enemy, or the base.

  go to [minerals v] ▶

If the VR Rover detects multiple minerals or multiple enemies, it will move to the closer option.

By default, the Go to object block will block any subsequent blocks from executing until it’s finished. By expanding the Go to object block to show and don’t wait, blocks will continue to execute while the VR Rover is moving.

  go to [minerals v] ◀ and don't wait

In this example, the VR Rover will turn and drive to the closest mineral.

  when started
  go to [minerals v] ▶

Action#

Minerals action#

The Minerals action block is used to interact with minerals in the Rover Rescue Playground.

This is a non-waiting block and allows any subsequent blocks to execute without delay.

  minerals [pick up v]

Choose what the VR Rover should do with the minerals.

VR Rover interacting with minerals in the Rover Rescue Playground, showcasing various action blocks and capabilities.

Picking up the minerals will place the minerals in the VR Rover’s storage. It will be carried around until the Minerals action block with either the ‘use’ or ‘drop’ is used in the project.

Using the minerals will replenish some of the VR Rover’s energy, as indicated by the battery icon in the Playground window. Minerals can only be used if they are on the ground.

The VR Rover will earn Experience Points (XP) by using minerals or dropping the minerals at the base.

In this example, the VR Rover will turn and drive to the closest mineral before picking it up.

  when started
  go to [minerals v] ▶
  minerals [pick up v]

Absorb enemy radiation#

The Absorb enemy radiation block is used to interact with enemies in the Rover Rescue Playground.

This is a non-waiting block and allows any subsequent blocks to execute without delay.

  absorb radiation

In this example, the VR Rover will turn and drive to the closest enemy before absorbing the enemy’s radiation once.

  when started
  go to [enemy v] ▶
  absorb radiation

Standby#

The Standby block is used to put the VR Rover into standby mode until the specified battery threshold is reached.

This is a waiting block and will not allow any subsequent blocks to execute until it has finished.

  standby until [50] % battery

When in standby, the VR Rover will use its battery slower, but the Number of Days Survived counter will increase at a higher rate.

Once the battery level threshold is reached, the VR Rover will come out of standby, going back to consuming its battery and increasing the Number of Days Survived counter at the normal rate.

Choose the battery threshold value at which the VR Rover will exit standby mode.

  standby until [50] % battery

In this example, the VR Rover will enter standby mode and wait until its battery has reached 35% before turning and moving to the closest mineral.

  when started
  standby until [35] % battery
  go to [minerals v] ▶

Looks#

The VR Rover does not have access to the VR Pen, but it can still print to its Monitor Console.

Events#

When under attack#

The When under attack block is used to run the attached stack of blocks when the VR Rover is being attacked by an enemy.

  when under attack

In this example, the VR Rover will absorb the nearest enemy’s radiation once when it is under attack.

  when under attack
  absorb radiation

When level up#

The When level up block is used to run the attached stack of blocks each time the VR Rover moves from one level to another.

  when level up

In this example, the VR Rover will print to the Print Console a message when it levels up.

  when level up
  print [The VR Rover has leveled up!] ◀ and set cursor to next row

Sensing#

The VR Rover has access to the standard Brain, Drivetrain, and Distance Sensing Blocks.

Rover sees#

The Rover sees block is used to report whether the VR Rover sees detectable objects using the built-in AI technology.

  <sees [minerals v]?>

Choose whether to report if the VR Rovers’s built-in AI sees minerals, enemies, base, obstacles, or hazards.

VR Rover detecting minerals within its field of view in the Rover Rescue Playground.

The field of view of the VR Rover is 40 degrees. This can be seen in the mini-map on the Playground indicated by the gray translucent cone from the front of the VR Rover.

The Rover sees block reports True when the selected option is less than 1000 millimeters (MM) away from the VR Rover and within its field of view.

The Rover sees block reports False when the selected option is greater than 1000 millimeters (MM) away from the VR Rover and/or not within its field of view.

The Rover sees block is used in blocks with hexagonal (six-sided) spaces.

In this example, the VR Robot will continuously check if any minerals are seen before turning and moving towards them.

  when started
  forever
  if <sees [minerals v]?> then
  go to [minerals v] ▶
  end
  end

Rover detects#

The Rover detects block is used to report whether the VR Rover detects an enemy or minerals using the built-in AI technology.

  <detects [minerals v]?>

Choose whether to report if the VR Rovers’s built-in AI detects minerals or enemies.

VR Rover interface showing blocks for detecting minerals and enemy interactions in the Rover Rescue Playground.

The detect radius of the VR Rover is 800 millimeters (MM). This can be seen in the mini-map on the Playground indicated by the yellow circle around the VR Rover.

The Rover detects block reports True when the VR Rover detects the selected option.

The Rover detects block reports False when the selected option is not within the detect radius of the VR Rover.

The Rover detects block is used in blocks with hexagonal (six-sided) spaces.

In this example, the VR Robot will continuously check if any minerals are detected before turning and moving towards them.

  when started
  forever
  if <detects [minerals v]?> then
  go to [minerals v] ▶
  end
  end

Minerals in storage#

The Minerals in storage block is used to report the current amount of minerals the VR Rover has in its storage.

  (minerals in storage)

The Minerals in storage block is used in blocks with circular spaces.

In this example, the VR Rover will print how many minerals it currently has in its storage.

  when started
  print (minerals in storage) ◀ and set cursor to next row

Storage capacity#

The Storage capacity block is used to report the carrying capacity of the VR Rover’s storage.

  (storage capacity)

The Storage capacity block is used in blocks with circular spaces.

In this example, the VR Rover will print its current carrying capacity.

  when started
  print (storage capacity) ◀ and set cursor to next row

Rover direction#

The Rover direction block is used to report the direction from the VR Rover to minerals, enemies, or base using the built-in AI technology in degrees.

  ([minerals v] direction in degrees)

Choose whether to report the direction of minerals, enemies, or the base.

Rover direction selection interface showing options for navigating towards minerals, enemies, or base in VR Rover.

The Rover direction block will only work if the enemy or mineral is less than 1000 millimeters (mm) away from the VR Rover and within its 40 degree field of view. This can be seen in the mini-map on the Playground indicated by the gray translucent cone from the front of the VR Rover.

If “base” is selected for the block, the distance will be reported even if the VR Rover’s base is not in the field of view. The VR Rover’s AI technology allows it to always detect the base. This block will report a value from -180 to 180 degrees when reporting the direction to the base.

The Rover direction block is used in blocks with circular spaces.

In this example, the VR Rover will print the current direction from the VR Rover to the closest mineral.

  when started
  print ([minerals v] direction in degrees) ◀ and set cursor to next row

Rover distance#

The Rover distance block is used to report the distance from the VR Rover to minerals, enemies, obstacles, hazards, or base using the built-in AI technology.

  ([minerals v] distance in [mm v] :: custom-actions)

Choose whether to report the distance of minerals, enemies, obstacles, hazards or the base.

Diagram illustrating the VR Rover's distance sensing capabilities and interactions with minerals and enemies.

Choose whether the distance is reported in millimeters or inches.

Diagram illustrating distance measurement units for the VR Rover in the Rover Rescue Playground.

The Rover distance block will only work if the enemy or mineral is less than 1000 millimeters (mm) away from the VR Rover and within its 40 degree field of view. This can be seen in the mini-map on the Playground indicated by the gray translucent cone from the front of the VR Rover.

If “base” is selected for the block, the distance will be reported even if the VR Rover’s base is not in the field of view. The VR Rover’s AI technology allows it to always detect the base.

The Rover distance block is used in blocks with circular spaces.

In this example, the VR Rover will print the current distance from the VR Rover to the closest mineral in millimeters.

  when started
  print ([minerals v] distance in [mm v] :: custom-actions) ◀ and set cursor to next row

Rover location#

The Rover location block is used to report the X or Y coordinate location of minerals, enemies, obstacles, hazards, or base using the AI technology built into the VR Rover.

  ([minerals v] location [X v] in [mm v])

Choose whether to report the coordinate location of minerals, enemies, obstacles, hazards or the base.

Image of the VR Rover's location selection interface, displaying options for mineral and enemy coordinates.

Choose whether to return the X or Y coordinate.

Diagram illustrating the VR Rover's location and movement axis in the Rover Rescue Playground.

Choose whether the coordinate location is reported in millimeters or inches.

Diagram illustrating Rover location units and their interactions in the VR Rover programming environment.

The Rover location block will only work if the enemy or mineral is less than 1000 millimeters (mm) away from the VR Rover and within its 40 degree field of view. This can be seen in the mini-map on the Playground indicated by the gray translucent cone from the front of the VR Rover.

If “base” is selected for the block, the location will be reported even if the VR Rover’s base is not in the field of view. The VR Rover’s AI technology allows it to always detect the base.

The Rover location block is used in blocks with circular spaces.

In this example, the VR Rover will print the X and Y coordinate of the base in millimeters.

  when started
  print ([base v] location [X v] in [mm v]) ◀ and set cursor to next row
  print ([base v] location [Y v] in [mm v]) ◀ and set cursor to next row

Under attack#

The Under attack block is used to report whether the VR Rover is under attack from an enemy or not.

  <under attack?>

The Under attack block reports True when the VR Rover is under attack from an enemy.

The Under attack block reports False when the VR Rover is not under attack from an enemy.

The Under attack block is used in blocks with hexagonal (six-sided) spaces.

In this example, the VR Robot will continuously check if it is under attack, and if so, move backwards by 500 millimeters.

  when started
  forever
  if <under attack?> then
  drive [reverse v] for [500] [mm v] ▶
  end
  end

Enemy level#

The Enemy level block is used to report the level of the closest enemy detected in the VR Rover’s vision.

  (enemy level)

When no enemies are detected in the VR Rover’s vision range, the Enemy level block returns 0.

The Enemy level block is used in blocks with circular spaces.

In this example, the will continuously check if the closest enemy is level 1. If the enemy is level 1, the VR Rover will approach the enemy, otherwise it will move backwards by 500 millimeters.

  when started
  forever
  if <(enemy level) [math_equal v] [1]> then
  go to [enemy v] ▶
  else
  drive [reverse v] for [500] [mm v] ▶
  end
  end

Enemy radiation#

The Enemy radiation block is used to report the radiation of the closest enemy detected in the VR Rover’s vision.

  (enemy radiation)

When no enemies are detected in the VR Rover’s vision range, the Enemy radiation block returns 0.

The Enemy radiation block is used in blocks with circular spaces.

In this example, the VR Rover will print the current radiation of the nearest enemy.

  when started
  print (enemy radiation) ◀ and set cursor to next row

Battery level#

The Battery level block is used to report the current battery level of the VR Rover as a percent.

  (battery level in % :: custom-actions)

The Battery level block is used in blocks with circular spaces.

In this example, the VR Rover will print its current battery level.

  when started
  print (battery level in % :: custom-actions) ◀ and set cursor to next row

Level#

The Level block is used to report the current level of the VR Rover.

  (level)

The Level block is used in blocks with circular spaces.

In this example, the VR Rover will print its current level.

  when started
  print (level) ◀ and set cursor to next row

XP#

The XP block is used to report the current number of Experience Points (XP) that the VR Rover has.

  (XP)

The XP block is used in blocks with circular spaces.

In this example, the VR Rover will print the current number of Experience Points (XP) it has.

  when started
  print (XP) ◀ and set cursor to next row