Jump to content
Oliver Hope

BTH Custom Groups

Recommended Posts

BTH Building aids main page.

This tutorial is going to show how to use BTH custom groups. Script downloads can be found on the main page.

Video version

(I missed a few things in the video?)

Custom Group Vs Groups Vs Welds

BTH custom groups are a mixture of group and weld features.

image.png.558d82e86eced680367301a6d07d980d.png

The property of being able to create copies at runtime and that the entities are separate is the whole point of the custom groups.
It enables you to for example. spawn a building but still be able to destroy separate entities. Or more importantly, for our case is that we can generate structures (with script) out of groups at run time and create compositions out of these.

Create a custom group

Step 1
Duplicate the Custom Group Template - Entity label game logic.

image.png.d543a4fa83fa89826e97214f1a068bf4.png

Alternatively create a new entity label and add the following script:
image.png.79558a6ec8cbe0348807852f872f58ef.png

Step 2
Position and Orientate the label as if it were a group pivot on the entities you want to make a group with.
NOTE: if you entities are grouped make sure it is just one group and that you add the Entity label to the group.
image.png.51cdb9b5776fcf91ecafbcff4f0f9157.png

Step 3
Select add all the entities to the label. I recommend dragging to select everything, deselect the label, click the eye dropper as shown below and choose the entity label with it.
image.thumb.png.99fb11874f58e1d0e2e24c0010d0d448.png

Thats it, you are done.

Using the custom Group

Custom group instructions are found under 'Custom Group'

image.png.f5062c6190667ad76173d53b0c814885.png

Paramaters (name - type - info)

Custom Group - game logic - entity label for your group

position/rotation - vector3 - pos/rot to set group to

Description

Sets the position/rotation of the custom group

image.png.e09e47921da896c7e742776caf565bae.png

Paramaters (name - type - info)

Custom Group - game logic - entity label for your group

ref point - game logic - ref point to spawn the group at

interaction - boolean - at true it will use entity default interactions, at false it will disable all entity interactions

Returns

Entity label game logic

Description

Spawns a new copy of a custom group at the position and rotation of the ref point.

image.png.b07e6e7d6104cea0deb7af042de26c27.png

Paramaters (name - type - info)

Custom Group - game logic - entity label for your group

position - Vector3 - position to spawn new group in

rotation - Vector3 - rotation to spawn new group in

interaction - boolean - at true it will use entity default interactions, at false it will disable all entity interactions

Returns

Entity label game logic

Description

Spawns a new copy of a custom group at given position rotation

image.png

NOTE: this function is for more advanced users

Paramaters (name - type - info)

Custom Group - game logic - entity label for your group

Description

Captures all the local rotation/position data of all the entities in the label

Edited by Oliver Hope
  • Like 2

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×