JavaGuy Posted September 10, 2002 Share Posted September 10, 2002 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 More sharing options...
War Master Posted September 10, 2002 Share Posted September 10, 2002 I don't know if you just made a typing mistake but the key should be usescript not usesscript. The second thing is where exactly are you putting the script? What pk3 are you talking about? Link to comment Share on other sites More sharing options...
JavaGuy Posted September 10, 2002 Author Share Posted September 10, 2002 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 More sharing options...
War Master Posted September 11, 2002 Share Posted September 11, 2002 There's no indication in the console that it's even trying to run a script? Uncheck the runonactivator thing. I don't know what the hell that does but I never use it and I have no trouble running my scripts. Link to comment Share on other sites More sharing options...
Wes Marrakesh Posted September 11, 2002 Share Posted September 11, 2002 You trying to do it in MP? Scripts only work in SP. Link to comment Share on other sites More sharing options...
War Master Posted September 11, 2002 Share Posted September 11, 2002 Originally posted by Wes Marrakesh You trying to do it in MP? Scripts only work in SP. Forgot about that. Good point. Link to comment Share on other sites More sharing options...
JavaGuy Posted September 11, 2002 Author Share Posted September 11, 2002 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 More sharing options...
War Master Posted September 11, 2002 Share Posted September 11, 2002 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 More sharing options...
JavaGuy Posted September 11, 2002 Author Share Posted September 11, 2002 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 More sharing options...
Leslie Judge Posted September 11, 2002 Share Posted September 11, 2002 Hmm... What if you leave out the print line? As War Master said there are feedbacks telling about the print command that it doesn't work. Maybe script running stops after that... Link to comment Share on other sites More sharing options...
War Master Posted September 11, 2002 Share Posted September 11, 2002 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 More sharing options...
JavaGuy Posted September 11, 2002 Author Share Posted September 11, 2002 YES! That was it. Thanks everyone! Link to comment Share on other sites More sharing options...
War Master Posted September 12, 2002 Share Posted September 12, 2002 I just want to add something, for an NPC your original script would work because they don't need the affect statement if you give them key:spawnscript value: name of script. Link to comment Share on other sites More sharing options...
Leslie Judge Posted September 12, 2002 Share Posted September 12, 2002 Heh, people always learn something. I've much to learn about scripting. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.