Skip to main content

enemy-h

source

Types


anim-info

anim-info: structuresource
Fields
anim-index: int32
travel-speed: meters

enemy

enemy: process-focusablesource
Fields
type: type
name: string
mask: process-mask
clock: clock
parent: pointer
brother: pointer
child: pointer
ppointer: pointer
self: process-tree
pool: dead-pool
status: symbol
pid: int32
main-thread: cpu-thread
top-thread: cpu-thread
entity: entity-actor
level: level
state: state
next-state: state
trans-hook: function
post-hook: function
event-hook: function
allocated-length: int32
pad-unknown-0: uint32
heap-base: pointer
heap-top: pointer
heap-cur: pointer
stack-frame-top: stack-frame
connection-list: connectable
stack: uint8
root: trsqv
node-list: cspace-array
draw: draw-control
skel: joint-control
nav: nav-control
align: align-control
path: path-control
vol: vol-control
fact: fact-info
link: actor-link-info
part: sparticle-launch-control
water: water-control
sound: ambient-sound
carry: carry-info
rbody: rigid-body-control
state-flags: state-flags
state-time: time-frame
root-override: collide-shape
focus-status: focus-status
root-override2: collide-shape-moving
fact-info-override: fact-info-enemy
enemy-flags: enemy-flag
enemy-info: enemy-info
hit-points: int32
gnd-collide: uint32
attack-id: uint32
persistent-attack-id: uint32
water-max-height: meters
water-surface-height: meters
desired-angle: degrees
jump-why: uint64
penetrated-by-all: penetrate
penetrated-flinch: penetrate
penetrated-knocked: penetrate
reaction-time: time-frame
notice-time: time-frame
state-timeout: time-frame
auto-reset-penetrate-time: time-frame
hit-focus-time: time-frame
last-draw-time: time-frame
starting-time: time-frame
fated-time: time-frame
focus-pos: vector
event-param-point: vector
jump-dest: vector
focus: enemy-focus
incoming: enemy-attack-info
actor-group: pointer
actor-group-count: int32
neck: joint-mod
on-notice: symbol
on-active: symbol
on-hostile: symbol
on-death: symbol
idle-anim-player: idle-control
rand-gen: symbol
Methods
dormant: unknown
dormant-aware: unknown
hit: unknown
knocked: unknown
idle: unknown
active: unknown
notice: unknown
flee: unknown
stare: unknown
hostile: unknown
victory: unknown
die: unknown
die-falling: unknown
die-fast: unknown
directed: unknown
jump: unknown
jump-blocked: unknown
ambush: unknown
view-anims: unknown
enemy-method-46(obj: sig, arg0: int) => nonesource

@abstract

enemy-method-47(obj: enemy, arg0: vector) => floatsource
enemy-method-48(obj: enemy, arg0: process, arg1: event-message-block) => intsource
enemy-method-49(obj: enemy) => time-framesource
enemy-method-50(obj: enemy, arg0: vector) => vectorsource
enemy-method-51(obj: ashelin) => floatsource
enemy-method-52(obj: enemy, arg0: vector) => nonesource
enemy-method-53(obj: enemy, proc-focus: process-focusable) => symbolsource

TODO

enemy-method-54(obj: enemy) => enemy-flagsource
track-target!(obj: sig) => nonesource

Does a lot of various things relating to interacting with the target
- tracks when the enemy was last drawn
- looks at the target and handles attacking
@TODO Not extremely well understood yet

damage-amount-from-attack(obj: enemy, arg0: process, arg1: event-message-block) => intsource
update-target-awareness!(obj: enemy, arg0: process-focusable, arg1: enemy-best-focus) => enemy-awaresource

Checks a variety of criteria to determine the level of awareness the enemy is of the target. Sets aware and related fields as well!
@TODO - flesh out docs

enemy-method-58(obj: citizen-rebel, arg0: process, arg1: event-message-block) => symbolsource
get-penetrate-info(obj: ashelin) => penetratesource

@see penetrate and penetrated-by-all&hit-points->penetrated-by

coin-flip?(obj: enemy) => symbolsource
enemy-method-61(obj: enemy, arg0: int) => intsource
enemy-method-62(obj: enemy) => nonesource
enemy-method-63(obj: enemy, arg0: process-focusable, arg1: enemy-aware) => symbolsource
enemy-method-64(obj: enemy) => nonesource
enemy-method-65(obj: enemy) => nonesource
go-ambush(obj: enemy) => nonesource
go-stare(obj: enemy) => nonesource
go-stare2(obj: enemy) => nonesource
go-directed(obj: enemy) => nonesource
go-hostile(obj: ashelin) => nonesource
go-flee(obj: enemy) => nonesource
react-to-focus(obj: ashelin) => nonesource

@TODO - flesh out docs

kill-prefer-falling(obj: enemy) => objectsource

If available in enemy-info, go to the die-falling state, if not, die

general-event-handler(obj: sig, arg0: process, arg1: int, arg2: symbol, arg3: event-message-block) => objectsource

Handles various events for the enemy
@TODO - unsure if there is a pattern for the events and this should have a more specific name

enemy-method-75(obj: enemy, arg0: process, arg1: event-message-block) => objectsource
enemy-method-76(obj: enemy, arg0: process, arg1: event-message-block) => symbolsource
enemy-method-77(obj: ashelin, arg0: pointer) => symbolsource
enemy-method-78(obj: ashelin, arg0: pointer) => symbolsource
enemy-method-79(obj: ashelin, arg0: int, arg1: enemy-knocked-info) => symbolsource
enemy-method-80(obj: enemy, arg0: enemy-knocked-info) => symbolsource
enemy-method-81(obj: enemy) => symbolsource
enemy-method-82(obj: enemy, arg0: enemy-jump-info) => symbolsource

@abstract

enemy-method-83(obj: enemy, arg0: enemy-jump-info) => nonesource
enemy-method-84(obj: sig, arg0: enemy-jump-info) => nonesource
enemy-method-85(obj: sig) => floatsource
enemy-method-86(obj: sig) => symbolsource
enemy-method-87(obj: enemy, arg0: enemy-jump-info) => symbolsource
enemy-method-88(obj: sig, arg0: enemy-jump-info) => symbolsource
enemy-method-89(obj: sig, arg0: enemy-jump-info) => symbolsource
enemy-method-90(obj: enemy, arg0: int, arg1: enemy-jump-info) => symbolsource
enemy-method-91(obj: enemy, arg0: int, arg1: enemy-jump-info) => nonesource
enemy-method-92(obj: enemy, arg0: int, arg1: nav-poly) => nonesource

TODO - nav-poly is a guess
@abstract

enemy-method-93(obj: enemy) => nonesource
enemy-method-94(obj: enemy, arg0: vector, arg1: float) => symbolsource
enemy-method-95(obj: enemy, arg0: vector, arg1: float) => symbolsource
enemy-method-96(obj: enemy, arg0: float, arg1: symbol) => symbolsource
enemy-method-97(obj: ashelin) => processsource
in-aggro-range?(obj: enemy, arg0: process-focusable, arg1: vector) => symbolsource

Should the enemy activate.
- if activate-distance is 0.0, always true
- otherwise, check if the provided process is close enough

enemy-method-99(obj: enemy, arg0: process-focusable) => symbolsource
enemy-method-100(obj: enemy) => symbolsource
enemy-method-101(obj: enemy) => nonesource
enemy-method-102(obj: enemy) => symbolsource
enemy-method-103(obj: enemy) => collide-specsource
enemy-method-104(obj: ashelin, arg0: process, arg1: touching-shapes-entry, arg2: uint) => symbolsource
enemy-method-105(obj: sig, arg0: process) => enemy-flagsource
enemy-method-106(obj: ashelin, arg0: process, arg1: object, arg2: int, arg3: attack-info) => nonesource
get-enemy-target(obj: enemy) => process-focusablesource
enemy-method-108(obj: enemy, arg0: enemy, arg1: event-message-block) => intsource
look-at-target!(obj: enemy, arg0: enemy-flag) => nonesource

Logic for looking at the target that is locked on, sets some flags and adjusts the neck to look at the target if available

stop-looking-at-target!(obj: enemy) => nonesource

Will unset enemy-flag::death-start and enemy-flag::lock-focus and call joint-mod::shut-down if applicable

enemy-method-111(obj: enemy) => nonesource
set-enemy-info!(obj: enemy, arg0: enemy-info) => nonesource

In addition to setting the enemy-info, also init the neck-joint if applicable from it

init-enemy-behaviour-and-stats!(obj: enemy, arg0: enemy-info) => nonesource

Initializes a bunch of enemy fields related to how they should react, how many hitpoints they should have, etc

init-enemy-collision!(obj: ashelin) => nonesource

Initializes the collide-shape-moving and any ancillary tasks to make the enemy collide properly

init-enemy!(obj: ashelin) => nonesource

Common method called to initialize the enemy, typically sets up default field values and calls ancillary helper methods

go-idle(obj: ashelin) => nonesource
get-rand-float(obj: enemy) => floatsource
get-rand-float-range(obj: enemy, low: float, high: float) => floatsource
get-rand-int(obj: enemy, high: int) => intsource

@see rand-vu

enemy-method-120(obj: enemy, arg0: int, arg1: int) => intsource

TODO

get-rand-int-range(obj: enemy, low: int, high: int) => intsource
rng-hit?(obj: enemy, chance: float) => symbolsource

TODO - not the best name

enemy-method-123(obj: enemy, arg0: float) => symbolsource

TODO

enemy-method-124(obj: enemy) => collide-specsource

TODO

enemy-method-125(obj: enemy, arg0: collide-query, arg1: collide-spec, arg2: float, arg3: float, arg4: float) => pat-surfacesource
enemy-above-ground?(obj: enemy, arg0: collide-query, arg1: vector, arg2: collide-spec, arg3: float, arg4: float, arg5: float) => symbolsource

@see above-ground?

enemy-method-127(obj: enemy, arg0: float, arg1: float, arg2: symbol, arg3: collide-spec) => symbolsource
enemy-method-128(obj: enemy, arg0: vector, arg1: move-above-ground-params) => nonesource
enemy-method-129(obj: enemy) => nonesource
enemy-method-130(obj: enemy, arg0: float) => symbolsource
enemy-method-131(obj: enemy, arg0: int) => uintsource
dispose!(obj: enemy) => nonesource

Cleans-up the enemy and any associated resources. Potentially spawns skull gems

enemy-method-133(obj: enemy) => symbolsource
enemy-method-134(obj: enemy, arg0: process, arg1: attack-info) => process-focusablesource
enemy-method-135(obj: enemy, arg0: int) => sound-idsource
enemy-method-136(obj: ashelin) => enemy-flagsource

enemy-attack-info

enemy-attack-info: structuresource
Fields
attack-id: uint32
knocked-type: knocked-type
blue-juggle-count: uint8
attacker-handle: handle
attack-time: time-frame
penetrate-using: uint64
attacker-pos: vector
attack-direction: vector

enemy-best-focus

enemy-best-focus: structuresource
Fields
proc: process
rating: float
aware: enemy-aware

enemy-focus

enemy-focus: focussource
Fields
handle: handle
collide-with: collide-spec
aware: enemy-aware
flags: enemy-flag
Methods
try-update-focus(obj: enemy-focus, arg0: process-focusable, arg1: enemy) => symbolsource
enemy-focus-method-13(obj: enemy-focus, arg0: process-focusable, arg1: enemy-aware) => symbolsource

enemy-info

enemy-info: basicsource
Fields
type: type
fact-defaults: fact-info-enemy-defaults
use-die-falling: symbol
use-victory: symbol
use-jump-blocked: symbol
debug-draw-neck: symbol
jump-debug-draw: symbol
move-to-ground: symbol
hover-if-no-ground: symbol
idle-anim-script: pointer
idle-anim: int32
notice-anim: int32
hostile-anim: int32
hit-anim: int32
knocked-anim: int32
knocked-land-anim: int32
die-anim: int32
die-falling-anim: int32
victory-anim: int32
jump-wind-up-anim: int32
jump-in-air-anim: int32
jump-land-anim: int32
neck-joint: int32
look-at-joint: int32
bullseye-joint: int32
sound-hit: sound-name
sound-die: sound-name
notice-distance: meters
notice-distance-delta: meters
proximity-notice-distance: meters
default-hit-points: int32
gnd-collide-with: collide-spec
overlaps-others-collide-with-filter: collide-spec
penetrate-flinch: penetrate
penetrate-knocked: penetrate
movement-gravity: meters
friction: float
slip-factor: float
attack-shove-back: meters
attack-shove-up: meters
attack-mode: symbol
attack-damage: int32
recover-gnd-collide-with: collide-spec
jump-height-min: meters
jump-height-factor: float
knocked-seek-ry-clamp: float
knocked-soft-vxz-lo: float
knocked-soft-vxz-hi: float
knocked-soft-vy-lo: float
knocked-soft-vy-hi: float
knocked-medium-vxz-lo: float
knocked-medium-vxz-hi: float
knocked-medium-vy-lo: float
knocked-medium-vy-hi: float
knocked-hard-vxz-lo: float
knocked-hard-vxz-hi: float
knocked-hard-vy-lo: float
knocked-hard-vy-hi: float
knocked-huge-vxz-lo: float
knocked-huge-vxz-hi: float
knocked-huge-vy-lo: float
knocked-huge-vy-hi: float
knocked-yellow-vxz-lo: float
knocked-yellow-vxz-hi: float
knocked-yellow-vy-lo: float
knocked-yellow-vy-hi: float
knocked-red-vxz-lo: float
knocked-red-vxz-hi: float
knocked-red-vy-lo: float
knocked-red-vy-hi: float
knocked-blue-vxz-lo: float
knocked-blue-vxz-hi: float
knocked-blue-vy-lo: float
knocked-blue-vy-hi: float
shadow-size: meters
shadow-max-y: meters
shadow-min-y: meters
shadow-locus-dist: meters
gem-joint: int32
gem-seg: uint32
gem-no-seg: uint32
gem-offset: sphere
Methods
copy-enemy-info!(obj: enemy-info, obj-to-copy: enemy-info) => nonesource

Copies the given enemy-info into the current enemy-info

enemy-init-by-other-params

enemy-init-by-other-params: structuresource
Fields
trans: vector
quat: quaternion
entity: entity
directed?: symbol
no-initial-move-to-ground?: symbol

enemy-jump-info

enemy-jump-info: structuresource
Fields
flags: uint8
anim-speed: float
hang-time: time-frame
start-pos: vector
dest-pos: vector
traj: trajectory

enemy-knocked-info

enemy-knocked-info: structuresource
Fields
anim-speed: float
on-surface-count: int32
move-count: int32
land-can-land-time: time-frame

Functions


enemy-die-falling-post

enemy-die-falling-post() => nonesource

enemy-event-handler

enemy-event-handler(arg0: process, arg1: int, arg2: symbol, arg3: event-message-block) => objectsource

enemy-falling-post

enemy-falling-post() => nonesource

enemy-init-by-other

enemy-init-by-other(arg0: process-drawable, arg1: transformq) => nonesource

enemy-simple-post

enemy-simple-post() => nonesource

get-penetrate-using-from-attack-event

get-penetrate-using-from-attack-event(arg0: process-drawable, arg1: event-message-block) => penetratesource

ja-group-index?

ja-group-index?(arg0: int) => symbolsource

Variables


*enemy-dummy-shadow-control*

*enemy-dummy-shadow-control*: shadow-controlsource

traffic-h

source

Types


mystery-traffic-object-spawn-params

mystery-traffic-object-spawn-params: structuresource

traffic-danger-info

traffic-danger-info: structuresource
Fields
sphere: sphere
velocity: vector
handle: handle
notify-radius: float
danger-level: float
decay-rate: float
flags: traffic-danger-flags
danger-type: traffic-danger-type

traffic-object-spawn-params

traffic-object-spawn-params: structuresource
Fields
object-type: traffic-type
behavior: uint64
id: uint32
nav-mesh: nav-mesh
nav-branch: nav-branch
position: vector
rotation: quaternion
velocity: vector
handle: handle
guard-type: uint8
user-data: uint32
flags: traffic-spawn-flags
proc: process

traffic-suppression-params

traffic-suppression-params: structuresource
Fields
bbox: bounding-box
duration: time-frame
id: int8
Methods
try-creating-new-suppression-box(obj: traffic-suppression-params) => symbolsource

Try getting new suppression box, return if it succeeded. ID is stored in the params.

create-or-update-suppression-box(obj: traffic-suppression-params) => symbolsource

If the params are already associated with a box, update. Otherwise, attempt to create a new one.

has-valid-id?(obj: traffic-suppression-params) => nonesource
kill-suppression-box(obj: traffic-suppression-params) => nonesource

Kill a suppression box, and inform the traffic manager by setting duration to 0.

Variables


*ctywide-entity*

*ctywide-entity*: entitysource

*lwide-entity*

*lwide-entity*: entitysource

*race-vehicle-entity*

*race-vehicle-entity*: entity-actorsource

*traffic-manager*

*traffic-manager*: processsource