Jump to content

Home

Why won't my frickin' script run?


JavaGuy

Recommended Posts

Here's the script:

 

rem ( "Set up player for Sandcrawler level" );

print ( "PLAYER SETUP SCRIPT RUN" );

set ( "SET_WEAPON", "WP_SABER" );

 

 

That's the whole thing. It's called player_setup.txt, and BehavEd compiles it into player_setup.ibi. I place it in the scripts folder in my pk3.

 

The info_player_start on my map targets a target_scriptrunner. The target_scriptrunner has the key "usesscript" set to "player_setup" and the runonactivator flag set.

 

Absolutely nothing happens. I run it in devmap mode, and the console doesn't even show that it's trying to run a script.

 

What flaming hoop do I need to jump through to make these work?

 

Thanks!

Sam

Link to comment
Share on other sites

It wasn't a typing mistake; I really had it that way. Doh!

 

Okay, so I made the correction and put it as "usescript" equal to "player_setup". It still doesn't run.

 

I am putting the player_setup.ibi in the "scripts" folder inside the sandcrawler.pk3 (the pk3 containing my map). The map loads and runs okay, so I know it's finding the pk3; it's just that the script does not run.

Link to comment
Share on other sites

It's a single-player map. I've tried setting "usescript" to "scripts/player_setup" and got a console message saying it couldn't open the file when the scriptrunner fired. When it's just set to "player_setup" I get nothing--no message saying it can't find it, nothing on the console saying it has run the script.

Link to comment
Share on other sites

Maybe it is running your script. I've heard of the print command not working for some people and your wp_saber is already assigned to Kyle by default. Try giving Kyle a weapon like WP_Disruptor. If he doesn't have this weapon in his inventory when you start then you know for sure that your script isn't running.

Link to comment
Share on other sites

Tried it. Still nothing.

 

Is there something wrong with the script itself? Right now it looks like this:

 

//Generated by BehavEd

 

rem ( "Set up player for Sandcrawler level" );

print ( "PLAYER SETUP SCRIPT RUN" );

set ( "SET_WEAPON", "WP_DISRUPTOR" );

 

 

When I set "usescript" to an incorrect path, it complains that it can't find the script. When it has the correct path to the script, it doesn't do any of the things in the script. I can't help but feel I'm missing something that should be obvious. Is there anything else I need to set up to get this to run?

 

Thanks again,

Sam

Link to comment
Share on other sites

I've got it! I don't know why I didn't see this before. There is a problem with your script. You need the affect statement. This is the script I use.

 

//Generated by BehavEd

 

rem ( "comment" );

 

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

{

set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_SABER" );

set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_BRYAR_PISTOL" );

set ( /*@SET_TYPES*/ "SET_ARMOR", 100 );

set ( /*@SET_TYPES*/ "SET_FORCE_JUMP_LEVEL", /*@FORCE_LEVELS*/ "3" );

set ( /*@SET_TYPES*/ "SET_FORCE_PUSH_LEVEL", /*@FORCE_LEVELS*/ "3" );

set ( /*@SET_TYPES*/ "SET_FORCE_PULL_LEVEL", /*@FORCE_LEVELS*/ "3" );

set ( /*@SET_TYPES*/ "SET_FORCE_SPEED_LEVEL", /*@FORCE_LEVELS*/ "3" );

set ( /*@SET_TYPES*/ "SET_FORCE_HEAL_LEVEL", /*@FORCE_LEVELS*/ "3" );

set ( /*@SET_TYPES*/ "SET_FORCE_GRIP_LEVEL", /*@FORCE_LEVELS*/ "3" );

set ( /*@SET_TYPES*/ "SET_FORCE_MINDTRICK_LEVEL", /*@FORCE_LEVELS*/ "3" );

set ( /*@SET_TYPES*/ "SET_FORCE_LIGHTNING_LEVEL", /*@FORCE_LEVELS*/ "3" );

set ( /*@SET_TYPES*/ "SET_SABER_THROW", /*@FORCE_LEVELS*/ "3" );

set ( /*@SET_TYPES*/ "SET_SABER_DEFENSE", /*@FORCE_LEVELS*/ "3" );

set ( /*@SET_TYPES*/ "SET_SABER_OFFENSE", /*@FORCE_LEVELS*/ "3" );

set ( /*@SET_TYPES*/ "SET_OBJECTIVE_SHOW", /*@OBJECTIVES*/ "KEJIM_POST_OBJ2" );

}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...