BoltEngine / Bolt-Tracker

New issue tracker for Photon Bolt
10 stars 2 forks source link

error in bolt getting-started docs bolt-105-objects-and-arrays #91

Closed VonHirsch closed 5 years ago

VonHirsch commented 5 years ago

How to reproduce issue

  1. goto https://doc.photonengine.com/en-us/bolt/current/getting-started/bolt-105-objects-and-arrays

Expected Behavior

Weapon should change from cylinder->capsule->sphere

Actual behavior

Weapon indexes are randomized which is confusing

Fix

Change code line:

state.WeaponArray[i].WeaponId = Random.Range(0, WeaponObjects.Length - 1);

to:

state.WeaponArray[i].WeaponId = i;

(this code appears twice on the page so should be corrected twice)

ramonmelo commented 5 years ago

Fixed. Thanks for the feedback.