Pular para o conteúdo principal

Kit gameplay

22 ferramentas. Gerado a partir do código-fonte do plugin; não edite manualmente.

As descrições das ferramentas e dos argumentos são exibidas em inglês porque espelham o schema das ferramentas (o mesmo texto que o agente recebe em tools/list).

Guia​

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.

Ferramentas​

Legenda. risco 0 = somente leitura, 1 = operação inofensiva do editor, 2 = altera asset, 3 = apaga/substitui asset, 4 = projeto/config/build, 5 = potencialmente destrutivo (chamadas acima de MaxAutoRisk exigem "_confirm": true). altera = roda numa transação (edit.undo reverte). requer PIE / requer mundo = recusado sem sessão PIE / sem nível aberto. requer plugin = indisponível quando o plugin está desativado. dryRun = aceita o argumento dryRun. smoke = coberto por edit.self_test.

gameplay.apply_damage (risco 2, altera, requer PIE, smoke)​

Sem descrição.

ArgumentoTipoDescrição
targetstringobrigatório. Damage receiver actor.
damagenumberobrigatório. Non-negative applied damage.
instigatorstringOptional instigating controller.

Retorna: item.

gameplay.audit_world (risco 0, requer mundo, smoke)​

Sem descrição.

Sem argumentos.

Retorna: issues, world.

gameplay.create_class_blueprint (risco 2, altera, smoke)​

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

ArgumentoTipoDescrição
folderstringobrigatório. Destination Content Browser folder under /Game.
namestringobrigatório. Asset name without spaces, slashes, or dots.
parentClassstringobrigatório. Game Framework parent class, e.g. /Script/Engine.GameModeBase or /Script/Engine.Character.

Retorna: class, role, defaults, warnings.

gameplay.destroy_pawn (risco 3, altera, destrutivo, requer mundo, smoke)​

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

ArgumentoTipoDescrição
actorstringobrigatório. Actor path, label, or name in the current editor/PIE world.

Retorna: item.

gameplay.get_character_movement_state (risco 0, requer mundo, smoke)​

Sem descrição.

ArgumentoTipoDescrição
actorstringobrigatório. Actor path, label, or name in the current editor/PIE world.

Retorna: item.

gameplay.get_class_defaults (risco 0, smoke)​

Sem descrição.

ArgumentoTipoDescrição
classstringobrigatório. Game Framework class or Blueprint generated class.

Retorna: class, role, defaults, warnings.

gameplay.get_game_mode (risco 0, requer PIE, smoke)​

Sem descrição.

Sem argumentos.

Retorna: item.

gameplay.get_game_state (risco 0, requer PIE, smoke)​

Sem descrição.

Sem argumentos.

Retorna: item.

gameplay.get_possession (risco 0, requer PIE, smoke)​

Sem descrição.

ArgumentoTipoDescrição
actorstringobrigatório. Actor path, label, or name in the current editor/PIE world.

Retorna: item.

gameplay.get_world_state (risco 0, requer mundo, smoke)​

Sem descrição.

Sem argumentos.

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

gameplay.list_controllers (risco 0, requer mundo, smoke)​

Sem descrição.

Sem argumentos.

Retorna: items, count.

gameplay.list_pawns (risco 0, requer mundo, smoke)​

Sem descrição.

Sem argumentos.

Retorna: items, count.

gameplay.list_player_starts (risco 0, requer mundo, smoke)​

Sem descrição.

Sem argumentos.

Retorna: items, count.

gameplay.list_player_states (risco 0, requer mundo, smoke)​

Sem descrição.

Sem argumentos.

Retorna: items, count.

gameplay.possess (risco 2, altera, requer PIE, smoke)​

Sem descrição.

ArgumentoTipoDescrição
controllerstringobrigatório. Controller reference.
pawnstringPawn reference for possession.

Retorna: item.

gameplay.restart_player (risco 2, altera, requer PIE, smoke)​

Sem descrição.

ArgumentoTipoDescrição
controllerstringobrigatório. Controller reference.
pawnstringPawn reference for possession.

Retorna: item.

gameplay.set_class_default (risco 2, altera, smoke)​

Sem descrição.

ArgumentoTipoDescrição
targetstringobrigatório. Game Framework class or actor reference.
propertystringobrigatório. Editable reflected property name.
valuestringobrigatório. Unreal text-formatted property value.

Retorna: class, role, defaults, warnings.

gameplay.set_lifespan (risco 2, altera, requer mundo, smoke)​

Sem descrição.

ArgumentoTipoDescrição
targetstringobrigatório. Game Framework class or actor reference.
propertystringobrigatório. Editable reflected property name.
valuestringobrigatório. Unreal text-formatted property value.

Retorna: item.

gameplay.set_pause (risco 2, altera, requer PIE, smoke)​

Sem descrição.

ArgumentoTipoDescrição
targetstringobrigatório. Game Framework class or actor reference.
propertystringobrigatório. Editable reflected property name.
valuestringobrigatório. Unreal text-formatted property value.

Retorna: item.

gameplay.set_runtime_property (risco 2, altera, requer PIE, smoke)​

Sem descrição.

ArgumentoTipoDescrição
targetstringobrigatório. Game Framework class or actor reference.
propertystringobrigatório. Editable reflected property name.
valuestringobrigatório. Unreal text-formatted property value.

Retorna: item.

gameplay.spawn_pawn (risco 2, altera, requer mundo, smoke)​

Sem descrição.

ArgumentoTipoDescrição
classstringobrigatório. Pawn or Character class.
location{x,y,z}Spawn location in centimetres.
namestringOptional actor label.

Retorna: item.

gameplay.unpossess (risco 2, altera, requer PIE, smoke)​

Sem descrição.

ArgumentoTipoDescrição
controllerstringobrigatório. Controller reference.
pawnstringPawn reference for possession.

Retorna: item.