Saltar al contenido principal

Kit gameplay

22 herramientas. Generado a partir del código fuente del plugin; no lo edites a mano.

Las descripciones de las herramientas y de los argumentos se muestran en inglés porque reflejan el schema de las herramientas (el mismo texto que el agente recibe en tools/list).

Guía​

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​

  1. 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).
  2. gameplay.set_class_default {"target":"/Game/Core/BP_MyMode","property":"DefaultPawnClass","value":"/Script/Engine.Character"}.
  3. Check the result with gameplay.get_class_defaults, assign the mode with level.*/settings.*, then test in PIE with the runtime tools above.

Herramientas​

Leyenda. riesgo 0 = solo lectura, 1 = operación inofensiva del editor, 2 = modifica un asset, 3 = elimina/reemplaza un asset, 4 = proyecto/configuración/build, 5 = potencialmente destructivo (las llamadas por encima de MaxAutoRisk requieren "_confirm": true). modifica = se ejecuta en una transacción (edit.undo la revierte). requiere PIE / requiere mundo = se rechaza sin una sesión PIE / sin un nivel abierto. requiere el plugin = no disponible cuando el plugin está desactivado. dryRun = acepta el argumento dryRun. smoke = cubierto por edit.self_test.

gameplay.apply_damage (riesgo 2, modifica, requiere PIE, smoke)​

Sin descripción.

ArgumentoTipoDescripción
targetstringobligatorio. Damage receiver actor.
damagenumberobligatorio. Non-negative applied damage.
instigatorstringOptional instigating controller.

Devuelve: item.

gameplay.audit_world (riesgo 0, requiere mundo, smoke)​

Sin descripción.

Sin argumentos.

Devuelve: issues, world.

gameplay.create_class_blueprint (riesgo 2, modifica, smoke)​

Creates a Blueprint subclass of a Game Framework class (GameMode, GameState, PlayerState, Controller, Pawn, Character, HUD, GameInstance).

ArgumentoTipoDescripción
folderstringobligatorio. Destination Content Browser folder under /Game.
namestringobligatorio. Asset name without spaces, slashes, or dots.
parentClassstringobligatorio. Game Framework parent class, e.g. /Script/Engine.GameModeBase or /Script/Engine.Character.

Devuelve: class, role, defaults, warnings.

gameplay.destroy_pawn (riesgo 3, modifica, destructivo, requiere mundo, smoke)​

Destroys a Pawn or Character (for example one created by gameplay.spawn_pawn) in the editor or PIE world.

ArgumentoTipoDescripción
actorstringobligatorio. Actor path, label, or name in the current editor/PIE world.

Devuelve: item.

gameplay.get_character_movement_state (riesgo 0, requiere mundo, smoke)​

Sin descripción.

ArgumentoTipoDescripción
actorstringobligatorio. Actor path, label, or name in the current editor/PIE world.

Devuelve: item.

gameplay.get_class_defaults (riesgo 0, smoke)​

Sin descripción.

ArgumentoTipoDescripción
classstringobligatorio. Game Framework class or Blueprint generated class.

Devuelve: class, role, defaults, warnings.

gameplay.get_game_mode (riesgo 0, requiere PIE, smoke)​

Sin descripción.

Sin argumentos.

Devuelve: item.

gameplay.get_game_state (riesgo 0, requiere PIE, smoke)​

Sin descripción.

Sin argumentos.

Devuelve: item.

gameplay.get_possession (riesgo 0, requiere PIE, smoke)​

Sin descripción.

ArgumentoTipoDescripción
actorstringobligatorio. Actor path, label, or name in the current editor/PIE world.

Devuelve: item.

gameplay.get_world_state (riesgo 0, requiere mundo, smoke)​

Sin descripción.

Sin argumentos.

Devuelve: world, gameMode, gameState, gameInstance, counts, notes.

gameplay.list_controllers (riesgo 0, requiere mundo, smoke)​

Sin descripción.

Sin argumentos.

Devuelve: items, count.

gameplay.list_pawns (riesgo 0, requiere mundo, smoke)​

Sin descripción.

Sin argumentos.

Devuelve: items, count.

gameplay.list_player_starts (riesgo 0, requiere mundo, smoke)​

Sin descripción.

Sin argumentos.

Devuelve: items, count.

gameplay.list_player_states (riesgo 0, requiere mundo, smoke)​

Sin descripción.

Sin argumentos.

Devuelve: items, count.

gameplay.possess (riesgo 2, modifica, requiere PIE, smoke)​

Sin descripción.

ArgumentoTipoDescripción
controllerstringobligatorio. Controller reference.
pawnstringPawn reference for possession.

Devuelve: item.

gameplay.restart_player (riesgo 2, modifica, requiere PIE, smoke)​

Sin descripción.

ArgumentoTipoDescripción
controllerstringobligatorio. Controller reference.
pawnstringPawn reference for possession.

Devuelve: item.

gameplay.set_class_default (riesgo 2, modifica, smoke)​

Sin descripción.

ArgumentoTipoDescripción
targetstringobligatorio. Game Framework class or actor reference.
propertystringobligatorio. Editable reflected property name.
valuestringobligatorio. Unreal text-formatted property value.

Devuelve: class, role, defaults, warnings.

gameplay.set_lifespan (riesgo 2, modifica, requiere mundo, smoke)​

Sin descripción.

ArgumentoTipoDescripción
targetstringobligatorio. Game Framework class or actor reference.
propertystringobligatorio. Editable reflected property name.
valuestringobligatorio. Unreal text-formatted property value.

Devuelve: item.

gameplay.set_pause (riesgo 2, modifica, requiere PIE, smoke)​

Sin descripción.

ArgumentoTipoDescripción
targetstringobligatorio. Game Framework class or actor reference.
propertystringobligatorio. Editable reflected property name.
valuestringobligatorio. Unreal text-formatted property value.

Devuelve: item.

gameplay.set_runtime_property (riesgo 2, modifica, requiere PIE, smoke)​

Sin descripción.

ArgumentoTipoDescripción
targetstringobligatorio. Game Framework class or actor reference.
propertystringobligatorio. Editable reflected property name.
valuestringobligatorio. Unreal text-formatted property value.

Devuelve: item.

gameplay.spawn_pawn (riesgo 2, modifica, requiere mundo, smoke)​

Sin descripción.

ArgumentoTipoDescripción
classstringobligatorio. Pawn or Character class.
location{x,y,z}Spawn location in centimetres.
namestringOptional actor label.

Devuelve: item.

gameplay.unpossess (riesgo 2, modifica, requiere PIE, smoke)​

Sin descripción.

ArgumentoTipoDescripción
controllerstringobligatorio. Controller reference.
pawnstringPawn reference for possession.

Devuelve: item.