Jump to content

Icarus scripting cutscenes


Recommended Posts

Hi to all icarus experts out there!

 

I have two problems in creating cutscenes.

 

1.)  I spawn two actors with ents

{
"spawnflags" "32"
"angle" "180"
"origin" "1376 -24 -3176"
"classname" "NPC_spawner"
"Npc_type" "RebornMasterStaff"
"spawnscript" "kor1/invisibleNonSolid"
"npc_targetname" "npc_rebornmasterdoor"
}
{
"classname" "NPC_spawner"
"Npc_type" "Player"
"origin" "1309 -29 -3175"
//"spawnflags" "224"
"npc_targetname" "npc_fakeplayer2"
"angle" "0"
"spawnscript" "kor1/invisibleNonSolid"
"deathscript" "kor1/playerdeath"
}

 

I let them fight each other with a script :

 

use ( "npc_rebornmasterdoor" );
use ( "npc_fakeplayer2" );

affect ( "npc_rebornmasterdoor", FLUSH )
{
    set ( "SET_INVISIBLE", "false" );
    set ( "SET_SOLID", "true" );
    set ( "SET_BEHAVIOR_STATE", "BS_CINEMATIC" );
    set ( "SET_NO_ACROBATICS", "true" );
    set ( "SET_INVINCIBLE", "true" );
    set ( "SET_RUNNING", "true" );
    set ( "SET_WEAPON", "WP_SABER" );
    set ( "SET_SABERACTIVE", "true" );
    set ( "SET_WATCHTARGET", "npc_fakeplayer2" );
    set ( "SET_FIRE_WEAPON", "true" );
}


affect ( "npc_fakeplayer2", FLUSH )
{
    set ( "SET_INVISIBLE", "false" );
    set ( "SET_FORCE_INVINCIBLE", "true" );
    set ( "SET_IGNOREENEMIES", "true" );
    set ( "SET_NO_KNOCKBACK", "true" );
    set ( "SET_IGNOREALERTS", "true" );
    set ( "SET_ORIGIN", < 1333.000 -26.000 -3175.000 > );
    set ( "SET_ANGLES", < 0.000 0.000 0.000 > );
    set ( "SET_SOLID", "true" );
    set ( "SET_BEHAVIOR_STATE", "BS_CINEMATIC" );
    set ( "SET_NO_ACROBATICS", "true" );
    set ( "SET_INVINCIBLE", "true" );
    set ( "SET_RUNNING", "true" );
    set ( "SET_WEAPON", "WP_SABER" );
    set ( "SET_SABERACTIVE", "true" );
    set ( "SET_WATCHTARGET", "npc_rebornmasterdoor" );
    set ( "SET_FIRE_WEAPON", "true" );
}

 

with the next script I want to kill the reborn and let the fakeplayer turn to kylo. Fakeplayer turns as intended, but still looks at the dead reborn

 

affect ( "npc_fakeplayer2", FLUSH )
{
    set ( "SET_ORIGIN", < 1333.000 -26.000 -3175.000 > );
    set ( "SET_MORELIGHT", "true" );
    set ( "SET_NO_PVS_CULL", "true" );
    set ( "SET_RENDER_CULL_RADIUS", 1000.000 );
    set ( "SET_INVISIBLE", "false" );
    set ( "SET_SOLID", "true" );
    set ( "SET_BEHAVIOR_STATE", "BS_CINEMATIC" );
    set ( "SET_WATCHTARGET", "NULL" );

    affect ( "npc_rebornmasterdoor", FLUSH )
    {
        set ( "SET_UNDYING", "false" );
        wait ( 3000.000 );
        kill ( "npc_rebornmasterdoor" );

        affect ( "npc_fakeplayer2", FLUSH )
        {
            set ( "SET_FIRE_WEAPON", "false" );
            set ( "SET_SABERACTIVE", "false" );
            wait ( 500.000 );
            set ( "SET_SABERACTIVE", "false" );
            set ( "SET_WATCHTARGET", "npc_fakeKylo2" );
            set ( "SET_VIEWTARGET", "npc_fakeKylo2" );
            set ( "SET_LOOK_TARGET", "npc_fakeKylo2" );
            wait ( 2000.000 );
            set ( "SET_WATCHTARGET", "npc_fakeKylo2" );
            set ( "SET_VIEWTARGET", "npc_fakeKylo2" );
            set ( "SET_LOOK_TARGET", "npc_fakeKylo2" );
            set ( "SET_ANIM_BOTH", "BOTH_STAND2" );
            set ( "SET_ANIM_HOLDTIME_BOTH", -1.000 );

...

 

Can someone tell me how to stop the fakeplayer to look at the reborn?

 

2.)

 

I use a similar foundation with ents and spawning. This time, everytime i run a script my fakeplayer changes its origin to the last position of the player. How can I prevent this?

 

Thank you for your help!

 

Link to comment
  • 3 weeks later...

Hi to all icarus experts out there!

 

I have two problems in creating cutscenes.

 

1.)  I spawn two actors with ents

{

"spawnflags" "32"

"angle" "180"

"origin" "1376 -24 -3176"

"classname" "NPC_spawner"

"Npc_type" "RebornMasterStaff"

"spawnscript" "kor1/invisibleNonSolid"

"npc_targetname" "npc_rebornmasterdoor"

}

{

"classname" "NPC_spawner"

"Npc_type" "Player"

"origin" "1309 -29 -3175"

//"spawnflags" "224"

"npc_targetname" "npc_fakeplayer2"

"angle" "0"

"spawnscript" "kor1/invisibleNonSolid"

"deathscript" "kor1/playerdeath"

}

 

I let them fight each other with a script :

 

use ( "npc_rebornmasterdoor" );

use ( "npc_fakeplayer2" );

 

affect ( "npc_rebornmasterdoor", FLUSH )

{

    set ( "SET_INVISIBLE", "false" );

    set ( "SET_SOLID", "true" );

    set ( "SET_BEHAVIOR_STATE", "BS_CINEMATIC" );

    set ( "SET_NO_ACROBATICS", "true" );

    set ( "SET_INVINCIBLE", "true" );

    set ( "SET_RUNNING", "true" );

    set ( "SET_WEAPON", "WP_SABER" );

    set ( "SET_SABERACTIVE", "true" );

    set ( "SET_WATCHTARGET", "npc_fakeplayer2" );

    set ( "SET_FIRE_WEAPON", "true" );

}

 

 

affect ( "npc_fakeplayer2", FLUSH )

{

    set ( "SET_INVISIBLE", "false" );

    set ( "SET_FORCE_INVINCIBLE", "true" );

    set ( "SET_IGNOREENEMIES", "true" );

    set ( "SET_NO_KNOCKBACK", "true" );

    set ( "SET_IGNOREALERTS", "true" );

    set ( "SET_ORIGIN", < 1333.000 -26.000 -3175.000 > );

    set ( "SET_ANGLES", < 0.000 0.000 0.000 > );

    set ( "SET_SOLID", "true" );

    set ( "SET_BEHAVIOR_STATE", "BS_CINEMATIC" );

    set ( "SET_NO_ACROBATICS", "true" );

    set ( "SET_INVINCIBLE", "true" );

    set ( "SET_RUNNING", "true" );

    set ( "SET_WEAPON", "WP_SABER" );

    set ( "SET_SABERACTIVE", "true" );

    set ( "SET_WATCHTARGET", "npc_rebornmasterdoor" );

    set ( "SET_FIRE_WEAPON", "true" );

}

 

with the next script I want to kill the reborn and let the fakeplayer turn to kylo. Fakeplayer turns as intended, but still looks at the dead reborn

 

affect ( "npc_fakeplayer2", FLUSH )

{

    set ( "SET_ORIGIN", < 1333.000 -26.000 -3175.000 > );

    set ( "SET_MORELIGHT", "true" );

    set ( "SET_NO_PVS_CULL", "true" );

    set ( "SET_RENDER_CULL_RADIUS", 1000.000 );

    set ( "SET_INVISIBLE", "false" );

    set ( "SET_SOLID", "true" );

    set ( "SET_BEHAVIOR_STATE", "BS_CINEMATIC" );

    set ( "SET_WATCHTARGET", "NULL" );

 

    affect ( "npc_rebornmasterdoor", FLUSH )

    {

        set ( "SET_UNDYING", "false" );

        wait ( 3000.000 );

        kill ( "npc_rebornmasterdoor" );

 

        affect ( "npc_fakeplayer2", FLUSH )

        {

            set ( "SET_FIRE_WEAPON", "false" );

            set ( "SET_SABERACTIVE", "false" );

            wait ( 500.000 );

            set ( "SET_SABERACTIVE", "false" );

            set ( "SET_WATCHTARGET", "npc_fakeKylo2" );

            set ( "SET_VIEWTARGET", "npc_fakeKylo2" );

            set ( "SET_LOOK_TARGET", "npc_fakeKylo2" );

            wait ( 2000.000 );

            set ( "SET_WATCHTARGET", "npc_fakeKylo2" );

            set ( "SET_VIEWTARGET", "npc_fakeKylo2" );

            set ( "SET_LOOK_TARGET", "npc_fakeKylo2" );

            set ( "SET_ANIM_BOTH", "BOTH_STAND2" );

            set ( "SET_ANIM_HOLDTIME_BOTH", -1.000 );

...

 

Can someone tell me how to stop the fakeplayer to look at the reborn?

 

2.)

 

I use a similar foundation with ents and spawning. This time, everytime i run a script my fakeplayer changes its origin to the last position of the player. How can I prevent this?

 

Thank you for your help!

For scripting i suggest this manual. It is really helpful! - https://github.com/JACoders/OpenJK/wiki/ICARUS-Scripting

 

Hmmm How about giving the Dead rebornmaster - 

 

SET_NOTARGET            "true/false"        No one will target current entity as an enemy.

 

also in cutscenes i suggest to not kill the npc - but to just play death animation. Most of the scripts stop working on the dead npc

Akkarin likes this
Link to comment

Thanks for the answer.

I will try to give the  notarget to to the rebornmaster. I didn't know that NPC in Cinematic behavior also look at other NPC near by.

 

Yeah I might want to change the way to kill him in the future. I looked at your scripts for inspiration.

 

Thank you again!

Langerd likes this
Link to comment

Thanks for the answer.

I will try to give the  notarget to to the rebornmaster. I didn't know that NPC in Cinematic behavior also look at other NPC near by.

 

Yeah I might want to change the way to kill him in the future. I looked at your scripts for inspiration.

 

Thank you again!

Hope it will help. If yes or no still inform us to check if issue was fixed. You can later select one post as an answer with working solution. This will help every other member in the future with the same problem :)

Link to comment

It still doesn't work. Do you have other ideas. Thanks anyway :winkthumb:

Maybe change the npc's team - to make them the same npc team .

 

SET_LOOK_TARGET   "targetname"  The NPC will turn it's head (within its range) to look at whatever NPC/entity you specify. Note that this is automatically set when the NPC has an enemy.

 

So yeah the best solution will be changing their npc teams.

 

Team Table

TEAM_FREE        No team

TEAM_PLAYER        Player and his allies

TEAM_ENEMY        All enemies

TEAM_NEUTRAL    Most droids

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...