Turok
Stay Dead!
Behemoth  [开发者] 2017 年 10 月 15 日 下午 3:20
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(); } } } }
最后由 Behemoth 编辑于; 2017 年 10 月 15 日 下午 3:20
< >
正在显示第 1 - 7 条,共 7 条留言
Convenient Spider 2017 年 10 月 15 日 下午 3:50 
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  [开发者] 2017 年 10 月 15 日 下午 4:33 
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.
最后由 Behemoth 编辑于; 2017 年 10 月 15 日 下午 4:34
Delicious Meatloaf 2017 年 11 月 14 日 上午 6:35 
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()) )
{
Delicious Meatloaf 2017 年 11 月 14 日 上午 6:37 
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  [开发者] 2017 年 11 月 14 日 下午 12:15 
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); } }
最后由 Behemoth 编辑于; 2017 年 11 月 14 日 下午 12:16
hey buddy 2018 年 1 月 22 日 上午 12:53 
引用自 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 2018 年 11 月 22 日 下午 2:29 
I'm not using Turok+ mod, but getting an error about the file not being located, even though it's there.... Weird.
< >
正在显示第 1 - 7 条,共 7 条留言
每页显示数: 1530 50