Turok
Stay Dead!
Behemoth  [developer] 15 Oct, 2017 @ 3:20pm
If incompatible with other mods
This mod is only 6 lines of code so if you know what you're doing you could edit the scripts/enemy/enemy.txt file and overwrite the OnTick method for whatever mod you want to keep compatibility with, such as the turok+ mod.

void OnTick(void) { if ((self.Flags() & AF_DEAD) != 0) { //START Stay Dead Mod -------------------- kAI @ai = self.CastToAI(); if (ai !is null) { ai.AIFlags() |= (1 << 6); self.MarkPersistentBit(false); } //END Stay Dead Mod -------------------- if(m_deathFreezeTime > 0) { m_deathFreezeTime -= GAME_DELTA_TIME; if(m_deathFreezeTime <= 0) { Game.SpawnFx("fx/freeze_explosion.kfx", self.Origin(), self.SectorIndex()); self.Remove(); } } } }
Last edited by Behemoth; 15 Oct, 2017 @ 3:20pm
< >
Showing 1-7 of 7 comments
Convenient Spider 15 Oct, 2017 @ 3:50pm 
I don't know what I'm doing. I don't know the first thing about this. Do I open this with the editor or some software? Can you explain the step by step process to someone who's never messed with code before?
Behemoth  [developer] 15 Oct, 2017 @ 4:33pm 
1) Find the turok+ mod .kpf file and unzip it.
2) Open the scripts/enemy/enemy.txt file in any text editor and find the line "void OnTick(void)" and Add this code
//START Stay Dead Mod -------------------- kAI @ai = self.CastToAI(); if (ai !is null) { ai.AIFlags() |= (1 << 6); self.MarkPersistentBit(false); } //END Stay Dead Mod --------------------
under the lines
if ((self.Flags() & AF_DEAD) != 0) {
3) Save the file. Select all the folders that were unzipped with the .kpf and zip them back up with .kpf extension.
Last edited by Behemoth; 15 Oct, 2017 @ 4:34pm
My enemy.txt in turok plus look like this , where do l add the line?



OnTick
==============================================================
*/

void OnTick(void)
{
// Smoke39
FixCollisionVolume();

// Smoke39
if ( bDeathTaunt )
{
// Taunt_EnemyDeath( self, DeathDamDef );
TauntSystem::EnemyDeath( this, DeathDamDef );
bDeathTaunt = false;
@DeathDamDef = null;
}
// if ( self.Flags() & AF_DEAD != 0 && !self.OnGround() )
// PlayTaunt( Taunt_Kill_Fall, 0 );

if ( self.CanSee(Player.Actor()) )
{
l mean there is only

// if ( self.Flags() & AF_DEAD != 0 && !self.OnGround() )

but no

if ((self.Flags() & AF_DEAD) != 0)
{


so l don't know here to add the 6 lines.
Behemoth  [developer] 14 Nov, 2017 @ 12:15pm 
ok then just copy this into there.

if ((self.Flags() & AF_DEAD) != 0) { kAI @ai = self.CastToAI(); if (ai !is null) { ai.AIFlags() |= (1 << 6); self.MarkPersistentBit(false); } }
Last edited by Behemoth; 14 Nov, 2017 @ 12:16pm
hey buddy 22 Jan, 2018 @ 12:53am 
Originally posted by BehemothProgrammer:
1) Find the turok+ mod .kpf file and unzip it.
2) Open the scripts/enemy/enemy.txt file in any text editor and find the line "void OnTick(void)" and Add this code
//START Stay Dead Mod -------------------- kAI @ai = self.CastToAI(); if (ai !is null) { ai.AIFlags() |= (1 << 6); self.MarkPersistentBit(false); } //END Stay Dead Mod --------------------
under the lines
if ((self.Flags() & AF_DEAD) != 0) {
3) Save the file. Select all the folders that were unzipped with the .kpf and zip them back up with .kpf extension.


Thanks man! This helped a bunch.
Destructo 22 Nov, 2018 @ 2:29pm 
I'm not using Turok+ mod, but getting an error about the file not being located, even though it's there.... Weird.
< >
Showing 1-7 of 7 comments
Per page: 1530 50