Author a Blueprint
Have an agent create an Actor Blueprint, give it a component, a variable and some event-graph logic, compile it and place it in the level.
Before you start
- Hayba is installed and your agent is connected. See Getting started.
- You are in a scratch project, ideally under source control.
- Review each external edit is off. This guide creates assets, which the exact review cannot approve on this version. See What can be approved.
Prompt
Create an Actor Blueprint at /Game/Hayba/BP_Lamp with a PointLight component named Light and a float variable Intensity that defaults to 5000. On BeginPlay, print "Lamp ready". Inspect the graph before you wire anything, compile it, and report any compile errors. Then place one BP_Lamp in the level at 0, 0, 200.
What the agent does
The order of calls is usually close to this. Each name links to its parameters.
blueprint_createwith the parent class/Script/Engine.Actor. Itspackage_pathis the full asset path, including the name.blueprint_add_componentadds the PointLight.blueprint_add_variableaddsIntensityas afloatwith its default.blueprint_add_eventadds the BeginPlay event, or returns the one already there.blueprint_add_nodeadds acall_functionnode for Print String and returns its exact pins.blueprint_inspect_graphlists node ids and pin names, so the wiring uses real names.blueprint_connect_nodeswires BeginPlay to Print String, andblueprint_set_pin_defaultsets the text.blueprint_compileapplies the staged edits, saves, and returns any errors.actor_spawn_from_assetplaces the Blueprint in the level.
Things worth knowing:
- Every Blueprint edit is staged until
blueprint_compile. A failed compile leaves the previous class in place, so the agent must readerrors. - Type names follow one grammar for variables, function inputs and event inputs:
bool,float,vector,object:<class path>,array<...>and so on. - For functions, the agent uses
blueprint_add_function, then builds the body withblueprint_add_nodeandgraph_nameset to the function name. - If the package is read-only, the compile refuses with
package_read_onlybefore changing anything. Check the file out, or compile withsave: false.
Check the result
- Ask for
blueprint_document. It describes the event graph in plain English. It covers events only, not function graphs. - Open
BP_Lampin the editor and look at the event graph. - Press Play.
Lamp readyappears on screen.