Game logic - Skill – Ylands

From Bohemia Interactive Community
(Redirected from Ylands Game logic - Skill)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Description

  • Allows creators to make their own custom skills and actions
  • You can assign a skill to any player role or assign it to player via visual scripting
  • If there are skill present in your game, you can see a skill list in your inventory screen and you can change hotbar to skill hotbar by pressing ~

Properties

Description

  • A short description of your skill

Icon

  • Skill icon that will represent the skill in skill list and hotbar

Overrides mode

  • Enable this if you want the skill execution to completely override player motion input and state (e.g., walking, flying)
  • If you enable this option, it might be a good idea to add an animation, since no default animation will show
  • Note: This option muset be enabled if you want the "Movement" element to work!

Duration

  • Determines how long the skill lasts (will also affect the timeline)
  • Note: If you have elements on the timeline and set the duration to be shorter than the position of those elements, they will be deleted!

Cooldown

  • Set cooldown - how long you have to wait until the same skill can be used again

Entry condition

  • Set up condition a player must meet to execute the skill

Entry cost

  • Resource cost required to enter skill. Set up target resource and how much skill execution costs

Interruption

  • Set up what will interupt this skill

Is Charged

  • Turns on charge settings, where you can set up individual charge states and their duration

Loops in

  • Sets up whether the skill loops and in which state
  • None - skill does not loop
  • Last charge state - Last charge state loops as long as the button is held
  • Skill execution - Skill execution loops as long as the button is held

Is Modal

  • Turns on modal settings, where you can set up modal states
  • You are able to select modal skills in the skill hotbar to enter a "mode" from which you can execute elements on timeline via default action button.(Default LMB on PC)

Elements

  • This is a list of elements creator can put on the timeline to create their custom skill

Marker

  • Serves as a reference point for visual scripting
  • Put it anywhere on a timeline to run custom script at specified time

Sound

  • Plays chosen sound effect
  • Can be instant or looped (switch is located top left, above properties)

Full Body Animation

  • Adds a full body animation chosen from the list
  • When chosen, animation is automatically set to its default duration
  • You can shorten or lengthen the animation
  • When shortening, the animation will cut off at the end point
  • When lengthening, the character will be stuck in the last animation frame until it ends
  • If you lengthen the animation, the part that is longer than its default duration will be highlighted in red

Upper Body Animation

  • Same as full body animation, but only affects the upper part of character's body

Movement

  • Note: You have to check the Override mode option in properties for this element to work!
  • Movement is a timeline element that moves characters based on set time and velocity (X,Y,Z)
  • If you set up one movement element on timeline, start and end of timeline will be considered a zero vector and player will move between them and its element.
  • If you set up two ore more movement elements on timeline, you will move based on set velocity and time between those elements. Imagine setting up a first movement element at time 1, velocity (0,0,0) and second element at time 2, velocity (0,10,0). At time 1, player will start moving and during the 1 second, they will move 10 units up.

Particle

  • Plays chosen particle effect
  • You can either choose a particle effect in the editor and edit it, or choose a prepared template from game logic

Melee hit

  • Element that lets you define a sector around player that returns entities in that sector.
  • You can then manipulate those entities in visual scripting
  • Melee hit will detect obstructions and will not hit entities behind items and walls

Movement restriction

  • Allows restricting player movement
  • No running or no moving

Change Speed

  • Allows making player faster or slower

Hide Item

  • Hides any item currently held in hand

Aiming Mode

  • Switches to aiming mode, shows crosshair to see where exactly character is looking, useful for raycasts and projectiles

Raycast Hit

  • Casts a ray in camera direction or direction of the crosshair when aiming mode is active
  • You can manipulate objects or position hit by your raycast in visual scripting

Projectile

  • Shoots a projectile from player position, either in direction of where character is looking, or crosshair in aiming mode
  • Choose entity that will be used as a projectile by selecting a entity template
  • You can specify what will happen after projectile hits/misses/hits ground in visual scripting

Shape Hit

  • Element that lets you define a sector around player that returns entities in that sector.
  • You can then manipulate those entities in visual scripting
  • Shape hit will not detect obstructions and will hit entities behind walls.

Modify Resource

  • Modifies chosen resource (adds or subtracts value)

Resource Cost

  • Checks if player has enough of resource to continue executing skill
  • If they do, specified resource value is subtracted and skill continues
  • If they don't , skill is interrupted