Logo FSBarV1_Archived

EnemySim Module

Enemy visibility state machine and simulation.

Types

Type Description

SimEnemy

Internal state for a tracked enemy with scheduled visibility transitions.

VisState

Visibility state for an enemy.

Functions and values

Function or value Description

create enemyId defId maxHealth position speed transitions

Full Usage: create enemyId defId maxHealth position speed transitions

Parameters:
    enemyId : int
    defId : int
    maxHealth : float32
    position : float32 * float32 * float32
    speed : float32
    transitions : (int * VisState) list

Returns: SimEnemy

Create a SimEnemy with scheduled visibility transitions.

enemyId : int
defId : int
maxHealth : float32
position : float32 * float32 * float32
speed : float32
transitions : (int * VisState) list
Returns: SimEnemy

step se frame mapWidth mapHeight

Full Usage: step se frame mapWidth mapHeight

Parameters:
    se : SimEnemy
    frame : int
    mapWidth : float32
    mapHeight : float32

Returns: SimEnemy * GameEvent list

Step one frame. Returns updated SimEnemy and any generated events.

se : SimEnemy
frame : int
mapWidth : float32
mapHeight : float32
Returns: SimEnemy * GameEvent list

Type something to start searching.