Bell Posted January 2, 2003 Share Posted January 2, 2003 hi, this is the spawn script for an npc //Generated by BehavEd rem ( "jadpro1" ); set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_NONE" ); set ( /*@SET_TYPES*/ "SET_ANIM_UPPER", /*@ANIM_NAMES*/ "FACE_DEAD" ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_SIT2" ); set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", -1 ); this is a section of a separate script that runs a little later during a cin. affect ( "jadpro1", /*@AFFECT_TYPE*/ FLUSH ) { set ( /*@SET_TYPES*/ "SET_BEHAVIOR_STATE", /*@BSTATE_STRINGS*/ "BS_DEFAULT" ); set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_SABER" ); set ( /*@SET_TYPES*/ "SET_IGNOREENEMIES", /*@BOOL_TYPES*/ "false" ); set ( /*@SET_TYPES*/ "SET_WALKING", /*@BOOL_TYPES*/ "false" ); set ( /*@SET_TYPES*/ "SET_RUNNING", /*@BOOL_TYPES*/ "true" ); set ( /*@SET_TYPES*/ "SET_LOOK_FOR_ENEMIES", /*@BOOL_TYPES*/ "true" ); set ( /*@SET_TYPES*/ "SET_CHASE_ENEMIES", /*@BOOL_TYPES*/ "true" ); task ( "drawsaber2" ) { set ( /*@SET_TYPES*/ "SET_ENEMY", "kylepro1" ); } do ( "drawsaber2" ); } i've tried variations with the syntax but no matter what this second part does nothing. the npc still sits there. any thoughts on what i can try? thanks!! Link to comment Share on other sites More sharing options...
Kengo Posted January 2, 2003 Share Posted January 2, 2003 I had similar problems with an NPC staying cinematic after I scripted him to use default behavoir. This is an aside but shouldn't the spawnscript have an affect command at the beginning? I think if you try just having the SET_BEHAVIOR_STATE on it's own it should work, for some reason it doesn't like being with other commands in the affect area, I think. To have the other things take place as well you might need to have them as a seperate script. Sorry, not very helpful I know, I've been struggling a lot with affect commands for NPCs... Link to comment Share on other sites More sharing options...
lassev Posted January 3, 2003 Share Posted January 3, 2003 Spawnscript affects the entity that launches it, automatically. And behavior state changes should work with other commands after it. However, one thing I would check first is that jadpro1 has the NPC_targetname properly typed, and that the other script is actually being lauched at some point. If you have a long cinematic), it may stop at some point for some other error, and nothing after that is being processed (good thing you have the console command to quit the game even in the camera mode). However, if the actual cinematic has ended before the last script, you might check if the NPC is just slow to react. Maybe he/she will attack when you go nearer? That has happened to me some times, although the NPC has shouted his comments alright. Do you need to set the enemy in a task (I don't know, just asking)? Ah, one last thing: make sure the poor NPC is not INSIDE the chair he's sitting on. That once happened to me, and it caused him to be stuck there. Link to comment Share on other sites More sharing options...
Bell Posted January 3, 2003 Author Share Posted January 3, 2003 thansk for the help guys!!! well i have two other npc's with an affect in this syntax: task ( "plokoonwalk1" ) { affect ( "plokoonpro1", /*@AFFECT_TYPE*/ FLUSH ) { set ( /*@SET_TYPES*/ "SET_WALKING", /*@BOOL_TYPES*/ "true" ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_WALK1" ); set ( /*@SET_TYPES*/ "SET_NAVGOAL", "plokoonpro1nav1" ); } } do ( "plokoonwalk1" ); and it works. It comes after the sections of my first post so I'm thinking that there isn't an error that is stopping the script. I stopped the cin early and sat there and watched them to make sure there is no delay in the execution of that script section. I also have them starting by sitting on func_trains. I took them off and put them on the floor just in case but same error. However, I used the syntax of the latter, and now they actually stand up on the func_train, draw their sabers; but they just stand there looking at eachother. any thoughts? the two npc's I'm affecting are the kyle and jedi. Is it possible to assign them enemies of eachother? I also tripple checked all the keys and values as well. thanks mountains!! anyone else have thoughts? { by the way, i have a program called xq-xfind. It searches for text within files, even executables. You can for example search a folder of hundreds of scripts for a text string like "behavior" or "enemy" and will give you those with the search words highlighted. Its awesome for browsing the behavEd scripts that come with the tools. http://www.xteq.com/downloads/#xfnd Link to comment Share on other sites More sharing options...
lassev Posted January 6, 2003 Share Posted January 6, 2003 Quite a few posts popping in nowadays, eh? This thread was on the second page. And I was thinking these forums were growing silent with the departure of such people as Richdiesal was. Anyway, now I also begin to see your problem. You are trying to get kyle and a jedi to beat each other? Actually, I have a problem quite similar. I am trying to get the mark1 battle droid to attack storm troopers in a big hall. I just assigned with a script the enemy and player teams to get it friendly to kyle, not so friendly to STs. That caused the stormtoopers to shoot at the droids, yet the droids were just merrily taking bullets, but did nothing to shoot back. I added NPC_targetname to all the STs in the hall, and assigned them as enemies with set_enemy, but I haven't yet tested that. We'll see. So, unfortunately, my ability to help you ends here. Just make sure kyle NPC can actually fight like a jedi (or reborn). I don't know about that, he just might be a static to be used in cinematics. Link to comment Share on other sites More sharing options...
Bell Posted January 6, 2003 Author Share Posted January 6, 2003 hi there! ya the rhythms of life i guess, it gets popular, then slows down, then gets busy again. Ya i'm gonna test that theory and extract kyle and jedi from the assets file and change the names and classes on the folders and my npc file. I'll give kyle the jedi class and jedi the reborn class and see if they will attack eachother. I'll let you know. Keep me posted on your progress cheers Link to comment Share on other sites More sharing options...
lassev Posted January 8, 2003 Share Posted January 8, 2003 It seems my progress may be halted. I tested this simple combat situation by adding the NPC_targetname to the STs, and set them to be the exact enemies of the Mark1. The game responded by crashing. Thinking something temporal had gone wrong, I tried again, but seemingly I had violated some Raven rule, and the game won't accept multiple enemies to be set with the scripted enemy assignment. I don't really think there's much to be done with my problem, unfortunately, except change my level's plot a little bit and invent some other funny thing to replace this doomed one. Originally I intended to give the player control over a Mark1 droid, as that would have been the funniest thing to consider, really, in this situation. Yet, that was the weirdest thing in action, because you could easily enough move the robot around, but everytime you fired, the repeater just aimed at the world origin (I think), not to any enemy soldier in front of you (and you couldn't even fire the wookie bolts). Link to comment Share on other sites More sharing options...
Bell Posted January 15, 2003 Author Share Posted January 15, 2003 k i changed one of the npc's to a reborn prefix and changed his team in the npc file, and assigned his enemy to kyle; wouldn't you know it, he doens't attack the kyle npc in the game, he runs after me, the first person player npc, but he runs to me and stands there, doesn't attack or draw his sabre, all the targetnames are correct. anyone have any suggestions? even if wild or off the wall? thanks! Link to comment Share on other sites More sharing options...
lassev Posted January 15, 2003 Share Posted January 15, 2003 All right. The basic facts we know: jedis can fight each other, because they do in Yavin temple level in original SP (regardless of their npc.cfg settings). That only requires team and enemy setting changes with scripting (I have done the same thing with basic grans). And now I can also assuredly tell you that kyle npc can fight. I fought against him after one defective cinematic scripting trial (man, he was a hard one, maybe because of the invincibility...). However, you may have a serious problem, if you are trying to get a reborn and kyle npc fight when you are still as a player hanging around. Maybe in a cinematic. Try enabling the cameras (if that was also your original idea, a cinematic?) Link to comment Share on other sites More sharing options...
Bell Posted January 15, 2003 Author Share Posted January 15, 2003 wohoo thanks for replying. k yes this all takes place during the cinematic; simply, the npc cinematic version of kyle is fighting a jedi (both eventually being replaced by custom ncp models) are fighting eachother - training in a training room; like in the sp game. they just don't want to fight eachother. I don't suppose you could post or send me your scripts or test map you did by chance wpbellco@earthlink.net i could definately figure it out with that and it would be a HUGE help and HUGE favor. lemme know Link to comment Share on other sites More sharing options...
lassev Posted January 16, 2003 Share Posted January 16, 2003 Sure. I can send you the scripts. However, I didn't do any test mapping for this particular problem, so I cannot provide anything but scripts, and the keys and values I used with the grans. Still, I can't send them right away, because right now those grans aren't fighting... I wanted them to stop fighting each other, when they spotted the player, so I added some scripts besides the fighting script. They stopped fighting altogether. That was months ago, and I have had other, bigger issues with my maps since then, so it has been at rest for a while. I will fix the entirety into operation and then send you the information I can. Maybe tomorrow. Link to comment Share on other sites More sharing options...
Bell Posted January 18, 2003 Author Share Posted January 18, 2003 WOW!! man got your email i owe ya big time thanks!!!! i replied as well; i wanted to add that when i throw my saber at kyle he draws his, evades, then sheaths it again and continues to stand there and take punishment. any ideas? weird. Link to comment Share on other sites More sharing options...
Bell Posted January 18, 2003 Author Share Posted January 18, 2003 hmm, i'm using an npc_spawner for one of them; could that be it? somehow kyle doesn't recognize a custom model or something? The custom model class is reborn; it should make kyle attack him right? Link to comment Share on other sites More sharing options...
lassev Posted January 19, 2003 Share Posted January 19, 2003 Well, I also sent an email, but it never hurts to post here. At least I get points... Are you now talking about your own level, or Bell's arena? Although I didn't try it that way, I could imagine that as long as a reborn and an NPC_kyle are in bs_default they would attack each other even without scripting. Reborns are such a violent lot. On the other hand, if you set enemies with a script, you might not want to do it in a spawn script, if the combatants are to be spawned at the same time. This may lead to the sympton, that the other is not yet spawned when to other tries to assign him to be an enemy, thus failing. And for the problem of the reluctancy of the NPC_kyle and jedis to fight without the player interference, I have not yet an answer. This question evades me the best it can, thus far annoying successfully. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.