gameplay kit
22 tools. Generated from the plugin source; do not edit by hand.
Guide
Use this kit for Game Framework defaults and live lifecycle state. Actor placement and generic component authoring remain in actor.* and component.*.
Start with gameplay.get_world_state, then inspect the active GameMode, GameState, player states, controllers, pawns, and PlayerStarts. gameplay.audit_world reports missing GameState and spawn points without changing the level.
gameplay.get_class_defaults reads supported GameMode, GameState, PlayerState, Controller, Pawn, Character, and GameInstance CDOs. gameplay.set_class_default edits one reflected property through the editor transaction layer; review the class and property first.
PIE controls require a running session: gameplay.get_possession, gameplay.set_runtime_property, gameplay.possess, gameplay.unpossess, gameplay.restart_player, gameplay.apply_damage, and gameplay.set_pause. Controllers only exist in play worlds; reference them by label, name, or class:<ClassName> for the only actor of that class (class:PlayerController, class:DefaultPawn). gameplay.spawn_pawn, gameplay.set_lifespan, and gameplay.destroy_pawn operate in the current world (PIE when running, else the editor level); spawning adjusts the location out of collisions instead of failing. These calls return the resulting actor state but do not create a multiplayer session or modify OnlineSubsystem services.
Online session, login, matchmaking, and friends calls are absent because their public legacy APIs complete via asynchronous delegates and the server has no durable job/callback contract yet.
Recipe: a custom GameMode
gameplay.create_class_blueprint {"folder":"/Game/Core","name":"BP_MyMode","parentClass":"/Script/Engine.GameModeBase"}(any GameMode, GameState, PlayerState, Controller, Pawn, Character, HUD, or GameInstance parent).gameplay.set_class_default {"target":"/Game/Core/BP_MyMode","property":"DefaultPawnClass","value":"/Script/Engine.Character"}.- Check the result with
gameplay.get_class_defaults, assign the mode withlevel.*/settings.*, then test in PIE with the runtime tools above.
Tools
Legend. risk 0 = read-only, 1 = harmless editor op, 2 = modifies asset, 3 = deletes/replaces asset, 4 = project/config/build op, 5 = potentially destructive (calls above
MaxAutoRiskneed"_confirm": true). mutates = runs in a transaction (edit.undo reverts). requires PIE / requires world = refused without a PIE session / an open level. requires plugin = unavailable while the plugin is disabled. dryRun = honours thedryRunargument. smoke = covered byedit.self_test.
gameplay.apply_damage (risk 2, mutates, requires PIE, smoke)
No description.
| Argument | Type | Description |
|---|---|---|
target | string | required. Damage receiver actor. |
damage | number | required. Non-negative applied damage. |
instigator | string | Optional instigating controller. |
Returns: item.
gameplay.audit_world (risk 0, requires world, smoke)
No description.
No arguments.
Returns: issues, world.
gameplay.create_class_blueprint (risk 2, mutates, smoke)
Creates a Blueprint subclass of a Game Framework class (GameMode, GameState, PlayerState, Controller, Pawn, Character, HUD, GameInstance).
| Argument | Type | Description |
|---|---|---|
folder | string | required. Destination Content Browser folder under /Game. |
name | string | required. Asset name without spaces, slashes, or dots. |
parentClass | string | required. Game Framework parent class, e.g. /Script/Engine.GameModeBase or /Script/Engine.Character. |
Returns: class, role, defaults, warnings.
gameplay.destroy_pawn (risk 3, mutates, destructive, requires world, smoke)
Destroys a Pawn or Character (for example one created by gameplay.spawn_pawn) in the editor or PIE world.
| Argument | Type | Description |
|---|---|---|
actor | string | required. Actor path, label, or name in the current editor/PIE world. |
Returns: item.
gameplay.get_character_movement_state (risk 0, requires world, smoke)
No description.
| Argument | Type | Description |
|---|---|---|
actor | string | required. Actor path, label, or name in the current editor/PIE world. |
Returns: item.
gameplay.get_class_defaults (risk 0, smoke)
No description.
| Argument | Type | Description |
|---|---|---|
class | string | required. Game Framework class or Blueprint generated class. |
Returns: class, role, defaults, warnings.
gameplay.get_game_mode (risk 0, requires PIE, smoke)
No description.
No arguments.
Returns: item.
gameplay.get_game_state (risk 0, requires PIE, smoke)
No description.
No arguments.
Returns: item.
gameplay.get_possession (risk 0, requires PIE, smoke)
No description.
| Argument | Type | Description |
|---|---|---|
actor | string | required. Actor path, label, or name in the current editor/PIE world. |
Returns: item.
gameplay.get_world_state (risk 0, requires world, smoke)
No description.
No arguments.
Returns: world, gameMode, gameState, gameInstance, counts, notes.
gameplay.list_controllers (risk 0, requires world, smoke)
No description.
No arguments.
Returns: items, count.
gameplay.list_pawns (risk 0, requires world, smoke)
No description.
No arguments.
Returns: items, count.
gameplay.list_player_starts (risk 0, requires world, smoke)
No description.
No arguments.
Returns: items, count.
gameplay.list_player_states (risk 0, requires world, smoke)
No description.
No arguments.
Returns: items, count.
gameplay.possess (risk 2, mutates, requires PIE, smoke)
No description.
| Argument | Type | Description |
|---|---|---|
controller | string | required. Controller reference. |
pawn | string | Pawn reference for possession. |
Returns: item.
gameplay.restart_player (risk 2, mutates, requires PIE, smoke)
No description.
| Argument | Type | Description |
|---|---|---|
controller | string | required. Controller reference. |
pawn | string | Pawn reference for possession. |
Returns: item.
gameplay.set_class_default (risk 2, mutates, smoke)
No description.
| Argument | Type | Description |
|---|---|---|
target | string | required. Game Framework class or actor reference. |
property | string | required. Editable reflected property name. |
value | string | required. Unreal text-formatted property value. |
Returns: class, role, defaults, warnings.
gameplay.set_lifespan (risk 2, mutates, requires world, smoke)
No description.
| Argument | Type | Description |
|---|---|---|
target | string | required. Game Framework class or actor reference. |
property | string | required. Editable reflected property name. |
value | string | required. Unreal text-formatted property value. |
Returns: item.
gameplay.set_pause (risk 2, mutates, requires PIE, smoke)
No description.
| Argument | Type | Description |
|---|---|---|
target | string | required. Game Framework class or actor reference. |
property | string | required. Editable reflected property name. |
value | string | required. Unreal text-formatted property value. |
Returns: item.
gameplay.set_runtime_property (risk 2, mutates, requires PIE, smoke)
No description.
| Argument | Type | Description |
|---|---|---|
target | string | required. Game Framework class or actor reference. |
property | string | required. Editable reflected property name. |
value | string | required. Unreal text-formatted property value. |
Returns: item.
gameplay.spawn_pawn (risk 2, mutates, requires world, smoke)
No description.
| Argument | Type | Description |
|---|---|---|
class | string | required. Pawn or Character class. |
location | {x,y,z} | Spawn location in centimetres. |
name | string | Optional actor label. |
Returns: item.
gameplay.unpossess (risk 2, mutates, requires PIE, smoke)
No description.
| Argument | Type | Description |
|---|---|---|
controller | string | required. Controller reference. |
pawn | string | Pawn reference for possession. |
Returns: item.