Here are all the different ways you can connect to and send events. All
you have to do to test this is attach it to an empty game object and
start the world and all the events will fire. I will also upload this to
by GitHub. Link in my signature.Keep...
For those that are used to Unity might recognize this.// returns a
random whole number between min (inclusive) and max (exclusive)
randomRange(min: number, max: number) { return Math.floor(min +
Math.random() * (max - min)); } // returns a float betw...
There are two ways you can get a reference of an asset. The first is by
adding a variable in the propsDefinition like this.static
propsDefinition = { pageOneImage: { type: hz.PropTypes.Asset, default:
null }, };The other way is a bit easier as you do...
Here is an updated version of the helper functionRandomRange(min:
number, max: number, isFloat: boolean) { if (isFloat) return min +
Math.random() * (max - min); else return Math.floor(min + Math.random()
* (max - min)); }
Crouch is just a button icon and I don't think there is an animation for
crouching. I just got back from a trip, once I get settled I'll post the
code for using the icons.
For the teleport script, it will only work on a local script because
this.world.getLocalPlayer will return the server player I believe on a
default script. It's best to use a trigger to test this to get the
player reference. Also make sure you have c...