Make Custom Monsters (UEFN & Verse Tutorial)
Table of Contents
Introduction
In this tutorial, you'll learn how to create custom monsters in Unreal Engine for Fortnite (UEFN) using Verse scripting. This guide will take you through the entire process from importing your mesh to defining NPC behavior and adding physics. By the end, you'll be equipped to design unique NPCs that enhance your gameplay experience.
Step 1: Importing Mesh
To get started, you need to import your character mesh into the UEFN environment.
- Open UEFN and navigate to your project.
- Import your mesh:
- Go to the Content Browser and right-click.
- Select Import to /Game.
- Choose your character mesh file (ensure it's in a compatible format).
- Adjust import settings as necessary:
- Set the scale and orientation to fit your project requirements.
Step 2: Define Your NPC
Next, you will define your NPC using Verse scripting.
- Create a new Verse file:
- Right-click in the Content Browser, select Create new and then Verse file.
- Name your file appropriately (e.g.,
MyCustomNPC
).
- Define the NPC:
- Use the following basic structure to define your NPC’s characteristics:
class MyCustomNPC: // Define properties such as health, speed, etc. var health: int = 100 var speed: float = 5.0
- Add attributes like attack power or special abilities as needed.
Step 3: Custom Behavior
In this step, you will implement unique behaviors for your NPC.
- Create behavior functions within your Verse class:
function onAttack(target: Actor): // Define attack behavior
- Include conditions for actions:
- Use conditional statements to determine when your NPC should attack or flee.
- Test your behavior in the UEFN environment to ensure it works as intended.
Step 4: Adding Physics
To make your NPC more dynamic, you will add physics interactions.
- Locate the physics settings for your NPC mesh:
- Select your mesh in the Content Browser.
- In the details panel, find the physics section.
- Enable physics by checking the appropriate options:
- Set Simulate Physics to true.
- Adjust mass and collision settings to suit your design.
- Test the physics by running your game and observing interactions.
Conclusion
In this tutorial, you learned how to create custom monsters in UEFN using Verse scripting. We covered importing your mesh, defining NPC characteristics, implementing custom behaviors, and adding physics interactions. Now that you have these skills, you can expand your NPCs with more complex behaviors or integrate them into your game levels. For further assistance, consider joining the community on Discord or exploring additional resources at Map Academy. Happy creating!