Skip to content

Latest commit

 

History

History
125 lines (82 loc) · 4.76 KB

Scripting.md

File metadata and controls

125 lines (82 loc) · 4.76 KB

Scripting

Occasionally, you want to create additional gameplay (especially when creating a story campaign). This section highlights additional functions you can call from blueprints, as well as events you may handle.

Feel free to explore the plugin yourself by looking at what other functions and events each component provides, and open an issue if you're missing something.

Also note that much gameplay of the plugin relies on Gameplay Tags as defined by Content\Data\DT_RTSGameplayTags.uasset. This enables you to create unique gameplay and abilities by applying/removing these tags to/from the URTSGameplayTagsComponent of your actors. Initially, many of the plugin components apply matching gameplay tags (e.g. Status.Permanent.CanAttack from RTSAttackComponent). When creating your own actor components, you can derive from RTSActorComponent to provide your own Initial Gameplay Tags as well. The plugin also provides an own Gameplay Debugger category for checking the gameplay tags of selected actors.

RTSBountyComponent

Events

Event Description
On Bounty Collected Event when the bounty was collected.

RTSContainerComponent

Functions

Node Description
Load Actor Adds the specified actor to this container.
Unload Actor Removes the specified actor from this container.

RTSConstructionSiteComponent

Events

Event Description
On Construction Finished Event when the construction timer has expired.

RTSGameMode

Functions

Node Description
Transfer Ownership Sets the specified player as the owner of the passed actor.

RTSGameplayLibrary

Functions

Node Description
Is Visible For Actor Checks whether Other is visible for Actor.

RTSGameplayTagLibrary

Functions

Node Description
Add Gameplay Tag Applies the passed gameplay tag to the specified actor.
Get Gameplay Tags Gets the current set of gameplay tags of the specified actor.
Has Gameplay Tag Checks whether the specified actor currently has the passed gameplay tag applied.
Remove Gameplay Tag Removes the passed gameplay tag from the specified actor.

RTSHealthComponent

Events

Event Description
On Health Changed Event when the current health of the actor has changed.
On Killed Event when the actor has been killed.

RTSPawnAIController

Functions

Node Description
Issue Order Makes the pawn carry out the specified order.
Issue Attack Order Makes the pawn attack the specified target.
Issue Begin Construction Order Makes the pawn construct the specified building at the passed location.
Issue Gather Order Makes the pawn gather resources from the specified source.
Issue Move Order Makes the pawn move towards the specified location.
Issue Stop Order Makes the pawn stop all actions immediately.

Events

Event Description
On Order Changed Event when the pawn has received a new order.

RTSPlayerController

Events

Event Description
On Player State Available Event when the player state has been set up or replicated for this player.

RTSPlayerResourcesComponent

Functions

Node Description
Add Resources Adds the specified resources to the stock of this player.

Events

Event Description
On Resources Changed Event when the current resource stock amount for the player has changed.

RTSPlayerController

Functions

Node Description
Get Own Actors Gets the list of actors currently owned by this player.

RTSProductionComponent

Events

Event Description
On Production Finished Event when the production timer has expired.