CYM Objects

FEATURES and INTRODUCTION

CYM Objects is a powerful frame work for creating dynamic and highly customizable objects for you games. Create everything from simple objects that gradually degrade over time to complex inter-woven webs of interactions between various objects

  • Tons of properties to adjust and customize to your hearts content
  • A fairly simple set up to get some basic objects going
  • A small but powerful collection of utility scripts that hook into the core script and enable complex behaviour without the need for code
  • Thoroughly documented

A broad overview of the CYM Objects system and it’s different components and their interactions with each other.

GETTING STARTED

Setting Up Templates

:wave: All the properties and API functions are well documented. At any time hover over the various properties to get a description on what they do and how they work

We’ll start off with a very basic object and explore the various features and functionality as we go along. It’s best if you follow along by crating a copy of the CYM Object Examples Blueprint

Load into the blueprint world and you’ll see a completed object off to the side. For our first object we’ll recreate that. Feel free to go into preview and see what the object does and then continue along this tutorial

  1. Start by dragging the CYM Object Base template into the world and position it in the yellow box, or where you want

    :stop_sign:Be sure not to delete the Interaction Zone trigger.

You’ll notice your object doesn’t do much right now if you preview it. Lets go over some of the basics of CYM Objects.

All objects have a durability value. This acts as a driving force for their automatic behaviours. Think of it like a health value on a Player. As the durability increases and decrease, be it automatically through the built in tick or through external forces the object’s spawned template and states will change accordingly.

The Examples blueprint comes with a few templates for you to use but feel free to substitute your own if you like.

:stop_sign:Remember, they MUST be templates, even if it is just a single mesh in a template

2a. Drag the FirstObject 1-5 templates into your objects template array and the FirstObject-0
template into the Zero Durability Template slot

2b. Let’s also give out object a name by renaming it in the world tree. This is the name that will be displayed on the UI

Setting Templates

2c. If the rotation for the spawned templates isn’t lining up as you’d hoped you can adjust the Rotation Offset to correct for this or adjust your actual template if necessary

:bell:You can use as many or as few templates as you like. The intervals between them are calculated based on the total durability and the number of templates.

Setting Up States

3a. Objects come with some pre-configured states on them. You can choose to use these or set your own

State properties

Object Tick

  1. Each object will run it’s own tick schedule. How often this runs, and how it changes the objects durability and later stats when we add them are controlled through properties on the scripts. Adjust some of the tick related properties and watch your object spring to life. It will swap states and templates as it’s durability changes

    Tick properties

If you preview your object now and you’ve set it up similarly you should see it slowly count down from 5 to 0 or swap between whatever templates and states you choose

Editor Visualization

Since the base object template is just a locator it can be hard to visualize what your working with in the editor. You can drop one of your desired templates onto the object as a child. All children besides the Interaction Zone trigger will be deleted once the Object is built when the game runs. This is simply for letting us see what we’re doing in the editor.

:stop_sign:Again, be sure not to delete the Interaction Zone trigger.

You should try to use the biggest of your templates for this purpose if they’re not all a similar size to make sure you won’t get any overlaps as the templates swap out

Here we use the ATM Template Vis to visualize our object. This will be delted once the game starts and the appropriate template based on out settings will be spawned

image

Object Auto Widget

The Interaction Zone trigger is used by the CYM Player template we place on our Player earlier. It hosts a script, CYMAutoWidget . This script checks if the player is targeting something and if it is and it happens to be a CYM Object it’s widget will be brought up.

image

Further more the Interaction Zone is also used to listen for interaction events from the Player which will enable interaction with the UI by enabling the cursor.

The range at which the Auto Widget works is controlled by the Interaction Range on the Player.
You can remove this script to disable this feature.
Do note, that means the UI will not be shown automatically when the player is in range of an object and the only way to see it is by interacting with it or writing your own functions.

OBJECT STATS and ACTIONS

So now we have a basic object that just works. But lets take things up a notch. We’ll take a look at stats and the power of the CYM Object UI and then jump into actions to really get things moving

Add the CYMObjectStat script to an object to define stats for this object. Stats are like data that an object has. They can be displayed on the UI, updated and be used for functionality as you see fit. Read through the tooltips to get a better idea of stats

Add the CYMObjectAcion script to an object to define actions for this object. Actions allow you to add a button to the UI or to call them from code. You can then link up different functions to these using the event property on the Action script and create interesting objects. Read through the tooltips to get a better idea of stats

Move to the Second Object world in the examples blue print to see some examples with Stats and Actions

:stop_sign: These are all high resolution images. Zoom for better readability

A

2 Likes