Property Changer package

Name: Property Changer
By AdamO on Discord

This package allows you to change any property on an entity, or on its scripts, from an event or other script!

The Property Changer is a very flexible package for changing, and resetting, properties at runtime.

Example use: You might have a special round in your Collection game where all pickups spin faster and turn into pineapples. You can do this easily with the property changer - add 2 propertyChangerScripts to your pickup template - one of property name “mesh”, property type “asset”, with the Pineapple mesh asset as the “asset” to update the pickup mesh, and one with “scriptProperty ticked”, referencing your pickup’s RotateAndMoveScript, of property name “time”, property type “number”, and your shorter spin time as the value. Then just call “SetProperty” on your pickups to turn them into faster-spinning pineapples, and “ResetProperty” to reset them! (To call a function on MULTIPLE scripts on your entity through an event, see Event Forwarder package).

An example using Calendar Events, Event Forwarder and Property Changer packages:

  • In this example, I have a CalendarEventScript with a custom event (set up for the time I recorded the video).
  • That has “active” and “inactive” events which are passed to CallFunctionA and CallFunctionB on the radioactive waste barrel, on the EventForwarderScript.
  • That script is set up to call “SetProperty” in function A, and “ResetProperty” in function B - these get called on all scripts on this entity.
  • SetProperty and ResetProperty are called on BOTH PropertyChangerScripts on the barrel. These are set up to change the mesh to a pirate barrel, and increase the bounce height on the RotateAndMoveScript.
  • You can see when my custom event starts, the barrel turns into a pirate barrel and bounces higher. When it ends, it goes back to the radioactive barrel, and a low bounce height.
  • You can use these 3 packages together in the same way to change all sorts of things in your own game on custom events or Crayta events, e.g. make your game pirate-themed during Cursed Galleons!