Atrinik Server  4.0
Macros
Monster movements

Macros

#define DISTATT   1
 
#define RUNATT   2
 
#define HITRUN   3
 
#define WAITATT   4
 
#define RUSH   5
 
#define ALLRUN   6
 
#define DISTHIT   7
 
#define WAIT2   8
 
#define UNUSED_MOVE   16
 
#define CIRCLE1   32
 
#define CIRCLE2   48
 
#define PACEH   64
 
#define PACEH2   80
 
#define RANDO   96
 
#define RANDO2   112
 
#define PACEV   128
 
#define PACEV2   144
 
#define WPOINT   176
 
#define LO4   15
 
#define HI4   240
 

Detailed Description

The following definitions are for the attack_movement variable in monsters if the attack_variable movement is left out of the monster archetype, or is set to zero the standard mode of movement from previous versions of crossfire will be used. the upper four bits of movement data are not in effect when the monst er has an enemy. these should only be used for non aggressive monsters. to program a monsters movement add the attack movement numbers to the movem ment numbers example a monster that moves in a circle until attacked and then attacks from a distance: CIRCLE1 = 32

+ DISTATT = 1

attack_movement = 33

Author
kholl.nosp@m.and@.nosp@m.sunla.nosp@m.b.ci.nosp@m.t.cor.nosp@m.nell.nosp@m..edu

Macro Definition Documentation

#define ALLRUN   6

Always run never attack good for sim. of weak player

Definition at line 1414 of file define.h.

#define CIRCLE1   32

if the upper four bits of move_type / attack_movement are set to this number, the monster will move in a circle until it is attacked, or the enemy field is set, this is good for non-aggressive monsters and NPC

Definition at line 1428 of file define.h.

#define CIRCLE2   48

Same as above but a larger circle is used

Definition at line 1431 of file define.h.

#define DISTATT   1

Move toward a player if far, but maintain some space, attack from a distance - good for missile users only

Definition at line 1404 of file define.h.

#define DISTHIT   7

Attack from a distance if hit as recommended by Frank

Definition at line 1416 of file define.h.

#define HITRUN   3

Run to then hit player then run away cyclically

Definition at line 1408 of file define.h.

#define PACEH   64

The Monster will pace back and forth until attacked this is HORIZONTAL movement

Definition at line 1437 of file define.h.

#define PACEH2   80

the monster will pace as above but the length of the pace area is longer and the monster stops before changing directions this is HORIZONTAL movement

Definition at line 1445 of file define.h.

#define PACEV   128

The Monster will pace back and forth until attacked this is VERTICAL movement

Definition at line 1461 of file define.h.

#define PACEV2   144

the monster will pace as above but the length of the pace area is longer and the monster stops before changing directions this is VERTICAL movement

Definition at line 1469 of file define.h.

#define RANDO   96

the monster will go in a random direction until it is stopped by an obstacle, then it chooses another direction.

Definition at line 1452 of file define.h.

#define RANDO2   112

constantly move in a different random direction

Definition at line 1455 of file define.h.

#define RUNATT   2

Run but attack if player catches up to object

Definition at line 1406 of file define.h.

#define RUSH   5

Rush toward player blindly, similar to dumb monster

Definition at line 1412 of file define.h.

#define WAIT2   8

Monster does not try to move towards player if far

Definition at line 1418 of file define.h.

#define WAITATT   4

Wait for player to approach then hit, move if hit

Definition at line 1410 of file define.h.

#define WPOINT   176

The monster uses waypoints (if it has any)

Definition at line 1472 of file define.h.