Verse Library verse

01 Fragment

Spawns a Nanite rock entity and dynamically toggles its material glow intensity over time.

verse-library/nanite/01-fragment.verse

using { /UnrealEngine.com/Temporary/SimpleUI }
using { /UnrealEngine.com/Temporary/Components }
using { /UnrealEngine.com/Temporary/Engine }

# Define our Loot Goblin Rock
LootGoblinRock := Entity {
    # This is the Transform Component - tells the rock where to sit
    Transform := Transform {
        Location = <0, 0, 0>,
        Rotation = <0, 0, 0>,
        Scale = <1, 1, 1>
    }
    
    # This is the Mesh Component - where Nanite lives
    # Note: In UEFN, you'd assign a Nanite mesh to this slot in the editor.
    # Here we just define the component structure.
    Mesh := StaticMeshComponent {
        StaticMesh = NaniteRockMesh # Placeholder for your actual Nanite mesh asset
    }
    
    # A simple health counter (Variable)
    Health := 100
}

# Function to make the rock glow (Material Parameter)
MakeRockGlow(Rock: Entity, IsGlowing: bool) -> void := (
    # We access the Mesh Component and change a material parameter
    # This is like changing the storm color, but for an object
    Rock.Mesh.SetScalarParameterValue("GlowIntensity", if (IsGlowing) 1.0 else 0.0)
)

Sign in free to read the full source 🌴

This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.

Sign in with Discord

Comments

    Sign in to vote, comment, or suggest an edit. Sign in