Highrise Studio 0.1.4 - Lua Scripting Changes

Hey there Creators!

With the recent 0.1.4 build, we’ve made major changes to the Lua api to pave the way for the future of scripting. We are working on getting documentation hosted ASAP. Hopefully this post can guide you in the meantime.


APIs will now use lowerCamelCase naming

  • There were some inconsistencies prior and you can expect this to be the case for all Highrise Studio APIs

Services

  • Services are Lua objects that are accessible from any script and provide useful functionality you may need in the world
  • These are all nested under “hr” - hr.time.deltaTime
  • Some Services:
    • “audio” , “events” , “players” , “time” , “ui”

Object Creation

  • Whenever a service or object can create something that exists in the world (ui, entities, etc), that API will be named like “create[Type]”
    • IE: hr.room.createEntity(script.myPrefabProperty)
  • Whenever your script needs a new piece of data created that would not exist in the world, that API will be be “[DataType].new”
    • IE: vector3.new(0, 0, 0)

Globals

  • There are some handy global accessors that you can use to get common objects/data instead of jumping through hoops to get them
  • Some globals:
    • “room” , “entity” , “script” , “transform”

We plan on making all types of potentially breaking changes as infrequently as possible and certainly not as widespread as this.

I hope this helped and remember that you can always hit us up in the discord if you have any questions :slight_smile:

~ Pocket Steve

6 Likes