A downloadable project for Windows, macOS, and Linux

Download NowName your own price

⚙️ EFPSE SCRIPT & FSM HUB

Contributor's - 

SteelSoldier , Droopy , LazySpar7an

A growing library of clean, working EFPSE scripts. Each section explains what the system does, how to set it up, and includes ready-to-use script examples. If you’d like to contribute your own, message me — I’ll add it with full credit.

Huge thanks to the community's at  Mikulu Games - YouTube / KunusKorner - YouTube for their help, tutorials, and inspiration.

FPSSteel - YouTube - For his amazing videos, tutorials, scripts and FSM help !

VIEW MORE INFO ON EFPSE AT - Unofficial EFPSE wiki Extended

I also highly recommend checking out Creationkit's Advance EFPSE Template by Creationkit it has a lot in there to learn from!

I’m making this guide to help grow and share the knowledge of EFPSE. My goal is to make it easier for others to learn, build, and experiment with the system.

I’ll be adding more sections and examples over time, covering scripts, setup tips, and useful tricks I’ve learned.

Together, we can make EFPSE easier and more fun for everyone to use!

 Easy FPS Editor CE v1.10.5 by CG8516 (Clark)

TOOLS - 

FSM/SCRIPT PROGRAM https://jeevesgb.itch.io/efpss

CUBE MAP TOOL https://jcastles.itch.io/cube-map-generator


EFPSE Advanced Script Reference

____________________________________________

CORE STRUCTURE:

// Single-line comment for notes or explanations

frame NAME { ... }            → Defines a single frame of logic or animation

frameset NAME { ... }         → Groups multiple frames into a cohesive sequence

if CONDITION { ... }          → Begins a conditional logic block

else { ... }                  → Alternate condition or fallback execution

____________________________________________

COMMAND KEYWORDS:

show / hide          → Toggle visibility of entities, UI, or HUD elements

timeout              → Set delay before the next command executes

pause / halt         → Suspend script execution temporarily

give / take          → Add or remove weapons, ammo, or items

map, auto, gravity   → Adjust environment or global state parameters

shader, light        → Apply visual or lighting effects

text, font, image    → Render text, fonts, or UI graphics

play / stop / sound  → Manage sound playback and looping

button, label        → Create or modify UI buttons and labels

move / front / back  → Move entities, UI, or camera layers

bind                 → Assign actions to player input or keys

preload              → Preload assets for faster runtime performance

____________________________________________

CONTROL FLOW:

if, else, JUMPIF*           → Standard logic branching

JUMPIFGREATER, JUMPIFLESS,

JUMPIFEQUAL, JUMPIFNOTEQUAL → Conditional variants for numerical checks

____________________________________________

FSM ACTIONS:

ATTACK, READY, IDLE, SPAWN, DEATH1/2/3

HUDIMG, CAMERA, ZOOM, EXPLOSION, PROJECTILE

SETVAR, GIVEAMMO, TAKEAMMO, RELOAD

MUZZLEFLASH, SOUNDANDATTACK, CUSTOMPARTICLE

TRIGGERONHIT, CUSTOMEVENT, SHAKECAMERA

(Includes core and extended finite-state-machine actions for entity behavior control.)

____________________________________________

COMMENTS:

// Use comments to document logic, timing, and purpose of code sections.

____________________________________________

DATA TYPES:

"Text in quotes"     → String value

123, 45.6            → Numeric value (integer or float)

true / false         → Boolean values for conditions

____________________________________________

Tip: Combine framesets, conditional checks, and FSM actions to build dynamic, cinematic, or combat-driven event systems inside EFPSE.

----------------------------

SCRIPT & FSM

----------------------------


😱 Scared / Flee System
The Scared System makes an enemy always flee from the player.
Intended for: Skittish creatures like rabbits, rats, or small critters.
How it works: When triggered, the enemy moves away from the player. Can be combined with other states (like IDLE) for more natural behavior.
Tip: Adjust movement speed in the script to make fleeing look realistic — small animals move fast, cautious ones slower.

FSM:

image rat 0 12
sound ratAlert
state IDLE FLEE 0
frame 0 0.125 0 0 0 NONE
frame 0 0.125 0 0 0 FLEE
state SEE FLEE 0
frame 0 0.125 0 0 0 NONE
frame 0 0.125 0 0 0 FLEE
state FLEE FLEE 0
frame 1 0.1 0 0 0 NONE
frame 2 0.1 0 0 0 NONE
frame 3 0.1 0 0 0 NONE
frame 4 0.1 0 0 0 NONE
frame 1 0.1 0 0 0 FLEE
state HURT FLEE 0
frame 7 0.125 0 0 0 NONE
frame 8 0.125 0 0 0 FLEE
state DEATH DEAD 0
frame 9 0.166 0 0 0 NONE
frame 10 0.166 0 0 0 NONE
frame 11 0.166 0 0 0 NONE
state DEAD NONE 0
frame 12 0.125 0 0 0 NONE
frame 12 0.125 0 0 0 NONE

----

My Basic 3D ENEMY TEMPLATE

Recon enemy uses 48 frames in total, split into three main animations:

  1. Walking / Chasing (frames 0–16)

    • This animation is used for both IDLE movement and chasing the player.

    • It loops to give the enemy a continuous walking motion.

  2. Attack (frames 17–32)

    • This animation plays when the enemy is in attack range.

    • Shows the enemy performing its attack, then usually returns to chasing.

  3. Hurt / Death (frames 32–48)

    • This animation covers both taking damage (hurt) and dying.

    • Hurt frames play when the enemy is hit, then it often goes back to chasing.

    • Death frames play when health reaches zero, after which the enemy transitions to the DEAD state.

So even though there are 48 frames total, the enemy only has three distinct animations: walking/chasing, attack, and hurt/death.

The FSM states just control which animation plays depending on what the enemy is doing.

(In download file I included a free 3d enemy with animations I made on block bench it's based on one the recognizers in TR0N - set scale to 3.5 and yaw to-90.)

image Recon 0 100
state IDLE NONE 0
frame 0 0.125 0 0 0 NONE
frameset 0 16 0.02 0 0 0 NONE
frame 0 0.125 0 0 0 READY
state SEE CHASE 0
frame 0 0.125 0 0 0 NONE
frameset 1 16 0.02 0 0 0 NONE
frame 0 0.125 0 0 0 READY
state CHASE NONE 0
frame 0 1 0 0 0 NONE
frameset 1 16 0.02 0 0 0 NONE
frame 0 1 0 0 0 READY
state ATTACK CHASE 0
frame 0 0.0625 0 0 0 NONE
frameset 17 32 0.02 0 0 0 NONE
frame 0 0.0625 0 0 0 ATTACK
frame 0 0.25 0 0 0 NONE
frame 0 0.25 0 0 0 READY
state HURT CHASE 0
frame 0 0.125 0 0 0 NONE
frameset 35 42 0.02 0 0 0 NONE
frame 0 0.125 0 0 0 NONE
state DEATH DEAD 0
frame 0 0.166 0 0 0 NONE
frameset 32 48 0.02 0 0 0 NONE
frame 0 0.166 0 0 0 NONE
state DEAD NONE 0
frame 0 0.125 0 0 0 NONE
frame 0 0.125 0 0 0 NONE

----

💀 Game Over HUD

This script shows a game over image when the player’s health reaches a critical point.

  • The image must be in the HUD folder.

  • File name must match exactly (e.g., gameoversplash.png).

  • Default size: 750×500, centered on the screen.

  • Acts as a Game Over screen when the player dies.

  • You can adjust position and size as needed.

  • Use a clear, bold image for best effect.

MAP_LOOP:

player check hp global.PlayerHealth
if $global.PlayerHealth < 0 {
    hud image HealthHUD 0.30 0.25 .75 HUD/gameoversplash.png 
}

----

💻 Terminal System Setup

The Terminal System acts as an in-game message or interaction screen.

📁 Folder Setup

Inside your sprites folder, create a new folder named terminal.

Place your .png image inside this folder.

Example path: sprites/terminal/terminal.png

🖼️ Image Details

Default image size: 700 × 500

You can resize it as needed to fit your project.

⚙️ Usage

This image is displayed when the terminal activates — perfect for showing messages, story text, or shop interfaces.

Think of it as a message or data terminal that pops up during gameplay.

SCRIPT:

image imageA Sprites/terminal/imageA.png
sound soundA Sounds/soundA.wav
play sound soundA
show imageA 280 90 1
pause
hide imageA 0
map return

----

Health Terminal

A Health Terminal is an in-game object (like a medkit, healing orb, or sci-fi station) that restores the player’s health when activated. Think of it as a healing point in your level.


SCRIPT:

sound healthsound Sounds/healthsound.wav
play sound healthsound
timeout 3
player heal 100
map return

----

PLAY .VID

PLAY .vid as a intro or outro or just in general cut Sene system  

SCRIPT:

sound introsounds Sounds/introsounds.wav
trigger TriggerVideo
play sound introsounds
play video Sprites/Videos/introvideo.vid
map goto 1
map start

----

 Teleport to a new MAP - VERY BASIC

Change the map digit according to the map number you want to spawn to.

TIP. map goto -1 takes you back to the main menu.

map goto 1

----

💰 Money & Shop System Setup

This system lets players collect money and spend it at shops using decoration scripts.

⚙️ Main Script

The main variable is stored in the map_loop.script.

Once the first map loop triggers, your money value will carry across maps automatically.

🪙 Money Pickups

Type: Decoration

Script name: Must match the decoration name

Example: If the decoration is named moneyA, the script file must be moneyA.script.

Settings:

Set “Require Button Press” to ON

Set the decoration mode to Terminal

When picked up, the script adds money to the main variable in the map loop.

🏪 Shops

Type: Decoration

Same rule — script name = decoration name

Example: Decoration name shopA → script file shopA.script.

Settings:

Set “Require Button Press” to ON

Set the decoration mode to Terminal

When used, the script checks your stored money and lets you buy or spend it accordingly.

✅ Summary

With all these combined:

The map loop stores your total money.

Money pickups increase it.

Shop terminals spend it.

The system works across maps once the first map_loop.script is active.

MAP_LOOP:

hud text a "Money:$global.Money" 22 0.17 0.03 255 215 0 1 

MONEY SCRIPT: 

global.Money+=1
sound moneysound Sounds/moneysound.wav
play sound moneysound
entity delete me
end

SHOP SCRIPT:

if $global.Money >= 14
{
    global.Money-=14
    give weapon 1
    give ammo 3
    sound gunPickup Sounds/gunPickup.wav
    play sound gunPickup
    entity delete me
}
end  map quickreturn 2

----

🩸 Animated Health HUD Setup

The Health HUD displays the player’s current health using a series of images that change as health increases or decreases.

📊 Image System

The HUD works by swapping between individual images that represent different health values.

You can make it as detailed as you want:

Full precision (0–100) → requires 101 images total (one for each value, including 0).

Simplified version (every 10 points) → requires 11 images total, which is the setup used in this guide.

Example sequence: health_100, health_90, health_80, health_70, health_60, health_50, health_40, health_30, health_20, health_10, health_0.

📁 Folder Placement

All health HUD images must be placed in the HUD folder of your project directory.

The script will automatically pull from that folder when updating the player’s health display.

⚙️ How It Works

When the player takes damage, the script checks their current health and switches the displayed image to the corresponding health level image.

For example:

At 100 HP → shows health_100.png

At 70 HP → shows health_70.png

At 0 HP → shows health_0.png

I have template HUD images in the download...

MAP_LOOP:

player check hp global.PlayerHealth
if $global.PlayerHealth >= 100 {
    hud image HealthHUD 0.42 0.01 .75 HUD/HealthHUD100.png
}
if $global.PlayerHealth < 100 {
    hud image HealthHUD 0.42 0.01 .75 HUD/HealthHUD100.png
}
if $global.PlayerHealth < 90 {
    hud image HealthHUD 0.42 0.01 .75 HUD/HealthHUD90.png
}
if $global.PlayerHealth < 80 {
    hud image HealthHUD 0.42 0.01 .75 HUD/HealthHUD80.png
}
if $global.PlayerHealth < 70 {
    hud image HealthHUD 0.42 0.01 .75 HUD/HealthHUD70.png
}
if $global.PlayerHealth < 60 {
    hud image HealthHUD 0.42 0.01 .75 HUD/HealthHUD60.png
}
if $global.PlayerHealth < 50 {
    hud image HealthHUD 0.42 0.01 .75 HUD/HealthHUD50.png
}
if $global.PlayerHealth < 40 {
    hud image HealthHUD 0.42 0.01 .75 HUD/HealthHUD40.png
}
if $global.PlayerHealth < 30 {
    hud image HealthHUD 0.42 0.01 .75 HUD/HealthHUD30.png
}
if $global.PlayerHealth < 20 {
    hud image HealthHUD 0.42 0.01 .75 HUD/HealthHUD20.png
}
if $global.PlayerHealth < 10 {
    hud image HealthHUD 0.42 0.01 .75 HUD/HealthHUD10.png
}
if $global.PlayerHealth < 5 {
    hud image HealthHUD 0.42 0.01 .75 HUD/HealthHUD0.png
    player sethp 0
}

----

Very Basic Script Dialogue

 (SteelSoldier)

EFPSE Editor Very Basic Script Dialogue

SCRIPT:

vn 1
if $global.talk == 0 {
text "Hello"
global.talk+=1
map return 
}
if $global.talk == 1 {
text "Hello 2"
global.talk+=1
map return 
}
if $global.talk == 2 {
text "Hello 3"
global.talk+=1
map return 
}
if $global.talk == 3 {
text "Hello 4"
global.talk=0
map return 
}

----

Basic Level up Script

 (SteelSoldier)

Efpse Editor, Basic Level up Script - YouTube

MAP_LOOP:

if $timerCount <= 60 {
timerCount+=1
map quickreturn
} else {
timerCount=0
}
//Levels
if $global.Level == 0 {
hpx=40
apx=40
speedx=250
jumpx=256
player sethp $hpx
player setmaxhp $hpx
player setarmour $apx
player setmaxarmour $apx
player speed $speedx
player jumpheight $jumpx
global.Level=1
}
if $global.experience >= 20 {
if $global.Level == 1 {
hpx+=20
apx+=20
speedx+=20
jumpx+=44
player setmaxhp $hpx
player setmaxarmour $apx
player speed $speedx
player jumpheight $jumpx
global.experience=0
global.Level=2
}
}
if $global.experience >= 40 {
if $global.Level == 2 {
hpx+=20
apx+=20
speedx+=20
jumpx+=44
player setmaxhp $hpx
player setmaxarmour $apx
player speed $speedx
player jumpheight $jumpx
global.experience=0
global.Level=3
}
}
//HUD
hud text a "Level:$global.Level" 24 0.01 0.76 255 255 255 1
hud text b "Exp:$global.experience" 24 0.01 0.80 255 255 255 1
hud text c "Scrap:$global.Scrap" 24 0.01 0.84 255 255 255 1

----

Alpha 54 Elevator guide with the Move Command

 (SteelSoldier)

EPFSE Alpha 54 Elevator guide with the Move Command

FSM:

image elev 0 2
state IDLE NONE 0
frame 1 0.001 0 0 0 NONE
frame 1 0.02 0 0 0 MOVE 0 0 0
frame 1 0.02 0 0 0 MOVE 0 1 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 2 0
frame 1 0.02 0 0 0 MOVE 0 1 0
frame 1 0.5 0 0 0 MOVE 0 0 0
frame 1 0.02 0 0 0 MOVE 0 -1 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -2 0
frame 1 0.02 0 0 0 MOVE 0 -1 0

----

Hub/Building Teleporter 

 (SteelSoldier)

Hub/Building Teleporter for EFPSE Editor

SCRIPT:

if $global.hub == 1 { player teleport 35 31 12 0 global.hub=0 }

----

🎞️ TITLE CARD SEQUENCE

(Droopy)

Displays intro or logo cards before gameplay.
//////////////////////////////////////
// add your title cards images here //
//////////////////////////////////////
image TitleCard1 [ImageLocation/Image.png
////////////////////////
// tuneable variables //
////////////////////////
cardTiming = 1.5 // time that each card is visible
fadeTiming = 2 // time to wait after fadeout for each card
enterTiming = 0.5 // time the sequence pauses before beginning
exitTiming = 2 // time the sequence pauses before ending
/////////////////////////
// initialize vn stuff //
/////////////////////////
vn 1 // turns on vn mode
auto 1 // allows vn sequence to run automatically
//////////////////////////////////
// actual sequence begins below //
//////////////////////////////////
timeout $enterTiming // pause before start
////////////////////////////////////////////////////
// block for a card to fade in, display, fade out //
// copy and paste underneath for additional cards //
////////////////////////////////////////////////////
bg TitleCard1 $cardTiming // chooses which card to display and for how long
timeout $fadeTiming // pause after fadeout
hide TitleCard1 $cardTiming // removes the card and waits further
timeout $fadeTiming // pause before fade in for next card
////////////////////////////////////////////
// sequence ends with this following line //
////////////////////////////////////////////
timeout $exitTiming // pause before exit

----

MAKE A WEAPON HAVE UNLIMITED AMMO!

On alpha .54 Clark added this feature to do so set max ammo and mag ammo to -1

----















Updated 5 days ago
Published 15 days ago
StatusReleased
CategoryOther
PlatformsWindows, macOS, Linux
Rating
Rated 5.0 out of 5 stars
(1 total ratings)
AuthorLAZY SPAR7AN GAMES
Tags3D, efpse, efpse-ce, scripts, states

Download

Download NowName your own price

Click download now to get access to the following files:

3D Enemy.7z 61 kB
Animated Health HUD.7z 39 kB
Shop.7z 1,016 bytes
terminal.7z 27 kB
helthstation.script 104 bytes
introvideo.script 157 bytes
mapteleport.script 53 bytes
Scared-FLEE System.7z 667 bytes

Leave a comment

Log in with itch.io to leave a comment.