Post reply

Name:
Email:
Subject:
Message icon:

Attach:
(Clear Attachment)
(more attachments)
Restrictions: 4 per post, maximum total size 1024KB, maximum individual size 1024KB
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
Type ot the full word: TUR**:
Finish the word: Turok 2: Seeds of ****:
Finish the word: Turok Dinosaur ******:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: BehemothProgrammer
« on: February 27, 2018, 04:19:11 PM »

I updated the package to include new info I found. I also added several additional subpages in the help file for descriptions on stuff like all the modeStates, Event Links, more EnemyAIComponent Info, Regions, Cinematics, etc. And I added the T2Flags program for EnemyAIComponents into the zip file.
Posted by: Jay Doomed
« on: November 29, 2017, 10:51:06 AM »

EventLynx

Basically that's what they are xD

Behemoth thanks the flag tool could be useful for me.

 :campaigner:
Posted by: Dinomite
« on: November 29, 2017, 01:16:52 AM »

EventLynx
Posted by: BehemothProgrammer
« on: November 24, 2017, 10:27:34 AM »

This was a little thing I made to help enter EnemyAI flag values, think people might find it useful. https://www.dropbox.com/s/b3chdu3sig32ybp/T2Flags.zip?dl=0

And here's Model and Animation data editors for both Turok: Dinosaur Hunter and Turok 2 in Unity. https://www.dropbox.com/s/n3cng6coohfwjqi/TurokModelAnimEditors.zip?dl=0
Posted by: BehemothProgrammer
« on: November 07, 2017, 06:37:57 PM »

I wasn't sure where to put this additional info I've collected about T2 so I just throw it into a text file here - https://pastebin.com/raw/jjbgSStB

It tells you what the behaviour property values means for EnemyAIComponent. The meaning of EventLink Trigger Types for some components. Mission Objectives. Mission Teleports. Cinema Types. Hidden cvars. and all the mode state values. All stuff for when your making SP maps.
Posted by: Jay Doomed
« on: October 24, 2017, 03:27:29 PM »

I added the AngelScript Array class in so autocomplete would work for it and added some more notes on the mainpage of the help to include some known bugs in the game.

As soon as I get time to check it out I will. Thanks for good work.
Posted by: vis
« on: October 23, 2017, 07:37:03 PM »

So I finally took the time to get a decent IDE up and running with AngelScript and Turok 2. I've included instructions and download links in the first post. So if you are thinking about working with T2 scripts no matter your skill level, I highly recommend following those instructions.



Tnx, man! : ) I just hope next remaster patch will move things on positive scale, in mp... : O
Posted by: BehemothProgrammer
« on: October 23, 2017, 07:27:11 PM »

I added the AngelScript Array class in so autocomplete would work for it and added some more notes on the mainpage of the help to include some known bugs in the game.
Posted by: Jay Doomed
« on: September 29, 2017, 10:03:05 AM »

Wow that's crazy thanks for this. That's very nice and helpful too.
Posted by: Rok
« on: September 27, 2017, 01:05:44 PM »

Have no idea how you do these things but really cool. I'm an absolute noob in scripting so if I ever try it I would definitely use this. Good work!
Posted by: Duke64
« on: September 26, 2017, 07:45:26 PM »

Man we were just talking about Doom does this xD You're awesome thanks! Under "Turok 2 tools" on Turok Sanctum. Just pm me if any changes to that post are needed there.

https://turoksanctum.com/turok-2-api/
Posted by: BehemothProgrammer
« on: September 26, 2017, 06:42:51 PM »

So I finally took the time to get a decent IDE up and running with AngelScript and Turok 2. I've included instructions and download links in the first post. So if you are thinking about working with T2 scripts no matter your skill level, I highly recommend following those instructions.
Posted by: BehemothProgrammer
« on: September 07, 2017, 06:30:26 PM »

Updated the ScriptAPI.txt file with the additional actor func void AddToGallery(void) added in last update. As well I detailed some of the enemy common flags. And added a few notes here and there.
Posted by: ilgm
« on: June 21, 2017, 08:57:41 PM »

Really helpful, thanks.

I added some AI scripts in so I can put them in Raptor Fest. Might add more later

Fireborn, Biobot, Primagen Guard, Primagen Trooper, Nala, Cave Spider, Flesh Sentinal, Death Guard, and Lord of the Flesh

Code: [Select]
Fireborn kActor_AI_Fireborn
{
    className                 "kexActor"
    placeable                 TRUE
    health                    40
    initialScale              "0.5 0.5 0.5"
    Begin_Component "kexRenderMeshComponent"
        mesh                  "char/Fireborn.skinnedmesh"
        anim                  "anims/Fireborn.anim"
    End_Component
    Begin_Component "kexWorldComponent"
        radius                40.959999
        wallRadius            51.199997
        height                122.879997
        deadHeight            20.480000
        heightOffset          0.000000
        bTrackGround          TRUE
    End_Component
    Begin_Component "kexEnemyAIComponent"
        commonFlags           40372
        startHealth           40
        startAnimID           0
        startSoundID          0
        painSoundID           0
        deathItemDropFlags1   0
        deathItemDropFlags2   0
        leashRadius           2048.000000
        aggressionLevel       0
        tranqHealth           2
        flags                 17072176
        attackCombatRadius    163.839996
        attackLeapRadius      245.759995
        attackDartRadius      245.759995
        attackProjectileRadius 1024.000000
        attackWeaponRadius    1228.799927
        groundBehavior        1
        airBehavior           0
        underwaterBehavior    0
        extremeDeathModelIndex 1
        explodeDeathModelIndex 1
        headBlownDeathModelIndex 1
        leftArmBlownDeathModelIndex 2
        rightArmBlownDeathModelIndex 3
        bodyHoleDeathModelIndex -1
        extremeDeathAnimID    7315
        explodeDeathAnimID    7310
        headBlownDeathAnimID  7310
        leftArmBlownDeathAnimID 7345
        rightArmBlownDeathAnimID 7345
        bodyHoleDeathAnimID   0
        idleAnimFlags         33
        moveAnimFlags         8452
        patrolAnimFlags       1057
        evadeAnimFlags        0
        combatAnimFlags       1
        leapAnimFlags         0
        dartAnimFlags         0
        projectileAnimFlags   4
        weaponAnimFlags       0
        comboAnimFlags        0
        normalDeathAnimFlags  8452
        movingDeathAnimFlags  4
        violentDeathAnimFlags 0
        explosiveDeathAnimFlags 1
        alertAnimFlags        1
        takeCoverAnimFlags    0
        leftArmWoundAnimFlags 1
        rightArmWoundAnimFlags 1
        fleeAnimFlags         1
    End_Component
}

CaveSpider kActor_AI_CaveSpider
{
    className                 "kexActor"
    placeable                 TRUE
    health                    150
    initialScale              "0.500000 0.500000 0.500000"
    Begin_Component "kexRenderMeshComponent"
        mesh                  "char/Spider_Adult.skinnedmesh"
        anim                  "anims/Spider_Adult.anim"
    End_Component
    Begin_Component "kexWorldComponent"
        radius                61.4
        wallRadius            92.2
        height                112.6
        deadHeight            61.43
        heightOffset          0.000000
        bTrackGround          TRUE
    End_Component
    Begin_Component "kexEnemyAIComponent"
        commonFlags           6420
        startAnimID           11200
deathItemDropFlags1   0
deathItemDropFlags1   0
leashRadius   2560.0
aggressionLevel   0
tranqHealth   20
startSoundID   0
painSoundID   841
flags   0
attackCombatRadius   204.799988
attackLeapRadius   163.83
attackDartRadius      163.83
attackProjectileRadius 921.59
attackWeaponRadius     1842.19
groundBehavior         1
airBehavior    0
underwaterBehavior     0
extremeDeathModelIndex -1
explodeDeathModelIndex -1
headBlownDeathModelIndex -1
leftArmBlownDeathModelIndex -1
rightArmBlownDeathModelIndex -1
bodyHoleDeathModelIndex -1
extremeDeathAnimID    0
    explodeDeathAnimID    0
        headBlownDeathAnimID  0
        leftArmBlownDeathAnimID 0
        rightArmBlownDeathAnimID 0
        bodyHoleDeathAnimID   0
        idleAnimFlags         1057
        moveAnimFlags         1057
        patrolAnimFlags       1056
        evadeAnimFlags        0
        combatAnimFlags       1
        leapAnimFlags         0
        dartAnimFlags         0
        projectileAnimFlags   0
        weaponAnimFlags       1
        comboAnimFlags        0
        normalDeathAnimFlags  1057
        movingDeathAnimFlags  0
        violentDeathAnimFlags 0
        explosiveDeathAnimFlags 1
        alertAnimFlags        0
        takeCoverAnimFlags    0
        leftArmWoundAnimFlags 0
        rightArmWoundAnimFlags 0
        fleeAnimFlags         0
startHealth   150
pathTID   -1

    End_Component
}

Nala kActor_AI_Nala
{
    className                 "kexActor"
    placeable                 TRUE
    health                    30
    initialScale              "0.5 0.5 0.5"
    Begin_Component "kexRenderMeshComponent"
        mesh                  "char/Nala_normal.skinnedmesh"
        anim                  "anims/Nala_normal.anim"
    End_Component
    Begin_Component "kexWorldComponent"
        radius                10.2
        wallRadius            51.199997
        height                71.68
        deadHeight            20.480000
        heightOffset          0.000000
        bTrackGround          TRUE
    End_Component
    Begin_Component "kexEnemyAIComponent"
        commonFlags           7444
        startAnimID           0
        startSoundID          0
        painSoundID           0
        deathItemDropFlags1   0
        deathItemDropFlags2   0
        leashRadius           2560.000000
        aggressionLevel       0
        tranqHealth           20
        flags                 0
        attackCombatRadius    81.839996
        attackLeapRadius      163.8
        attackDartRadius      163.8
        attackProjectileRadius 1024.000000
        attackWeaponRadius    409.599927
        groundBehavior        1
        airBehavior           0
        underwaterBehavior    0
        extremeDeathModelIndex 1
        explodeDeathModelIndex 1
        headBlownDeathModelIndex 1
        leftArmBlownDeathModelIndex -1
        rightArmBlownDeathModelIndex -1
        bodyHoleDeathModelIndex 1
        extremeDeathAnimID    7300
        explodeDeathAnimID    7300
        headBlownDeathAnimID  7300
        leftArmBlownDeathAnimID 0
        rightArmBlownDeathAnimID 0
        bodyHoleDeathAnimID   7300
        idleAnimFlags         1057
        moveAnimFlags         1059
        patrolAnimFlags       1056
        evadeAnimFlags        0
        combatAnimFlags       0
        leapAnimFlags         0
        dartAnimFlags         0
        projectileAnimFlags   1
        weaponAnimFlags       0
        comboAnimFlags        0
        normalDeathAnimFlags  1057
        movingDeathAnimFlags  0
        violentDeathAnimFlags 0
        explosiveDeathAnimFlags 0
        alertAnimFlags        0
        takeCoverAnimFlags    0
        leftArmWoundAnimFlags 0
        rightArmWoundAnimFlags 0
        fleeAnimFlags         0
startHealth           30
pathTID   -1
    End_Component
}

PrimagenGuard kActor_AI_PrimagenGuard
{
    className                 "kexActor"
    placeable                 TRUE
    health                    100
    initialScale              "0.5 0.5 0.5"
    Begin_Component "kexRenderMeshComponent"
        mesh                  "char/Elite_Guard.skinnedmesh"
        anim                  "anims/Elite_Guard.anim"
    End_Component
    Begin_Component "kexWorldComponent"
        radius                51.959999
        wallRadius            51.199997
        height                174.879997
        deadHeight            51.480000
        heightOffset          -2.500000
        bTrackGround          TRUE
    End_Component
    Begin_Component "kexEnemyAIComponent"
        commonFlags           40324
        startAnimID           0
        deathItemDropFlags1   33554432
        deathItemDropFlags2   0
        leashRadius           1024.000000
        aggressionLevel       0
        tranqHealth           20
        startSoundID          0
        painSoundID           0
        flags                 0
        attackCombatRadius    225.279
        attackLeapRadius      358.759995
        attackDartRadius      163.759995
        attackProjectileRadius 409.000000
        attackWeaponRadius    2048.799927
        groundBehavior        0
        airBehavior           0
        underwaterBehavior    0
        extremeDeathModelIndex 1
        explodeDeathModelIndex 5
        headBlownDeathModelIndex 4
        leftArmBlownDeathModelIndex 2
        rightArmBlownDeathModelIndex 3
        bodyHoleDeathModelIndex -1
        extremeDeathAnimID    7300
        explodeDeathAnimID    7325
        headBlownDeathAnimID  7325
        leftArmBlownDeathAnimID 7100
        rightArmBlownDeathAnimID 7100
        bodyHoleDeathAnimID   0
        idleAnimFlags         1057
        moveAnimFlags         1057
        patrolAnimFlags       1057
        evadeAnimFlags        0
        combatAnimFlags       1
        leapAnimFlags         1
        dartAnimFlags         0
        projectileAnimFlags   0
        weaponAnimFlags       3
        comboAnimFlags        0
        normalDeathAnimFlags  1057
        movingDeathAnimFlags  0
        violentDeathAnimFlags 1
        explosiveDeathAnimFlags 0
        alertAnimFlags        1
        takeCoverAnimFlags    0
        leftArmWoundAnimFlags 0
        rightArmWoundAnimFlags 0
        fleeAnimFlags         0
        startHealth           100
pathTID   5000
    End_Component
}

Biobot kActor_AI_BioBot
{
    className                 "kexActor"
    placeable                 TRUE
    health                    40
    initialScale              "0.5 0.5 0.5"
    Begin_Component "kexRenderMeshComponent"
        mesh                  "char/Bio-bot.skinnedmesh"
        anim                  "anims/Bio-bot.anim"
    End_Component
    Begin_Component "kexWorldComponent"
        radius                71.959999
        wallRadius            40.199997
        height                81.879997
        deadHeight            30.480000
        heightOffset          -17.500000
        bTrackGround          TRUE
    End_Component
    Begin_Component "kexEnemyAIComponent"
        commonFlags           530692
        startAnimID           0
        deathItemDropFlags1   8192
        deathItemDropFlags2   0
        leashRadius           1024.000000
        aggressionLevel       0
        tranqHealth           20
        startSoundID          0
        painSoundID           0
        flags                 0
        attackCombatRadius    307.279
        attackLeapRadius      614.759995
        attackDartRadius      163.759995
        attackProjectileRadius 409.000000
        attackWeaponRadius    2560.799927
        groundBehavior        1
        airBehavior           0
        underwaterBehavior    0
        extremeDeathModelIndex 3
        explodeDeathModelIndex -1
        headBlownDeathModelIndex 3
        leftArmBlownDeathModelIndex 1
        rightArmBlownDeathModelIndex 2
        bodyHoleDeathModelIndex -1
        extremeDeathAnimID    7300
        explodeDeathAnimID    0
        headBlownDeathAnimID  7300
        leftArmBlownDeathAnimID 7345
        rightArmBlownDeathAnimID 7345
        bodyHoleDeathAnimID   0
        idleAnimFlags         1072
        moveAnimFlags         1057
        patrolAnimFlags       1057
        evadeAnimFlags        0
        combatAnimFlags       1
        leapAnimFlags         0
        dartAnimFlags         0
        projectileAnimFlags   0
        weaponAnimFlags       1
        comboAnimFlags        0
        normalDeathAnimFlags  1057
        movingDeathAnimFlags  0
        violentDeathAnimFlags 0
        explosiveDeathAnimFlags 1
        alertAnimFlags        0
        takeCoverAnimFlags    0
        leftArmWoundAnimFlags 0
        rightArmWoundAnimFlags 0
        fleeAnimFlags         0
        startHealth           40
pathTID   -1
    End_Component
}

PrimagenTrooper kActor_AI_PrimagenTrooper
{
    className                 "kexActor"
    placeable                 TRUE
    health                    60
    initialScale              "0.5 0.5 0.5"
    Begin_Component "kexRenderMeshComponent"
        mesh                  "char/Trooper.skinnedmesh"
        anim                  "anims/Trooper.anim"
    End_Component
    Begin_Component "kexWorldComponent"
        radius                40.959999
        wallRadius            40.199997
        height                174.879997
        deadHeight            40.480000
        heightOffset          -2.500000
        bTrackGround          TRUE
    End_Component
    Begin_Component "kexEnemyAIComponent"
        commonFlags           34196
        startAnimID           0
        deathItemDropFlags1   262144
        deathItemDropFlags2   0
        leashRadius           2560.000000
        aggressionLevel       0
        tranqHealth           20
        startSoundID          0
        painSoundID           0
        flags                 0
        attackCombatRadius    225.279
        attackLeapRadius      256.759995
        attackDartRadius      163.759995
        attackProjectileRadius 409.000000
        attackWeaponRadius    3072.799927
        groundBehavior        0
        airBehavior           0
        underwaterBehavior    0
        extremeDeathModelIndex 1
        explodeDeathModelIndex 4
        headBlownDeathModelIndex 5
        leftArmBlownDeathModelIndex 2
        rightArmBlownDeathModelIndex 3
        bodyHoleDeathModelIndex -1
        extremeDeathAnimID    7300
        explodeDeathAnimID    7325
        headBlownDeathAnimID  7335
        leftArmBlownDeathAnimID 7345
        rightArmBlownDeathAnimID 7345
        bodyHoleDeathAnimID   0
        idleAnimFlags         1057
        moveAnimFlags         1057
        patrolAnimFlags       1057
        evadeAnimFlags        1
        combatAnimFlags       1
        leapAnimFlags         0
        dartAnimFlags         0
        projectileAnimFlags   0
        weaponAnimFlags       0
        comboAnimFlags        0
        normalDeathAnimFlags  1057
        movingDeathAnimFlags  0
        violentDeathAnimFlags 1
        explosiveDeathAnimFlags 3
        alertAnimFlags        1
        takeCoverAnimFlags    0
        leftArmWoundAnimFlags 0
        rightArmWoundAnimFlags 0
        fleeAnimFlags         0
        startHealth           60
pathTID   5005
    End_Component
}

LordoftheFlesh kActor_AI_LordoftheFlesh
{
    className                 "kexActor"
    placeable                 TRUE
    health                    80
    initialScale              "0.5 0.5 0.5"
    Begin_Component "kexRenderMeshComponent"
        mesh                  "char/Lord_Of_The_Flesh.skinnedmesh"
        anim                  "anims/Lord_Of_The_Flesh.anim"
    End_Component
    Begin_Component "kexWorldComponent"
        radius                20.959999
        wallRadius            61.199997
        height                122.879997
        deadHeight            20.480000
        heightOffset          0.0
        bTrackGround          TRUE
    End_Component
    Begin_Component "kexEnemyAIComponent"
        commonFlags           40340
        startAnimID           0
        deathItemDropFlags1   0
        deathItemDropFlags2   0
        leashRadius           2560.000000
        aggressionLevel       0
        tranqHealth           5
        startSoundID          0
        painSoundID           0
        flags                 0
        attackCombatRadius    81.91
        attackLeapRadius      163.839
        attackDartRadius      163.839
        attackProjectileRadius 409.59
        attackWeaponRadius    1843.199
        groundBehavior        0
        airBehavior           0
        underwaterBehavior    0
        extremeDeathModelIndex 1
        explodeDeathModelIndex 5
        headBlownDeathModelIndex 4
        leftArmBlownDeathModelIndex 2
        rightArmBlownDeathModelIndex 3
        bodyHoleDeathModelIndex -1
        extremeDeathAnimID    7300
        explodeDeathAnimID    7500
        headBlownDeathAnimID  7000
        leftArmBlownDeathAnimID 7345
        rightArmBlownDeathAnimID 7345
        bodyHoleDeathAnimID   0
        idleAnimFlags         1057
        moveAnimFlags         1057
        patrolAnimFlags       1057
        evadeAnimFlags        0
        combatAnimFlags       1
        leapAnimFlags         0
        dartAnimFlags         0
        projectileAnimFlags   0
        weaponAnimFlags       6
        comboAnimFlags        0
        normalDeathAnimFlags  1057
        movingDeathAnimFlags  1
        violentDeathAnimFlags 1
        explosiveDeathAnimFlags 1
        alertAnimFlags        1
        takeCoverAnimFlags    0
        leftArmWoundAnimFlags 1
        rightArmWoundAnimFlags 1
        fleeAnimFlags         1
        startHealth           80
pathTID   5000
    End_Component
}

DeathGuard kActor_AI_DeathGuard
{
    className                 "kexActor"
    placeable                 TRUE
    health                    50
    initialScale              "0.5 0.5 0.5"
    Begin_Component "kexRenderMeshComponent"
        mesh                  "char/Death_Guard.skinnedmesh"
        anim                  "anims/Death_Guard.anim"
    End_Component
    Begin_Component "kexWorldComponent"
        radius                20.959999
        wallRadius            61.199997
        height                122.879997
        deadHeight            20.480000
        heightOffset          0.0
        bTrackGround          TRUE
    End_Component
    Begin_Component "kexEnemyAIComponent"
        commonFlags           40852
        startAnimID           0
        deathItemDropFlags1   0
        deathItemDropFlags2   0
        leashRadius           2560.000000
        aggressionLevel       0
        tranqHealth           3
        startSoundID          0
        painSoundID           0
        flags                 0
        attackCombatRadius    81.91
        attackLeapRadius      163.839
        attackDartRadius      163.839
        attackProjectileRadius 1024.59
        attackWeaponRadius    1843.199
        groundBehavior        0
        airBehavior           0
        underwaterBehavior    0
        extremeDeathModelIndex 3
        explodeDeathModelIndex 4
        headBlownDeathModelIndex 5
        leftArmBlownDeathModelIndex 1
        rightArmBlownDeathModelIndex 2
        bodyHoleDeathModelIndex -1
        extremeDeathAnimID    7300
        explodeDeathAnimID    7200
        headBlownDeathAnimID  7335
        leftArmBlownDeathAnimID 7345
        rightArmBlownDeathAnimID 7345
        bodyHoleDeathAnimID   0
        idleAnimFlags         1057
        moveAnimFlags         1057
        patrolAnimFlags       1057
        evadeAnimFlags        3
        combatAnimFlags       7
        leapAnimFlags         0
        dartAnimFlags         0
        projectileAnimFlags   1
        weaponAnimFlags       1
        comboAnimFlags        0
        normalDeathAnimFlags  1057
        movingDeathAnimFlags  1
        violentDeathAnimFlags 1
        explosiveDeathAnimFlags 3
        alertAnimFlags        1
        takeCoverAnimFlags    0
        leftArmWoundAnimFlags 1
        rightArmWoundAnimFlags 1
        fleeAnimFlags         1
        startHealth           50
pathTID   5000
    End_Component
}

FleshSentinel kActor_AI_FleshSentinel
{
    className                 "kexActor"
    placeable                 TRUE
    health                    30
    initialScale              "0.5 0.5 0.5"
    Begin_Component "kexRenderMeshComponent"
        mesh                  "char/Sentinel.skinnedmesh"
        anim                  "anims/Sentinel.anim"
    End_Component
    Begin_Component "kexWorldComponent"
        radius                10.959999
        wallRadius            51.199997
        height                117.879997
        deadHeight            20.480000
        heightOffset          0.0
        bTrackGround          TRUE
    End_Component
    Begin_Component "kexEnemyAIComponent"
        commonFlags           8084
        startAnimID           0
        deathItemDropFlags1   0
        deathItemDropFlags2   0
        leashRadius           2560.000000
        aggressionLevel       0
        tranqHealth           2
        startSoundID          0
        painSoundID           0
        flags                 2
        attackCombatRadius    81.91
        attackLeapRadius      163.839
        attackDartRadius      163.839
        attackProjectileRadius 1024.59
        attackWeaponRadius    409.199
        groundBehavior        1
        airBehavior           0
        underwaterBehavior    0
        extremeDeathModelIndex 3
        explodeDeathModelIndex 5
        headBlownDeathModelIndex 4
        leftArmBlownDeathModelIndex 1
        rightArmBlownDeathModelIndex 2
        bodyHoleDeathModelIndex -1
        extremeDeathAnimID    7300
        explodeDeathAnimID    7201
        headBlownDeathAnimID  7335
        leftArmBlownDeathAnimID 7345
        rightArmBlownDeathAnimID 7345
        bodyHoleDeathAnimID   0
        idleAnimFlags         1057
        moveAnimFlags         1057
        patrolAnimFlags       1058
        evadeAnimFlags        3
        combatAnimFlags       3
        leapAnimFlags         0
        dartAnimFlags         0
        projectileAnimFlags   1
        weaponAnimFlags       0
        comboAnimFlags        0
        normalDeathAnimFlags  1057
        movingDeathAnimFlags  1
        violentDeathAnimFlags 1
        explosiveDeathAnimFlags 3
        alertAnimFlags        0
        takeCoverAnimFlags    0
        leftArmWoundAnimFlags 1
        rightArmWoundAnimFlags 1
        fleeAnimFlags         1
        startHealth           30
pathTID   -1
    End_Component
}

Posted by: Doom Dojo
« on: April 19, 2017, 01:09:18 PM »

After you unzip the "game.kpf" file use this to view and copy files to your Turok 2 directory. In your Turok 2 directory create a "scripts" folder and a "defs/actors" folder.

If we wanted to display the damage done to an enemy on the screen, the first thing we need to do is create a script for enemies.
So first create a new file and call it "Enemy.txt" and place it in the scripts folder. Edit the file and create a class named Enemy and add the OnDamage callback function like so:

Code: [Select]
class Enemy : ScriptObject
{
kActor@ self;
Enemy(kActor@ actor)
{
@self = actor;
}
void OnDamage(kDamageInfo& in dmgInfo)
{
Hud.AddMessage("Enemy took " + dmgInfo.hits + " damage");
}
}

Now we just have to hook this script up to all the enemies in the game, but for testing let's just hook it up to the Raptoid enemy.
All the definitions of everything in the game is in the folder "defs". enemies are in "defs/actors/enemies.txt"

So first let's copy the "defs/actors/enemies.txt" file that was in the game.kpf that you unzipped before, and paste that into "Turok 2 - Seeds of Evil/defs/actors/enemies.txt"
Edit the file and the first entry is the Raptoid enemy. It's already defined all the properties and components needed by enemies in the game so we are going to add our custom script component class to the enemy by adding:

Code: [Select]
Begin_Component "kexScriptComponent"
scriptClass "Enemy"
End_Component
   
That's all you need to do. Run the game - make sure you're in developer mode by opening the console and typing "developer 1" if you weren't you need to close and reopen the game after setting it. When a Raptoid is damaged it should display that damage text.

Oh wow it worked for me thanks a ton! I wasn't doing anything specific just messing around with the structure. Sixty Four was telling me how he could put some of you guys guides on Turok Sanctum too. And I definitely vote for that. A guide section of posts for that site is a good idea. This one should go there too for sure ;)
SimplePortal 2.3.6 © 2008-2014, SimplePortal