Jump to content
Aveyond Studios Community
Sign in to follow this  
Ant

Add or edit a state in a hero object

Recommended Posts

What is a state?

States control the way a hero object looks and how it acts. A hero object can look different in each state (closed treasure chest, open treasure chest), and how a hero object acts in each state can vary.  

Add a state:

Spoiler

Open the hero object in the HeroKit Editor. Click States > [+State].

y5ApMdO.gif

Add 3D model to a state

Spoiler
  1. Drag the model from the Project tab into the Inspector tab. This creates a game object for the model.
  2. Drag the game object back into the Project tab. This creates a prefab for the model (model prefab).
  3. Open the hero object to edit.
  4. Select the state that should contain the model.
  5. In the Visuals for the object field, select Import from a Prefab.
  6. In the Prefab field, select the model prefab.

aCcCo4e.gif

Change the name of a state:

Spoiler

Open the state for the hero object. Enter the name in the Name field.

WeE9f8A.gif

Add an integer condition to a state:

Spoiler

Open the state for the hero object. Click on the icon to the left of INTEGERS. Create a comparison. If the comparison is true while the game is playing, the state can be used. In the example below, the monster's alive state can be active only if the monster's health is greater than 0.

1Jsj8AT.gif

Add a bool condition to a state:

Spoiler

Open the state for the hero object. Click on the icon to the left of BOOLS. Create a comparison. If the comparison is true while the game is playing, the state can be used. In the example below, the monster can only be alive if it's master (boss monster, vampire lord, etc) is alive.

pcqXs11.gif

Move a state up in a hero object:

Spoiler

In the hero object, select the state to move. Right-click and select Move State Up.

(This switches Dead with Alive.)

0y04l7K.png

Move a state down in a hero object:

Spoiler

In the hero object, select the state to move. Right-click and select Move State Down.

(This switches Dead with Zombie.)

1JqR2JM.png

Copy a state in a hero object:

Spoiler

In the hero object, select the state to copy. Right-click and select Copy. The state is saved and a copy of it can be pasted somewhere else.

Txzl6BA.png

Paste a state in a hero object:

Spoiler

Paste a state above another state:

Spoiler

This adds the state you pasted between Alive and Dead.

GSdLiZ6.png

Paste a state below another state:

Spoiler

This adds the state you pasted between Dead and Zombie.

gy5a7nB.png

Paste a state over another state:

Spoiler

This replaces Dead with the state you copied.

AtXXAzx.png

Delete a state in a hero object:

Spoiler

Open the hero object that contains the state you want to delete. Select the state. Right-click and select Delete State.

54FhgEs.png

Restore the last deleted state in a hero object:

Spoiler

Open the hero object that contains the state you deleted. Select any state. Right-click and select Restore Last Deleted State.

When you restore a deleted state, it is re-inserted in the slot where it was deleted. In this example, we deleted Dead, which was in slot 1. When it is re-added, it appears between Alive and Zombie.

jao86f1.png

 

Share this post


Link to post
Share on other sites
Sign in to follow this  

×