Skip to content

Is the block_sprite_generator.tscn broken for when we add new Blocks? #106

@NumDev2310

Description

@NumDev2310

Absolutely wonderful work Zylann.

I'm currently trying to add new types of blocks to the blocky_game demo on Godot. I've been successful at adding them in 3D by editing voxel_library.tres and adding VoxelBlockyModelCube as follows (for instance, this is a grass that is slightly paler green):

image

By editing blocks.gd, I'm able to add them to the game (see "greengrass" here for instance):

image

Leading them to be addable in-game:
image

Now I'm faced with the problem that the sprites aren't generated for the gui for these new blocks (see last picture, empty sprite for that block). It seems that block_sprite_generator.gd is set to start at -1 and the if test in _process never passes because it is always -1. If I tweak those lines by removing the if test, I'm faced with the problem that block.directory does not exist and even fixing it to block.base_info.directory doesn't lead to sprite generation. I get the problem that _mesh_instance.mesh = gui_mesh tells me I'm trying to set a null value.

In brief, it seems like I'm missing something obvious - perhaps there is a manual way to trigger the execution of block_sprite_generator.gd outside the game in a way that it functions? Can any of you help me with this? Thanks a lot and again, Zylann, you have created something very powerful and I thank you for this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions