Complete disaster-recovery snapshot: engine/game source, game data assets, VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive. Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false, no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
139 lines
3.0 KiB
Plaintext
139 lines
3.0 KiB
Plaintext
//------------------------------------------------------------------
|
|
// NOTE: The fsm name below MUST be changed in order for the
|
|
// script to be considered a unique entity!
|
|
|
|
|
|
|
|
|
|
fsm Generic_Jumping : integer;
|
|
|
|
|
|
//------------------------------------------------------------------
|
|
|
|
// Generic_NoAttack:
|
|
|
|
//------------------------------------------------------------------
|
|
|
|
|
|
//------------------------------------------------------------------
|
|
// Constants
|
|
//------------------------------------------------------------------
|
|
|
|
const
|
|
#include_ <content\ABLScripts\mwconst.abi>
|
|
|
|
//------------------------------------------------------------------
|
|
// Types
|
|
//------------------------------------------------------------------
|
|
|
|
type
|
|
#include_ <content\ABLScripts\mwtype.abi>
|
|
|
|
|
|
//------------------------------------------------------------------
|
|
// Variables
|
|
//------------------------------------------------------------------
|
|
|
|
var
|
|
static locpoint SpawnSpot;
|
|
|
|
static locpoint dummy_hpt;
|
|
|
|
static integer nJumpPath;
|
|
static real fAfterJumping;
|
|
//------------------------------------------------------------------
|
|
// Init: my initialization function
|
|
//------------------------------------------------------------------
|
|
|
|
function Init;
|
|
code
|
|
GetLocation(me,SpawnSpot);
|
|
SpawnSpot[1] = SpawnSpot[1] + 100;
|
|
endfunction;
|
|
//------------------------------------------------------------------
|
|
// StartState: my initial state
|
|
//------------------------------------------------------------------
|
|
|
|
state StartState;
|
|
|
|
code
|
|
//TeleportToHell(me);
|
|
|
|
trans TeleportState;
|
|
endstate;
|
|
|
|
state TeleportState;
|
|
|
|
code
|
|
|
|
if GetGlobalTrigger(GetMemoryInteger(ME,31)) == TRUE then
|
|
dummy_hpt[0] = 2;
|
|
dummy_hpt[1] = 3;
|
|
dummy_hpt[2] = 4;
|
|
teleportAndLook(ME,dummy_hpt,0,SpawnSpot);
|
|
Startup(ME);
|
|
|
|
fAfterJumping = GetTime;
|
|
|
|
trans after_TeleportState
|
|
endif;
|
|
|
|
endstate;
|
|
|
|
state after_TeleportState;
|
|
|
|
code
|
|
|
|
if GetGlobalTrigger(GetMemoryInteger(ME,30)) == TRUE then
|
|
StartExecute(ME);
|
|
|
|
trans WaitState;
|
|
endif;
|
|
|
|
endstate;
|
|
|
|
state WaitState;
|
|
code
|
|
if IsDead(ME) then
|
|
trans DeadState;
|
|
endif;
|
|
|
|
//if CanJump...
|
|
fAfterJumping = GetTime + 4.5;
|
|
|
|
//nJumpPath = GetMemoryInteger(ME,28);
|
|
//orderMoveToRigid(nJumpPath, 50, 2, TRUE, FALSE); //param 3: PATROL_UNDEF=0,PATROL_SINGLE=1,PATROL_LOOP=2,PATROL_SEESAW=3
|
|
|
|
//orderMoveToLocPoint(SpawnSpot, 50, TRUE, FALSE);
|
|
trans WaitState2;
|
|
endstate;
|
|
|
|
state WaitState2;
|
|
code
|
|
if IsDead(ME) then
|
|
trans DeadState;
|
|
endif;
|
|
|
|
if (fAfterJumping <= GetTime) then
|
|
trans JumpState;
|
|
endif;
|
|
endstate;
|
|
|
|
state JumpState;
|
|
code
|
|
if IsDead(ME) then
|
|
trans DeadState;
|
|
endif;
|
|
|
|
teleportAndLook(ME,dummy_hpt,0,SpawnSpot);
|
|
Jump(ME,2);
|
|
trans WaitState;
|
|
endstate;
|
|
|
|
state DeadState;
|
|
code
|
|
orderDie;
|
|
endstate;
|
|
|
|
endfsm.
|