Overwatch Tracer's blink ability in UE4, p.1

Jun 1, 2016·
Akbolat Sadvakassov
Akbolat Sadvakassov
· 2 min read

Prologue

Overwatch released. I was not interested in this game until OBT. I heard about it in 2015 and I saw comments like “Another TF2 killer”, “Blizzard attacks to Valve”, etc. Then hype with Tracer’s pose, it didn’t a reason to interest game. But OBT changed my mind. This game is AWESOME and FUN to PLAY. I couldn’t stop playing after 10th match. Overwatch isn’t a breakthrough in CG, not a new gameplay mechanics or anything else, it’s 100% GAME. There must be a screenshot from Overwatch.

Recommend to play, who plays UTournament.

Blueprints

Tutorial based on FirstPersonTemplate. UE4 version is 4.11.2.

How it works according to Wiki:

In first, we need to create a few variables in FirstPersonCharacter:

  • Float “Range” – blink’s range.
  • Vector “Direction” – calculated direction, where she is moving.
  • Integer “BlinksCount” – charges, equal 3.
  • Integer “MaxBlinksCount” – max charges, too 3.

Next, in case when Tracer is moving, blink direction depends on WASD, we assign a calculated value to “Direction” in EventGraph/MovementInput.

First two multiplications determine the direction(left, forward …); then adds it(right-forward, left-back…); multiply by Range( blink’s range); add resulting with character’s location coordinates and assign to Direction.

Create a few functions:

  • CanBlink? – check current charges.
  • ReloadingBlink – reloading charges.
  • Decrement – minus one charge.
  • Moving – blink, when Character is moving.
  • NoMoving – when standing still.

CanBlink?:

ReloadingBlink:

Decrement:

Moving:

Teleport function integrated in Editor

Teleport function integrated in Editor

Shoot line-trace(LineTraceByChannel), that starts from character’s location(GetActorLocation) and ends at Direction value. Use Branch to check if line-trace hits, if true DestLocation of function Teleport is “Location” from HitResult, if False DestLocation is TraceEnd.

Moving

Same as Moving-function, but instead Direction var, calculate end of trace-line.

Now composing all function in Event Graph:

Ability activates by pressing LeftShift. Function CanBlink? checks charges count, if greater than 0, Decrement reduces by one, then call function SetTimerByFunctionName, that calls Reloading-func every 3.5 seconds and before teleport, checks if character is moving.

Second skill and VFXs

Check second ability here


It’s a mirror from WebArchive