Jump to content

Home

ICARUS painscript


JavaGuy

Recommended Posts

I'm still refining my idea to have a reborn-ish NPC throw stuff at the player, but the NPC itself still ignores the script's directives. I decided to make it part of the NPCs painscript, so it runs when the NPC gets hit.

 

What's interesting to me is that everything in the script except the stuff that tells the NPC to do something works fine. The func_breakable that gets used, breaks. The func_static that gets moved and rotated, moves and rotates. The explosion fx entity that gets used at the end is quite spectacular. So the NPC is most definitely running his painscript when he gets hit, but he doesn't do any of the SET_DYAW things in the script.

 

I have also tried with SET_VIEWTARGET. It ignores those too. I also had a SET_NAVGOAL. Ignored. I tried throwing in a SET_BEHAVIORSTATE to BS_CINEMATIC. No luck. :(

 

Anyway, here's my painscript:

 

 

 

task ("look1" )

{

set ( "SET_IGNOREENEMIES", "true" );

set ( "SET_DYAW", 90 );

}

task ( "look2" )

{

set ( "SET_DYAW", 270 );

 

}

dowait ( "look1" );

do ( "look2" );

 

rem ( "Break the func_breakable.");

use ( "forcethrow1breakable" );

 

rem ( "Now throw the func_static object!");

affect ( "forcethrow1static", /*@AFFECT_TYPE*/ FLUSH )

{

move ( $tag( "forcethrow1reftag",ORIGIN)$, 750 );

rotate ( < 275.000 133.000 335.000 >, 750 );

}

 

affect ( "kyle" )

{

sound ( CHAN_AUTO, "sound/effects/vacuum" );

}

 

sound ( CHAN_AMBIENT, "sound/effects/grate_destroy" );

 

use ( "forcethrow1explosion" );

 

affect ( "forcethrow1static", /*@AFFECT_TYPE*/ FLUSH )

{

set ( "SET_INVISIBLE", "true");

set ( "SET_SOLID", "false" );

}

 

set ( "SET_IGNOREENEMIES", "false" );

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...