top of page

Script/Code Examples

Here are Script/Code Examples of code files I've written in various game engines. You can click on the file names to download them as .txt files

Lua Scripts

A Script attached to the Player that allows them to use an Ability. Handles all the 4 phases of an Ability.

This Script handles which Player or Enemy should be damaged by an Ability. For example, players on the same team or the Player itself should not be damaged.

This Script handles Status Effects inflicted by an Ability such as Freeze, Burn, Poison, Knockback, etc.

This Script tells the StatusEffectsController which StatusEffectsController which Status Effect to apply and other information like duration, number of hits, etc.

This Script allows a bonus to be applied the Player's Ability for things like damage, duration, knockback distance, etc.  

A Script attached to the Player that allows them to use a Dash Ability, could be configured to use as a Dash, Blink or Smash Ability

A Script that handles which effects should be applied to a Player when they collect a Power Up, communicates information to the PowerUpEffectsController

Handles the application of Effects such as a speed boost, jump boost, invisibility, etc.

Handles the Respawn Cycle of a PowerUp

A Script that allows the Player to use WASD and Spacebar to teleport to different locations in the Game World.

A Script that counts consecutive wins and losses for Players and Teams in a round based Game, which can then be used for skill balancing to help weaker players or reward stronger players

A Script that handles the balancing code and rewards for Players based on the information from UserRoundModifierScript

A modified version of Crayta's default gunScript for my Enhanced Weapons and Combat System Package

This Script handles Status Effects inflicted by an Enhanced Weapon such as Freeze, Burn, Poison, etc.

A Health Script for NPCs to work with my Enhanced Weapons and Combat System Package

A Script that handles the Respawn Cycle of a Pickup such as a Weapon or any other collectible

A Script that recursively controls the visibility or collision of any entity/object

A Script that controls the main firing cycle of a Turret Weapon, communicates with all the other turret scripts to make the projectile physics and UI work. It could be used to create different types of Turret Weapons such as a Minigun, Railgun, Missile Turret, etc.

A Script that handles projectile physics for a projectile launched from a Turret

A Script that handles the activation/deactivation and part of the firing cycle of a Turret

A Script that handles the movement and rotation of the User Camera based on the information from UserCameraControlScript and syncs movement on Client and Server

A Script that allows the User to control their camera movement using WASD 

A Script that could be used to create a very complex Looting system for any kind of Entity in the Game.

This Script controls when a Player could or could not loot an Entity

This Script handles Loot Drops when an NPC is killed

This Script handles Loot Drops when a Player is killed

This Script made full use of Crayta's Animation API to animate the Player while they were interacting with or looting an Entity

This Script could be used to create a complex Health system for physical, non player objects in the Game. It includes settings for Loot Drops, Explosions/Impulses upon destruction, Event broadcasting and Sounds/VFX, etc.

This Script controls the Level Progression System for my Puzzle Game, LIGHTS OUT!

A Script that recursively counts the total number of entities that make up a larger Entity and mentions their type, useful for detecting performance heavy objects

This Script controls the main mechanics of a Domination Game Mode Blueprint/Framework I created on Crayta

Unreal C++ Code

Header file for the ShooterCharacter Class

C++ file for the ShooterCharacter class

Header file for the ShooterAnimInstance Class

C++ file for the ShooterAnimInstance Class

Header file for the Item Class, made for collectible items like Weapons and Ammo

C++ file for the Item Class

Header file for the Weapon Class, which inherits from the Item Class

C++ file for the Weapon Class

HTML/CSS/JS Widgets

A Circular Progress Bar Widget 

A Progress Bar Widget

The Widget that controls the Level Number and Level Completed Messages in my Puzzle Game, LIGHTS OUT!

A Widget that becomes visible when the Player enters a Turret

bottom of page